[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55BBAAC6.5070706@gmail.com>
Date: Fri, 31 Jul 2015 10:05:10 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>
CC: David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, vivien.didelot@...oirfairelinux.com,
jerome.oufella@...oirfairelinux.com, linux@...ck-us.net,
andrew@...n.ch, cphealy@...il.com, mathieu@...eaurora.org,
jonasj76@...il.com, andrey.volkov@...vision.fr,
Chris.Packham@...iedtelesis.co.nz
Subject: Re: [PATCH net-next 0/3] net: Switch tag HW extraction/insertion
On 30/07/15 23:08, Eric Dumazet wrote:
> On Thu, 2015-07-30 at 18:51 -0700, Florian Fainelli wrote:
>> On 30/07/15 15:51, David Miller wrote:
>>> From: David Miller <davem@...emloft.net>
>>> Date: Thu, 30 Jul 2015 14:19:35 -0700 (PDT)
>>>
>>>> This looks fine, series applied, thanks.
>>>
>>> I think your control block is too large, you'll need to rework this
>>> somehow.
>>
>> So napi_gro_cb really is 48 bytes on 64-bits architectures (had not
>> realized it was so big).
>>
>> What would you recommend to do here considering that this driver is
>> currently used on 32-bits platforms, but I see no reason why someone
>> would no want to use this feature on a 64-bit platform, yet we are
>> competing with napi_gro_cb, and adding a new skbuff member is pretty
>> much a no-no? Would it be acceptable to have a new member which is ifdef
>> CONFIG_NET_DSA_TAG_BRCM?
>>
>> FWIW, this does provide a small 2-3% throughput increase for RX.
>
> Which layer will read this tag after GRO processing ?
DSA would read this tag, but in general any ethertype hook using
packet_type would be in the same boat.
>
> It seems you simply can use skb->cb[] like other layers : At offset 0.
>
> BTW brcm_tag_rcv() does not even use GRO, as it calls
> netif_receive_skb()
That is right here, we will come from the RX processing of a driver that
might use napi_gro_receive, as it turns out the sequence looks like this
here:
bcm_sysport_desc_rx()
-> extract tag
eth_type_trans() sets skb->protocol to ETH_P_XDSA
napi_gro_receive(), sets skb->cb to napi_gro_cb
-> walk the list of packet_type find the one for ETH_P_XDSA
-> brcm_tag_rcv()
BTW, there is no build time assertion that napi_gro_cb is not exceeding
skb->cb right now, even though they both have the same size on 64-bits,
should we have one?
--
Florian
--
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