[ovs-dev] Agenda for IRC neeting for 8/13 (Nithin Raju)

Samuel Ghinet sghinet at cloudbasesolutions.com
Fri Aug 22 01:55:13 UTC 2014


Port "NORMAL" in userspace means:
- when a packet is coming from dp port1, its eth address, ethAddr1 is saved for the dp port.
- when another packet is coming from dp port2, and has dest eth address = ethAddr1, a kernel flow must be created that says "if packet has all frames like this, send to port1".
This is how it happens for many packets coming from dp port1, or dp port2, or etc.

port NORMAL and port FLOOD, unlike physical (i.e. ports corresponding to specific VMs or to external) or logical (GRE / VXLAN / etc.) are a userspace concept only.
This means that, when a "ovs-ofctl add-flow br0 actions=normal" is issued,
a) no kernel flow is created yet
b) when a packet1 is coming that must go somewhere, the packet is queued to the userspace: a kernel flow will need to be created from userspace to handle this very specific packet (with all its specific frame fields info as keys, as I remember).
c) when a packet2 is coming from the same dp port, that must go somewhere, the kernel will have a flow missed, because this packet is different than the previous one, and so it doesn't know what to do with it.
d) this second packet is queued to userspace:  a kernel flow will need to be created to handle this very specific packet (with all its specific frame fields info).
and it goes on an on, for very many other packets.

On ports such as a port to a VM, or external, or GRE / VXLAN / etc., it goes like this:
a) set the flow in userspace - no kernel flow created yet
b) packet miss in driver => queue to userspace
c) kernel flow created: handle packets mentioned as <key & mask>
d) any new packet whose <key & flow mask> matches the kernel flow in kernel => execute actions (no more queue to userspace).

This is how it worked, from experimentation, time ago. If, by any chance, some of these details I mentioned on how flows are generated are wrong, corrections are welcomed :)

I hope it clarified.
Sam
________________________________________
From: Ben Pfaff [blp at nicira.com]
Sent: Thursday, August 21, 2014 7:10 PM
To: Samuel Ghinet
Cc: dev at openvswitch.org
Subject: Re: [ovs-dev] Agenda for IRC neeting for 8/13 (Nithin Raju)

On Thu, Aug 21, 2014 at 03:08:59PM +0000, Samuel Ghinet wrote:
> I wanted to point out something about:
> "At a high level, the fraction of packets that make it to userspace should be very small. So it is not worth the optimization"
>
> If we have the port NORMAl (and perhaps, FLOOD) set, then the
> queuing of packets to userspace happens very often. And at startup,
> the queue (both in kernel and userspace) gets full quickly.
> This port NORMAL also causes kernel flows to be created, set,
> deleted and re-created, etc. During the time a kernel flow is
> deleted and a new one is created, packets that used to have matching
> flow now go to userspace.

I don't understand why use of NORMAL or FLOOD would increase the
number of packets to userspace.  Can you explain further?



More information about the dev mailing list