[next-queue,v4,1/8] igb: Fix not adding filter elements to the list

Message ID 20180308003713.29195-2-vinicius.gomes@intel.com
State Changes Requested
Delegated to: Jeff Kirsher
Headers show
  • igb: offloading of receive filters
Related show

Commit Message

Vinicius Costa Gomes March 8, 2018, 12:37 a.m.
Because the order of the parameters passes to 'hlist_add_behind()' was
inverted, the 'parent' node was added "behind" the 'input', as input
is not in the list, this causes the 'input' node to be lost.

Fixes: 0e71def25281 ("igb: add support of RX network flow classification")
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
 drivers/net/ethernet/intel/igb/igb_ethtool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index 606e6761758f..143f0bb34e4d 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -2864,7 +2864,7 @@  static int igb_update_ethtool_nfc_entry(struct igb_adapter *adapter,
 	/* add filter to the list */
 	if (parent)
-		hlist_add_behind(&parent->nfc_node, &input->nfc_node);
+		hlist_add_behind(&input->nfc_node, &parent->nfc_node);
 		hlist_add_head(&input->nfc_node, &adapter->nfc_filter_list);