From: Patrick McHardy <kaber@trash.net>
To: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH] be2net: Adding support for 802.1ad (q-in-q mode)
Date: Thu, 23 Jul 2009 11:25:53 +0200 [thread overview]
Message-ID: <4A682CA1.8030706@trash.net> (raw)
In-Reply-To: <20090723092036.GB1761@serverengines.com>
Sarveshwar Bandi wrote:
> On 23/07/09 11:07 +0200, Patrick McHardy wrote:
>>> Patch has code to check if the controller is in q-in-q mode. When the packet
>>> has two vids, only the inner vid is passed onto the stack. The stack is never
>>> made aware of the outer vid.
>>
>> But you're still using the outer VLAN group when passing the packet to
>> the VLAN code, so the association to the correct VLAN device can't work.
>
> In the case where packet comes with two vlan ids, the rx descriptor contains
> the inner vlan id and qnq is set to 1, the driver indicates this vid to the
> stack.
> In the case where packet comes with single vlan id, the rx descriptor
> contains the outer vlan id and qnq is set to 0, the driver indicates this
> packet as a non-vlan packet to the stack by calling netif_receive_skb.
I understand that. But the driver does:
if (vtp) {
if (!adapter->vlan_grp || adapter->num_vlans == 0) {
kfree_skb(skb);
return;
}
vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp);
vid = be16_to_cpu(vid);
vlan_hwaccel_receive_skb(skb, adapter->vlan_grp, vid);
}
adapter->vlan_grp will always be the VLAN group associated directly with
the device, which is the group for the outer tag, not the inner one. So
this can't properly associate packets with the correct VLAN device.
next prev parent reply other threads:[~2009-07-23 9:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-23 8:26 [PATCH] be2net: Adding support for 802.1ad (q-in-q mode) Sarveshwar Bandi
2009-07-23 8:47 ` Patrick McHardy
2009-07-23 9:02 ` Sarveshwar Bandi
2009-07-23 9:07 ` Patrick McHardy
2009-07-23 9:20 ` Sarveshwar Bandi
2009-07-23 9:25 ` Patrick McHardy [this message]
2009-07-23 9:45 ` Sarveshwar Bandi
2009-07-23 9:48 ` Patrick McHardy
2009-07-23 10:05 ` Sarveshwar Bandi
2009-07-23 10:12 ` Patrick McHardy
2009-07-23 16:23 ` David Miller
2009-07-23 16:33 ` Patrick McHardy
2009-07-23 17:01 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A682CA1.8030706@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sarveshwarb@serverengines.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).