]> git.proxmox.com Git - mirror_ovs.git/commit
pkt-metadata: Avoid introducing overhead for userspace tunnels.
authorJesse Gross <jesse@nicira.com>
Fri, 12 Jun 2015 19:49:23 +0000 (12:49 -0700)
committerJesse Gross <jesse@nicira.com>
Thu, 25 Jun 2015 18:08:58 +0000 (11:08 -0700)
commit9ad11dbe4c40ddbd388b8d51c416d89dda0cf380
tree992c3002e8d9673d6e5c77d92d66254ae593ff74
parent9558d2a548e18fc520c282399ff403639887173d
pkt-metadata: Avoid introducing overhead for userspace tunnels.

The addition of Geneve metadata requires a large amount of additional
space to handle the maximum set of options. In most cases, this is
not a big deal since it is only temporary storage on the stack or
can be automatically stripped out for miniflows. However, userspace
tunnels need to deal with this on a per-packet basis, so we should
avoid introducing additional overhead if possible. Two small changes
are aimed at this:

 * Move struct flow_tnl to the end of the packet metadata. Since
   the Geneve metadata is already at the end of flow_tnl and pkt_metadata
   is at the end of struct dp_packet, this avoids putting a large
   amount metadata (which might be empty) in hot cache lines.

 * Only push the new metadata into a miniflow if any options are present
   during miniflow_extract(). This does not necessarily provide the
   most fine-grained flow generation but it is a quick check and
   the userspace implementation of Geneve does not currently support
   options anyways.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/flow.c
lib/packets.h