From: Vladimir Oltean <olteanv@gmail.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: netdev@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org>,
Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next 0/5] Simplifications for Broadcom and Realtek DSA taggers
Date: Wed, 11 May 2022 18:22:41 +0300 [thread overview]
Message-ID: <20220511152241.nl2vrj3wtktpzwks@skbuf> (raw)
In-Reply-To: <20220511151431.780120-1-vladimir.oltean@nxp.com>
On Wed, May 11, 2022 at 06:14:26PM +0300, Vladimir Oltean wrote:
> This series contains the removal of some "if" conditions from the TX hot
> path in tag_brcm and tag_rtl4_a. This is made possible by the fact that
> the DSA core has previously checked that memory allocations are not
> necessary, so there is nothing that can fail.
>
> Vladimir Oltean (5):
> net: dsa: tag_rtl4_a: __skb_put_padto() can never fail
> net: dsa: tag_brcm: do not account for tag length twice when padding
> net: dsa: tag_brcm: __skb_put_padto() can never fail
> net: dsa: tag_brcm: eliminate conditional based on offset from
> brcm_tag_xmit_ll
> net: dsa: tag_brcm: use dsa_etype_header_pos_tx for legacy tag
>
> net/dsa/tag_brcm.c | 51 +++++++++++++++++++-------------------------
> net/dsa/tag_rtl4_a.c | 4 +---
> 2 files changed, 23 insertions(+), 32 deletions(-)
>
> --
> 2.25.1
>
Oh, wait, the premise behind patches 1 and 3 is invalid.
dsa_realloc_skb() only ensures there are ETH_ZLEN bytes of space in the
skb for tail taggers.
if (unlikely(needed_tailroom && skb->len < ETH_ZLEN))
needed_tailroom += ETH_ZLEN - skb->len;
Please treat the patch set as RFC, if we have agreement on the overall
idea I can update dsa_realloc_skb() by removing "needed_tailroom && "
from the check so the guarantee applies to all taggers.
next prev parent reply other threads:[~2022-05-11 15:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 15:14 [PATCH net-next 0/5] Simplifications for Broadcom and Realtek DSA taggers Vladimir Oltean
2022-05-11 15:14 ` [PATCH net-next 1/5] net: dsa: tag_rtl4_a: __skb_put_padto() can never fail Vladimir Oltean
2022-05-13 20:35 ` Linus Walleij
2022-05-11 15:14 ` [PATCH net-next 2/5] net: dsa: tag_brcm: do not account for tag length twice when padding Vladimir Oltean
2022-05-11 15:14 ` [PATCH net-next 3/5] net: dsa: tag_brcm: __skb_put_padto() can never fail Vladimir Oltean
2022-05-11 15:14 ` [PATCH net-next 4/5] net: dsa: tag_brcm: eliminate conditional based on offset from brcm_tag_xmit_ll Vladimir Oltean
2022-05-11 15:14 ` [PATCH net-next 5/5] net: dsa: tag_brcm: use dsa_etype_header_pos_tx for legacy tag Vladimir Oltean
2022-05-11 15:22 ` Vladimir Oltean [this message]
2022-05-11 15:23 ` [PATCH net-next 0/5] Simplifications for Broadcom and Realtek DSA taggers Florian Fainelli
2022-05-11 15:26 ` Vladimir Oltean
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=20220511152241.nl2vrj3wtktpzwks@skbuf \
--to=olteanv@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vivien.didelot@gmail.com \
--cc=vladimir.oltean@nxp.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