[ovs-discuss] getting packets on ovs kernel module for testing/debugging

david jhon djhon9813 at gmail.com
Thu Feb 26 07:00:35 UTC 2015


Thanks Ben,

I want to test how ovs kernel module processes packets and update a
corresponding flow entry in flow_table. Any suggestions please?

On Thu, Feb 26, 2015 at 11:30 AM, Ben Pfaff <blp at nicira.com> wrote:

> On Wed, Feb 25, 2015 at 04:09:59PM +0500, david jhon wrote:
> > In order to debug ovs kernel module in gdb, I have set a breakpoint at
> > ovs_dp_process_packet() method in datapath/datapath.c, generating traffic
> > with ping command from one mininet host to other, but not able to debug
> it
> > at all because on running n in gdb, I get "The program is not being run."
> >
> > I am using the following steps to debug openvswitch kernel module:
> > -> gdb vmlinux /proc/kcore
> > -> cd /sys/modules/openvswitch/sections/; ls A1; cat .text .data .bss
> > -> add-symbol-file /root/ovs/_build-gcc/datapath/linux/openvswitch.ko
> > 0xf8819000 \
> > -s .data 0xf8825000 \
> > -s .bss 0xf8825380
> > b datapath/datapath.c:288
> >
> > Please guide me how do I make it work.
>
> I don't think you can debug the kernel that way.
>
> I know a few kernel programmers.  None of them have ever mentioned using
> GDB to debug the kernel.  I don't think it's commonly done.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20150226/01598976/attachment-0002.html>


More information about the discuss mailing list