aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/igc/igc.h
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@intel.com>2020-04-24 13:16:12 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2020-05-22 18:21:51 -0700
commit16fdc16c6bff6764fc8c9a5f10640dfdb7ce201a (patch)
tree454edf1020b659ee536a51ae52c595076adea994 /drivers/net/ethernet/intel/igc/igc.h
parent593532668f635d19d207510e0fbb5c2250f56b6f (diff)
igc: Refactor igc_ethtool_add_nfc_rule()
Current implementation of igc_ethtool_add_nfc_rule() is quite long and a bit convoluted so this patch does a code refactoring to improve the code. Code related to NFC rule object initialization is refactored out to the local helper function igc_ethtool_init_nfc_rule(). Likewise, code related to NFC rule validation is refactored out to another local helper, igc_ethtool_is_nfc_rule_valid(). RX_CLS_FLOW_DISC check is removed since it is redundant. The macro is defined as the max value fsp->ring_cookie can have, so checking if fsp->ring_cookie >= adapter->num_rx_queues is already sufficient. Finally, some log messages are improved or added, and obvious comments are removed. Signed-off-by: Andre Guedes <andre.guedes@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igc/igc.h')
0 files changed, 0 insertions, 0 deletions