ofproto-dpif-xlate: Make xlate_actions() caller supply flow_wildcards.
authorBen Pfaff <blp@nicira.com>
Fri, 31 Jul 2015 20:15:52 +0000 (13:15 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 31 Jul 2015 20:33:22 +0000 (13:33 -0700)
commit49a73e0cec940ac0c66f70b45c911aed85e55279
tree5ec5917d887b370246e2b9d32b74b96b07e0660c
parented5648b72879a13b6e82335c5be47a79889a42b8
ofproto-dpif-xlate: Make xlate_actions() caller supply flow_wildcards.

Until now, struct xlate_out has embedded a struct flow_wildcards, which
xlate_actions() filled in during the flow translation process (unless this
was disabled with xin->skip_wildcards, which in classifier microbenchmarks
saves significant time).  This commit removes the embedded flow_wildcards
and 'skip_wildcards', instead putting a pointer to a flow_wildcards into
struct xlate_in, for a caller to fill in with a pointer to its own
structure if desired.

One reason for this change is performance.  Until now, the userspace slow
path has done a full copy of a struct flow_wildcards for each upcall in
upcall_cb().  This commit eliminates that copy.  I don't know whether this
has a measurable performance impact; it may, because struct flow copies
had a noticeable cost in slow-path stress tests even when struct flow was
half its current size.

This commit also eliminates a large data structure from struct xlate_out,
reducing the cost of the initialization of that structure at the beginning
of xlate_actions().  However, there is more size reduction to come in
later commits.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
ofproto/ofproto-dpif-upcall.c
ofproto/ofproto-dpif-xlate.c
ofproto/ofproto-dpif-xlate.h
ofproto/ofproto-dpif.c