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

dev at openvswitch.org dev at openvswitch.org
Wed Mar 23 10:38:17 PDT 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, master has been updated
       via  3728652303e1d58fe67b90dfa2a07668289902c8 (commit)
      from  8fec720d1371b5a15abdc02e173c746f2b8088d9 (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 3728652303e1d58fe67b90dfa2a07668289902c8
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=3728652303e1d58fe67b90dfa2a07668289902c8
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