[ovs-dev] [PATCH 7/7] meta-flow: Add mf_mask_subfield_wc()

Ben Pfaff blp at nicira.com
Wed Feb 12 01:43:58 UTC 2014


On Tue, Feb 11, 2014 at 04:30:49PM -0800, Jarno Rajahalme wrote:
> The code setting wc masks shows up in 'perf' reports.  This patch streamlines
> the code and avoids setting the mask bits for registers or metadata, as
> those fields do not exist on datapaths.
> 
> Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>

In mf_mask_subfield_wc(), for MFF_IN_PORT and MFF_IN_PORT_OXM, I would
set the whole field unconditionally to all-1-bits.  (We don't allow
bitwise matching on input ports and I hope we never do.)  Same for
MFF_ETH_TYPE, although bitwise matching there is a little less crazy.

There's an extra space on this line:
        bitwise_one (&value, field->n_bytes, sf->ofs, sf->n_bits);

Acked-by: Ben Pfaff <blp at nicira.com>



More information about the dev mailing list