]> www.infradead.org Git - users/dwmw2/linux.git/commit
net: enetc: correct rx_bytes statistics of XDP
authorWei Fang <wei.fang@nxp.com>
Fri, 2 Jun 2023 09:46:59 +0000 (17:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jun 2023 09:15:17 +0000 (11:15 +0200)
commita22c0a03463075e75464ec627fb6175eaa6a263b
treed586ad38b70090b11dbd0aa68a579047d7f726db
parentb3fc768a746bf5da0bffe9a1d525c61a3208b56c
net: enetc: correct rx_bytes statistics of XDP

[ Upstream commit fdebd850cc065495abf1d64756496050bb22db67 ]

The rx_bytes statistics of XDP are always zero, because rx_byte_cnt
is not updated after it is initialized to 0. So fix it.

Fixes: d1b15102dd16 ("net: enetc: add support for XDP_DROP and XDP_PASS")
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/freescale/enetc/enetc.c