[ovs-git] Open vSwitch: datapath/flow_netlink: Create right mask with disabled megaflows (master)

dev at openvswitch.org dev at openvswitch.org
Fri Jul 11 18:04:58 UTC 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, master has been updated
       via  62974663fe9711d4c143fe192985ec7a17982c37 (commit)
      from  c7d084d6a5dd09b125ae1794a44e7c59db1762f5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 62974663fe9711d4c143fe192985ec7a17982c37
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=62974663fe9711d4c143fe192985ec7a17982c37
Author: Daniele Di Proietto <ddiproietto at vmware.com>
		
datapath/flow_netlink: Create right mask with disabled megaflows
		
If megaflows are disabled, the userspace does not send the netlink attribute
OVS_FLOW_ATTR_MASK, and the kernel must create an exact match mask.

sw_flow_mask_set() sets every bytes (in 'range') of the mask to 0xff, even the
bytes that represent padding for struct sw_flow, or the bytes that represent
fields that may not be set during ovs_flow_extract().
This is a problem, because when we extract a flow from a packet,
we do not memset() anymore the struct sw_flow to 0 (since commit 9cef26ac6a71).

This commit gets rid of sw_flow_mask_set() and introduces mask_set_nlattr(),
which operates on the netlink attributes rather than on the mask key. Using
this approach we are sure that only the bytes that the user provided in the
flow are matched.

Also, if the parse_flow_mask_nlattrs() for the mask ENCAP attribute fails, we
now return with an error.

Reported-by: Alex Wang <alexw at nicira.com>
Suggested-by: Pravin B Shelar <pshelar at nicira.com>
Signed-off-by: Daniele Di Proietto <ddiproietto at vmware.com>
Acked-by: Pravin B Shelar <pshelar at nicira.com>


-----------------------------------------------------------------------

Summary of changes:
 datapath/flow_netlink.c |   76 +++++++++++++++++++++++++++++++++--------------
 1 file changed, 53 insertions(+), 23 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list