On Tue, Mar 20, 2012 at 2:45 PM, <ker...@telekom.de> wrote: > Inline <rk> > > -----Original Message----- > From: dev-boun...@openvswitch.org [mailto:dev-boun...@openvswitch.org] On > Behalf Of Jesse Gross > Sent: Tuesday, March 20, 2012 11:33 AM > To: Kerur, Ravi > Cc: dev@openvswitch.org > Subject: Re: [ovs-dev] mpls and vlan qinq > > On Tue, Mar 20, 2012 at 10:19 AM, <ker...@telekom.de> wrote: >> Please see inline <rk> >> >> On Mon, Mar 19, 2012 at 2:14 PM, <ker...@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.
To NICs that only recognize 0x8100, 0x8a88 is an arbitrary TPID in the sense that it has no meaning to them. The function that you're modifying is a copy of a function in the upstream kernel. If you modify it then the change won't have an effect on new kernels, as you are seeing. Since there is no existing infrastructure for QinQ, you're going to have to add logic beyond simply inserting the tag, which is unlikely to fit neatly into __vlan_put_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? TSO, checksum offload, vlan tag insertion. LRO is on receive so it won't be affected by this. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev