datapath: Add tunnel header caching.
authorJesse Gross <jesse@nicira.com>
Fri, 27 Aug 2010 20:55:02 +0000 (13:55 -0700)
committerJesse Gross <jesse@nicira.com>
Wed, 22 Sep 2010 20:43:02 +0000 (13:43 -0700)
commit842cf6f472b236b6e61be04b41970116245b1759
treeca1eb4e5b0e4bf23a14f451e149e76c9e3540270
parent7c79397fe8ff52eb9cfe4d32a9d1f8b2f23c45c8
datapath: Add tunnel header caching.

On the transmit path we generate essentially the same tunnel header
for every packet to a given destination.  However, each packet must
have the headers assembled in pieces, lookup the destination in the
routing table, and lookup the flow in OVS.  This avoids that extra
work by caching all of the header and output path information and
only rebuilding it when something actually changes.

This optimization reduces CPU load on transmit by approximately 13%.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Reviewed-by: Ben Pfaff <blp@nicira.com>
datapath/tunnel.c
datapath/tunnel.h
datapath/vport-capwap.c
datapath/vport-gre.c
include/openvswitch/tunnel.h