ofproto: Avoid user->kernel->user round-trip for many controller actions.
authorBen Pfaff <blp@nicira.com>
Wed, 4 Aug 2010 21:08:26 +0000 (14:08 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 27 Aug 2010 17:10:23 +0000 (10:10 -0700)
When an OpenFlow flow says to send packets to the controller, until now
ofproto has executed that using dpif_execute(), which passes the packet up
to the kernel.  The kernel queues the packet into its "action" queue, and
then later ofproto pulls the packet back down from the kernel and sends it
to the controller.

However, this is unnecessary.  Open vSwitch can just recognize in advance
that it will get the packet back and handle it directly, skipping the round
trip.  This commit implements this optimization.

This generally affects only the first packet in a flow, since generally the
rest come directly down from the kernel.  It only optimizes the "easy" case
where the first action in a flow is to send the packet to the controller,
since this seems to be the common case in the flows that I'm looking at
now.


No differences found