[ovs-discuss] find the goto table instruction in the code

Gal Sagie gal.sagie at gmail.com
Sun Nov 15 12:22:37 UTC 2015


The first packet of a flow goes to user space, then after classification in
the pipeline a
specific matching cache entry is added in the kernel (two cache types:
megaflow and microflow, you can read more about in the link below) this
entry has the matching keys and the actions to perform.

The next packet in this flow will match the kernel cache entry and perform
the actions without going to user space.

You can read more about this process here:
https://www.usenix.org/system/files/conference/nsdi15/nsdi15-paper-pfaff.pdf


On Sun, Nov 15, 2015 at 2:08 PM, <dsainz at cs.technion.ac.il> wrote:

>
> Pardon my ignorance then, but it seems I got it wrong when I thought the
> main flow tables were in the Kernel. Then, if the main flows are stored in
> userspace, does that mean the data packets arrive directly to the
> userspace client code and treated there? Instead of arriving to some
> listener process in the kernel? I thought that packets arrive to the
> kernel code directly and if they, for example, are redirected to another
> port, the userspace doesn't even know the packet arrived or existed and no
> upcalls are generated.
>
> Can you shed some light please?
>
> >> On Nov 12, 2015, at 4:52 AM, dsainz at CS.technion.ac.il wrote:
> >>
> >> Hi to all,
> >>
> >> I want to locate the code (I imagine it is inside of the Kernel module
> >> datapath) where when a flow is found, the instructions are executed, it
> >> finds the "goto table" instruction and redirects the packet to another
> >> table.
> >
> > "goto table" is an entirely userspace concept.  The kernel flows are a
> > cache of recently seen flows and their associated actions with all the
> > table jumps removed.  Here's an entry from the FAQ that help explain it:
> >
> > -=-=-=-=-=-=-=-=-=-
> > Q: I hear OVS has a couple of kinds of flows. Can you tell me about them?
> >
> > A: Open vSwitch uses different kinds of flows for different purposes:
> >
> >       • OpenFlow flows are the most important kind of flow. OpenFlow
> > controllers use these flows to define a switch's policy. OpenFlow flows
> > support wildcards, priorities, and multiple tables.
> >
> > When in-band control is in use, Open vSwitch sets up a few "hidden"
> flows,
> > with priority higher than a controller or the user can configure, that
> are
> > not visible via OpenFlow. (See the "Controller" section of the FAQ for
> > more information about hidden flows.)
> >
> >       • The Open vSwitch software switch implementation uses a second
> kind of
> > flow internally. These flows, called "datapath" or "kernel" flows, do not
> > support priorities and comprise only a single table, which makes them
> > suitable for caching. (Like OpenFlow flows, datapath flows do support
> > wildcarding, in Open vSwitch 1.11 and later.) OpenFlow flows and datapath
> > flows also support different actions and number ports differently.
> >
> > Datapath flows are an implementation detail that is subject to change in
> > future versions of Open vSwitch. Even with the current version of Open
> > vSwitch, hardware switch implementations do not necessarily use this
> > architecture.
> >
> > Users and controllers directly control only the OpenFlow flow table. Open
> > vSwitch manages the datapath flow table itself, so users should not
> > normally be concerned with it.
> > -=-=-=-=-=-=-=-=-=-
> >
> > --Justin
> >
> >
> >
>
>
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> http://openvswitch.org/mailman/listinfo/discuss
>



-- 
Best Regards ,

The G.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20151115/2eb607ab/attachment-0002.html>


More information about the discuss mailing list