]> git.baikalelectronics.ru Git - kernel.git/commit
dpaa2-eth: fix ethtool statistics
authorIoana Ciornei <ioana.ciornei@nxp.com>
Wed, 15 Dec 2021 10:58:31 +0000 (12:58 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 16 Dec 2021 01:48:54 +0000 (17:48 -0800)
commitca4e616f1e11203c47df0b4b10d6de61b203a3d4
treee42e3401cc8d1c91fba6f67abd5094e8ad43837d
parentebb5387d40973e0bbe6a36192dccf8dba35be524
dpaa2-eth: fix ethtool statistics

Unfortunately, with the blamed commit I also added a side effect in the
ethtool stats shown. Because I added two more fields in the per channel
structure without verifying if its size is used in any way, part of the
ethtool statistics were off by 2.
Fix this by not looking up the size of the structure but instead on a
fixed value kept in a macro.

Fixes: eb2caa7be715 ("net: dpaa2: add adaptive interrupt coalescing")
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/20211215105831.290070-1-ioana.ciornei@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h
drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c