aboutsummaryrefslogtreecommitdiffstats
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:17 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2020-05-22 18:21:51 -0700
commitd957c6010a907d86d41d1bee024a9827e385c4fa (patch)
treed604bbfb7483cd2268a863c5d8bc86a2e80db1aa /drivers/net/ethernet/intel/igc/igc.h
parentigc: Fix NFC rules with multicast addresses (diff)
downloadlinux-dev-d957c6010a907d86d41d1bee024a9827e385c4fa.tar.xz
linux-dev-d957c6010a907d86d41d1bee024a9827e385c4fa.zip
igc: Fix NFC rules restoration
When network interface is brought up, the driver re-enables the NFC rules previously configured. However, this is done in reverse order the rules were added and hardware filters are configured differently. For example, consider the following rules: $ ethtool -N eth0 flow-type ether dst 00:00:00:00:00:AA queue 0 $ ethtool -N eth0 flow-type ether dst 00:00:00:00:00:BB queue 1 $ ethtool -N eth0 flow-type ether dst 00:00:00:00:00:CC queue 2 $ ethtool -N eth0 flow-type ether dst 00:00:00:00:00:DD queue 3 RAL/RAH registers are configure so filter index 1 has address ending with AA, filter index 2 has address ending in BB, and so on. If we bring the interface down and up again, RAL/RAH registers are configured so filter index 1 has address ending in DD, filter index 2 has CC, and so on. IOW, in reverse order we had before bringing the interface down. This issue can be fixed by traversing adapter->nfc_rule_list in backwards when restoring the rules. Since hlist doesn't support backwards traversal, this patch replaces it by list_head and fixes igc_restore_nfc_rules() accordingly. 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')
-rw-r--r--drivers/net/ethernet/intel/igc/igc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h
index ae7d48070ee2..76bc3a51ad70 100644
--- a/drivers/net/ethernet/intel/igc/igc.h
+++ b/drivers/net/ethernet/intel/igc/igc.h
@@ -191,7 +191,7 @@ struct igc_adapter {
* nfc_rule_lock.
*/
spinlock_t nfc_rule_lock;
- struct hlist_head nfc_rule_list;
+ struct list_head nfc_rule_list;
unsigned int nfc_rule_count;
u8 rss_indir_tbl[IGC_RETA_SIZE];
@@ -461,7 +461,7 @@ struct igc_nfc_filter {
};
struct igc_nfc_rule {
- struct hlist_node nfc_node;
+ struct list_head list;
struct igc_nfc_filter filter;
u32 location;
u16 action;