[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110403132228.GA2737@psychotron.redhat.com>
Date: Sun, 3 Apr 2011 15:22:29 +0200
From: Jiri Pirko <jpirko@...hat.com>
To: Nicolas de Pesloüan
<nicolas.2p.debian@...il.com>
Cc: Stephen Hemminger <shemminger@...ux-foundation.org>,
netdev@...r.kernel.org, davem@...emloft.net, kaber@...sh.net,
fubar@...ibm.com, eric.dumazet@...il.com, andy@...yhouse.net,
xiaosuo@...il.com, jesse@...ira.com
Subject: Re: [patch net-next-2.6] net: vlan: make non-hw-accel rx path
similar to hw-accel
Sun, Apr 03, 2011 at 11:27:29AM CEST, nicolas.2p.debian@...il.com wrote:
>Le 02/04/2011 20:27, Jiri Pirko a écrit :
>>Sat, Apr 02, 2011 at 05:55:24PM CEST, shemminger@...ux-foundation.org wrote:
>>>On Sat, 2 Apr 2011 12:26:06 +0200
>>>Jiri Pirko<jpirko@...hat.com> wrote:
><snip>
>>>>+ rawp = skb->data;
>>>>+ if (*(unsigned short *) rawp == 0xFFFF)
>>>>+ /*
>>>>+ * This is a magic hack to spot IPX packets. Older Novell
>>>>+ * breaks the protocol design and runs IPX over 802.3 without
>>>>+ * an 802.2 LLC layer. We look for FFFF which isn't a used
>>>>+ * 802.2 SSAP/DSAP. This won't work for fault tolerant netware
>>>>+ * but does for the rest.
>>>>+ */
>>>>+ skb->protocol = htons(ETH_P_802_3);
>>>>+ else
>>>>+ /*
>>>>+ * Real 802.2 LLC
>>>>+ */
>>>>+ skb->protocol = htons(ETH_P_802_2);
>>>>+}
>>>
>>>What about doublely tagged packets?
>>
>>No problem. Once they are untagged and reinjected they are untagged
>>again and reinjected again:
>>
>>-> __netif_reveive_skb
>>vlan_untag
>>vlan_do_receive
>>-> __netif_receive_skb
>>vlan_untag
>>vlan_do_receive
>
>Hi Jiri,
>
>Instead of untagging and reinjecting, wouldn't it be possible to
>remove all 802.1Q headers in a loop and directly deliver the untagged
>skb? Are there any hw-accel implementations that remove several level
>of tagging?
Makes no sense to untag multiple tags in loop at once. For each tag you
need to call vlan_do_receive so the frame could be properly processed by
vlan code.
I'm not aware of a possibility of hwaccel to untag multiple tags at
once. Honestly I cannot imagine how that could be handled (maybe setting
array of vlan_tcis).
Jirka
>
> Nicolas.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists