dpif-netdev: Delay packets' metadata initialization.
authorDaniele Di Proietto <diproiettod@vmware.com>
Fri, 29 Jan 2016 01:47:51 +0000 (17:47 -0800)
committerDaniele Di Proietto <diproiettod@vmware.com>
Wed, 3 Feb 2016 02:20:20 +0000 (18:20 -0800)
commitc649a3c51edb76926e7f76a49f869395e8ce7200
tree2ab28e30622b34a8c4e3bfa5c95f2c0a181968bf
parent3001f7199693da0fad76718c7c0ca7572ff0846a
dpif-netdev: Delay packets' metadata initialization.

When a group of packets arrives from a port, we loop through them to
initialize metadata and then we loop through them again to extract the
flow and perform the exact match classification.

This commit combines the two loops into one, and initializes packet->md
in emc_processing() to improve performance.

Since emc_processing() might also be called after recirculation (in
which case the metadata is already valid), an extra parameter is added
to support both cases.

This commits also implements simple prefetching of packet metadata,
to further improve performance.

Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Andy Zhou <azhou@ovn.org>
Acked-by: Chandran, Sugesh <sugesh.chandran@intel.com>
lib/dpif-netdev.c
lib/packets.h