[ovs-dev] mpls and vlan qinq

KerurR at telekom.de KerurR at telekom.de
Tue Mar 20 21:45:23 UTC 2012


Inline <rk>

-----Original Message-----
From: dev-bounces at openvswitch.org [mailto:dev-bounces at openvswitch.org] On Behalf Of Jesse Gross
Sent: Tuesday, March 20, 2012 11:33 AM
To: Kerur, Ravi
Cc: dev at openvswitch.org
Subject: Re: [ovs-dev] mpls and vlan qinq

On Tue, Mar 20, 2012 at 10:19 AM,  <KerurR at telekom.de> wrote:
> Please see inline <rk>
>
> On Mon, Mar 19, 2012 at 2:14 PM,  <KerurR at telekom.de> wrote:
>> When kernel >= 2.6.37 and vlan_tpid = 0x88a8, in function netdev_send,
>> __vlan_put_tag present in OVS tree is not executed since
>> dev_supports_vlan_tx returns true. It goes through the path of
>> dev_queue_xmit which eventually calls __vlan_put_tag present in the kernel
>> source tree. Need some inputs here. For kernel < 2.6.37, things work fine. I
>> have verified it on 2.6.32 Centos 6.2 system.
>
> Are you actually seeing a problem?  What you are describing sounds
> like correct behavior - OVS is just emulating behavior of new kernels
> in that code vport-netdev.c, so on those kernels we don't need to do
> it and dev_queue_xmit() can take care of it if necessary.
>
> Note that __vlan_put_tag() always uses a TPID of 0x8100, so you can't
> use it for other values.
>
> <rk> yes for vlan qinq, when new tag need to be pushed on an existing vlan tagged packet, the outer tag can be 0x8100 or 0x88a8 and it won't work for kernel >= 2.6.37 if outer tag is 0x88a8.

The code you're modifying is a compatibility shim.  It needs to make
older kernels do what newer kernels do, so you can't change it.  On
new kernels it's also generally the case that the tag is inserted by
hardware and not this function, so you can't assume that NIC will be
able to insert a tag with an arbitrary TPID.

<rk> yes understand that. I was looking into a case in which NIC doesn't support inserting a new tag but rather relies on s/w? isn't __vlan_put_tag() the place to change it? Its not an arbitrary tpid, but a valid qinq outer tag. 

You also have to consider the effects of adding a tag on NICs that are
doing hardware offloading and may not recognize the TPID.

<rk> are you referring to TSO/LRO? 

So there's a number of cases to carefully think about beyond simply
inserting a tag with a different EtherType.

<rk> I am aware of it and agreed that it needs to be handled correctly.

_______________________________________________
dev mailing list
dev at openvswitch.org
http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list