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>