[ovs-discuss] Open vSwitch Source code walkthrough

Rajasekaran, Monica Monica.Rajasekaran at us.fujitsu.com
Fri Mar 4 20:26:36 UTC 2016


Hi Andy,

Thanks for that suggestion. I will try that out. I am pretty new to this so finding it hard.

I have OVS-ODL integrated and up and also added flows. At what point should I run “gdb backtrace” ? Attached an image of what I get when I run the same.

Thanks.

From: Andy Zhou [mailto:azhou at ovn.org]
Sent: Friday, March 04, 2016 1:36 PM
To: André Mantas
Cc: Rajasekaran, Monica; discuss at openvswitch.org
Subject: Re: [ovs-discuss] Open vSwitch Source code walkthrough

Monica, you may want to trace through the code using gdb.  GDB backtrace tells you where you came from and you can step forward through execution.
You can alway attach gdb to a running process.  If using sandbox, you can start vswitchd under gdb by using the '-g' option, as:

$ make sandbox SANDBOXFLAGS=-g


On Fri, Mar 4, 2016 at 11:27 AM, André Mantas <andremantas7 at gmail.com<mailto:andremantas7 at gmail.com>> wrote:
I'm no ovs expert but handle_openflow(struct ofconn *ofconn, const struct ofpbuf *ofp_msg) looks like a good place to start.
You can always search for function names to see where they're invoked.

Rajasekaran, Monica <Monica.Rajasekaran at us.fujitsu.com<mailto:Monica.Rajasekaran at us.fujitsu.com>> escreveu no dia sexta, 4/03/2016 às 19:08:
I am looking at the code but I don’t know what gets invoked first. Functions from header files and vswitchd and ovsdb modules have been called in between. Should I just add print statements to all the functions in ofproto.c and see how it goes when a packet comes in ? Or is there an alternative ?

Thanks,
Monica

From: André Mantas [mailto:andremantas7 at gmail.com<mailto:andremantas7 at gmail.com>]
Sent: Friday, March 04, 2016 11:33 AM
To: Rajasekaran, Monica; discuss at openvswitch.org<mailto:discuss at openvswitch.org>
Subject: Re: [ovs-discuss] Open vSwitch Source code walkthrough

Have you tried ofproto/ofproto.c?

Rajasekaran, Monica <Monica.Rajasekaran at us.fujitsu.com<mailto:Monica.Rajasekaran at us.fujitsu.com>> escreveu no dia sexta, 4/03/2016 às 17:23:
Well, I can see how things work when we give commands using ofctl, vsctl etc. But, I still don’t get which file is invoked first when  a packet arrives to the switch.

Any help on this ?

From: Rajasekaran, Monica
Sent: Wednesday, March 02, 2016 2:32 PM
To: 'discuss at openvswitch.org<mailto:discuss at openvswitch.org>'
Subject: Open vSwitch Source code walkthrough

Hello,

I am trying to understand the source code of Open vSwitch for one of my projects. But, not sure from where I should start and where to end. Is it possible to give me some sort of guidance ?

Thanks and Regards,
Monica Rajasekaran
_______________________________________________
discuss mailing list
discuss at openvswitch.org<mailto:discuss at openvswitch.org>
http://openvswitch.org/mailman/listinfo/discuss

_______________________________________________
discuss mailing list
discuss at openvswitch.org<mailto:discuss at openvswitch.org>
http://openvswitch.org/mailman/listinfo/discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20160304/85e74adb/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ovs-gdb.PNG
Type: image/png
Size: 127095 bytes
Desc: ovs-gdb.PNG
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20160304/85e74adb/attachment-0002.png>


More information about the discuss mailing list