From: Florian Fainelli <f.fainelli@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
vivien.didelot@savoirfairelinux.com,
jerome.oufella@savoirfairelinux.com, linux@roeck-us.net,
andrew@lunn.ch, cphealy@gmail.com, mathieu@codeaurora.org,
jonasj76@gmail.com, andrey.volkov@nexvision.fr,
Chris.Packham@alliedtelesis.co.nz
Subject: Re: [PATCH net-next 0/3] net: Switch tag HW extraction/insertion
Date: Fri, 31 Jul 2015 10:05:10 -0700 [thread overview]
Message-ID: <55BBAAC6.5070706@gmail.com> (raw)
In-Reply-To: <1438322920.20182.144.camel@edumazet-glaptop2.roam.corp.google.com>
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@davemloft.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
next prev parent reply other threads:[~2015-07-31 17:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-29 22:32 [PATCH net-next 0/3] net: Switch tag HW extraction/insertion Florian Fainelli
2015-07-29 22:32 ` [PATCH net-next 1/3] net: add flags for HW assisted extraction/insertions of switch tags Florian Fainelli
2015-07-29 22:32 ` [PATCH net-next 2/3] net: dsa: tag_brcm: Support extracting tags from HW Florian Fainelli
2015-07-29 22:32 ` [PATCH net-next 3/3] net: systemport: Add support for switch tag HW extraction Florian Fainelli
2015-07-30 21:19 ` [PATCH net-next 0/3] net: Switch tag HW extraction/insertion David Miller
2015-07-30 22:51 ` David Miller
2015-07-30 23:18 ` Florian Fainelli
2015-07-31 1:51 ` Florian Fainelli
2015-07-31 4:24 ` Chris Packham
2015-07-31 6:08 ` Eric Dumazet
2015-07-31 17:05 ` Florian Fainelli [this message]
2015-07-31 22:24 ` 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=55BBAAC6.5070706@gmail.com \
--to=f.fainelli@gmail.com \
--cc=Chris.Packham@alliedtelesis.co.nz \
--cc=andrew@lunn.ch \
--cc=andrey.volkov@nexvision.fr \
--cc=cphealy@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=jerome.oufella@savoirfairelinux.com \
--cc=jonasj76@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mathieu@codeaurora.org \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.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).