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_ar...@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