[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241106180036.0ca3e354@kernel.org>
Date: Wed, 6 Nov 2024 18:00:36 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Stefan Wahren <wahrenst@....net>
Cc: Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
<pabeni@...hat.com>, Dan Carpenter <dan.carpenter@...aro.org>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2 net V2] net: vertexcom: mse102x: Fix tx_bytes
calculation
On Tue, 5 Nov 2024 17:35:45 +0100 Stefan Wahren wrote:
> + mse->ndev->stats.tx_bytes += max_t(unsigned int,
> + txb->len, ETH_ZLEN);
Is this enough? skb->len will include 2 bytes added by
mse102x_push_header() and 2 added by mse102x_put_footer()
(unless we went to skb_copy_expand(), which is very likely)
May be easier to save the skb->len before calling mse102x_tx_pkt_spi()
Powered by blists - more mailing lists