Hi Monica, If you want to start understanding the source code of OVS by following how the switch receives packets, there are some things you need to take into account.
-First, OVS (in Linux) relies on a kernel module for all the basic packet processing. This module is installed in the OS: this kernel space. OVS code is executed as a normal program, hence it is said it runs in user space. OVS code communicates with the kernel module via a messaging mechanism (upcalls and downcalls) but those 2 different pieces of code run separately. -In userspace there is a listener to communicate with the OpenFlow controller. Check the function handle_openflow, and see who calls it and what it does. -In the kernel module code (datapath folder) you have the code where a data packet is received and processed. Search for the function process_packet and also see who calls it and what it does. -When you follow and understand the code in the kernel, you will realize there are substantial differences from userspace, with respect to how the flow tables are managed and which actions are executed. This is because original flow tables are stored in userspace, according to what the controller dictates. However, in the kernel they are stored differently (e.g., there is only one flow table, not a pipeline, and the goto_table instruction is never executed in kernel) for efficiency reasons. To understand this better you can read this very useful paper: https://www.usenix.org/system/files/conference/nsdi15/nsdi15-paper-pfaff.pdf Good luck, David Sainz > 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@openvswitch.org > http://openvswitch.org/mailman/listinfo/discuss > _______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss