OSDN Git Service

sfc: fix build without CONFIG_RFS_ACCEL
authorJakub Kicinski <jakub.kicinski@netronome.com>
Sat, 23 Nov 2019 17:45:42 +0000 (09:45 -0800)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Sun, 24 Nov 2019 22:44:09 +0000 (14:44 -0800)
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

index 6a9347c..b31032d 100644 (file)
@@ -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)