Re: [PATCH 2/2 net V2] net: vertexcom: mse102x: Fix tx_bytes calculation

From: Jakub Kicinski
Date: Wed Nov 06 2024 - 21:05:42 EST


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()