public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail•com>
To: Armin Wolf <W_Armin@gmx•de>, davem@davemloft•net
Cc: netdev@vger•kernel.org, joe@perches•com
Subject: Re: [PATCH net-next] lib8390: Use eth_skb_pad()
Date: Sat, 14 Nov 2020 13:03:20 -0800	[thread overview]
Message-ID: <044e6281-5f1e-9b4b-e283-0f37583a16ff@gmail.com> (raw)
In-Reply-To: <20201112163134.11880-1-W_Armin@gmx.de>



On 11/12/2020 8:31 AM, Armin Wolf wrote:
> Use eth_skb_pad() instead of a custom padding solution
> and replace associated variables with skb->* expressions.
> 
> Signed-off-by: Armin Wolf <W_Armin@gmx•de>
> ---

[snip]

> @@ -407,8 +404,8 @@ static netdev_tx_t __ei_start_xmit(struct sk_buff *skb,
>  	spin_unlock(&ei_local->page_lock);
>  	enable_irq_lockdep_irqrestore(dev->irq, &flags);
>  	skb_tx_timestamp(skb);
> +	dev->stats.tx_bytes += skb->len;
>  	dev_consume_skb_any(skb);
> -	dev->stats.tx_bytes += send_length;

There is nothing wrong here with the existing code and you could avoid
an use-after-free if not careful, I would personally keep the existing
code which appears to be just fine.
-- 
Florian

      parent reply	other threads:[~2020-11-14 21:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-12 16:31 [PATCH net-next] lib8390: Use eth_skb_pad() Armin Wolf
2020-11-14 20:56 ` Jakub Kicinski
2020-11-14 21:03 ` Florian Fainelli [this message]

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=044e6281-5f1e-9b4b-e283-0f37583a16ff@gmail.com \
    --to=f.fainelli@gmail$(echo .)com \
    --cc=W_Armin@gmx$(echo .)de \
    --cc=davem@davemloft$(echo .)net \
    --cc=joe@perches$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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