lib/flow: Introduce miniflow_extract().
authorJarno Rajahalme <jrajahalme@nicira.com>
Fri, 18 Apr 2014 15:26:56 +0000 (08:26 -0700)
committerJarno Rajahalme <jrajahalme@nicira.com>
Fri, 18 Apr 2014 15:33:12 +0000 (08:33 -0700)
commit419681daf125576d25839eaefbb179b65e19c091
treee2977794744db61b6e16de608f7d538c4d89b811
parent5b23ff7e7da56ee6fad43fe967f1b2a5beeb4893
lib/flow: Introduce miniflow_extract().

miniflow_extract() extracts packet headers directly to a miniflow,
which is a compressed form of the struct flow.  This does not require
a large struct to be cleared to begin with, and accesses less memory.
These performance benefits should allow this to be used in the DPDK
datapath.

miniflow_extract() takes a miniflow as an input/output parameter.  On
input the buffer for values to be extracted must be properly
initialized.  On output the map contains ones for all the fields that
have been extracted.

Some struct flow fields are reordered to make miniflow_extract to
progress in the logical order.

Some explicit "inline" keywords are necessary for GCC to optimize this
properly.  Also, macros are used for same reason instead of inline
functions for pushing data to the miniflow.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Reviewed-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
lib/byte-order.h
lib/flow.c
lib/flow.h
lib/match.c
lib/nx-match.c
lib/ofp-util.c
lib/packets.h
ofproto/ofproto-dpif-xlate.c