[ovs-git] Open vSwitch: datapath: Add compatibility with sk_buff's vlan_tci before 2.6.33. (vlan-maint)

dev at openvswitch.org dev at openvswitch.org
Mon Nov 21 19:32:11 UTC 2011


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, vlan-maint has been updated
       via  a52ae92c3993d7f1204288071c58d45013dfba58 (commit)
      from  d2f723fde889e3b922234359f1ad6046fdcb862c (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 a52ae92c3993d7f1204288071c58d45013dfba58
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=a52ae92c3993d7f1204288071c58d45013dfba58
Author: Ben Pfaff <blp at nicira.com>
		
datapath: Add compatibility with sk_buff's vlan_tci before 2.6.33.
		
Between 2.6.27 and 2.6.32, the vlan_tci member of struct sk_buff was the
raw value of the 802.1Q header's TCI field, without the CFI bit being set.
In 2.6.33 and later, the CFI bit is always set if an 802.1Q header is
present, correcting a corner case.

Until now, OVS has not consistently dealt with this.  If a packet arrived
at a datapath from a network device directly, or if it was set with an
ODP_ACTION_ATTR_SET_DL_TCI action, then the CFI bit would not be set in
vlan_tci.  In flow_extract(), OVS copies vlan_tci directly to dl_tci in the
flow structure (via vlan_get_tci()), so the CFI bit would also not be set
in dl_tci.  But if OVS had to send a packet up to userspace (converting the
vlan_tci back to an 802.1Q header along the way) and got it back, then it
would set the VLAN CFI bit in dl_tci when it parsed the 802.1Q header in
parse_vlan().  This had the effect that a flow set up by userspace (with
the CFI bit set) would never be matched by a packet arriving from a network
device, because they would have different dl_tci values.

This fixes the problem, by making the vlan_get_tci() and vlan_set_tci()
interface consistent across kernel versions.  Now, they always accept or
return a value where the VLAN CFI bit is set if an 802.1Q header is
present.

Build-tested only.

Problem isolated by Ethan Jackson <ethan at nicira.com>

Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Jesse Gross <jesse at nicira.com>
Reported-by: Ram Jothikumar <rjothikumar at nicira.com>
Bug #4915.


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

Summary of changes:
 datapath/vlan.h |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list