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:25:00 +0000 (18:25 -0800)
commita90ed02611446fc7fcfc6fbf237c5c2fbe06eee3
tree3477407b33072ba5c40938b656446abf6ce34be1
parent34c3c2b755d403bc6db7cf2eca6c89e3791b6bd1
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