diff mbox series

[net-next] sfc: fix build without CONFIG_RFS_ACCEL

Message ID 20191123174542.5650-1-jakub.kicinski@netronome.com
State Accepted
Delegated to: David Miller
Headers show
Series [net-next] sfc: fix build without CONFIG_RFS_ACCEL | expand

Commit Message

Jakub Kicinski Nov. 23, 2019, 5:45 p.m. UTC
The rfs members of struct efx_channel are under CONFIG_RFS_ACCEL.
Ethtool stats which access those need to be as well.

Reported-by: kbuild test robot <lkp@intel.com>
Fixes: ca70bd423f10 ("sfc: add statistics for ARFS")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
---
 drivers/net/ethernet/sfc/ethtool.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jakub Kicinski Nov. 24, 2019, 10:45 p.m. UTC | #1
On Sat, 23 Nov 2019 09:45:42 -0800, Jakub Kicinski wrote:
> The rfs members of struct efx_channel are under CONFIG_RFS_ACCEL.
> Ethtool stats which access those need to be as well.
> 
> Reported-by: kbuild test robot <lkp@intel.com>
> Fixes: ca70bd423f10 ("sfc: add statistics for ARFS")
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>

Applied.
Edward Cree Nov. 25, 2019, 9:59 a.m. UTC | #2
On 23/11/2019 17:45, Jakub Kicinski wrote:
> The rfs members of struct efx_channel are under CONFIG_RFS_ACCEL.
> Ethtool stats which access those need to be as well.
>
> Reported-by: kbuild test robot <lkp@intel.com>
> Fixes: ca70bd423f10 ("sfc: add statistics for ARFS")
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Thanks for catching this, mea culpa for not testing that case.
-Ed
diff mbox series

Patch

diff --git a/drivers/net/ethernet/sfc/ethtool.c b/drivers/net/ethernet/sfc/ethtool.c
index 6a9347cd67f3..b31032da4bcb 100644
--- a/drivers/net/ethernet/sfc/ethtool.c
+++ b/drivers/net/ethernet/sfc/ethtool.c
@@ -90,9 +90,11 @@  static const struct efx_sw_stat_desc efx_sw_stat_desc[] = {
 	EFX_ETHTOOL_UINT_CHANNEL_STAT(rx_xdp_bad_drops),
 	EFX_ETHTOOL_UINT_CHANNEL_STAT(rx_xdp_tx),
 	EFX_ETHTOOL_UINT_CHANNEL_STAT(rx_xdp_redirect),
+#ifdef CONFIG_RFS_ACCEL
 	EFX_ETHTOOL_UINT_CHANNEL_STAT_NO_N(rfs_filter_count),
 	EFX_ETHTOOL_UINT_CHANNEL_STAT(rfs_succeeded),
 	EFX_ETHTOOL_UINT_CHANNEL_STAT(rfs_failed),
+#endif
 };
 
 #define EFX_ETHTOOL_SW_STAT_COUNT ARRAY_SIZE(efx_sw_stat_desc)