All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH v2] igb: Fix error of RX network flow classification
@ 2017-05-27  1:17 Gangfeng
  2017-06-29  0:30 ` Brown, Aaron F
  0 siblings, 1 reply; 2+ messages in thread
From: Gangfeng @ 2017-05-27  1:17 UTC (permalink / raw)
  To: intel-wired-lan

From: Gangfeng Huang <gangfeng.huang@ni.com>

After add an ethertype filter, if user change the adapter speed several
times, the error "ethtool -N: etype filters are all used" is reported by
igb driver.

In older patch, function igb_nfc_filter_exit() and igb_nfc_filter_restore()
is not paried. igb_nfc_filter_restore() exist in igb_up(), but function
igb_nfc_filter_exit() is exist in __igb_close(). In the process of speed
changing, only igb_nfc_filter_restore() is called, it will take a position
of ethertype bitmap.

Reproduce steps:
Step 1: Add a etype filter by ethtool
$ethtool -N eth0 flow-type ether proto 0x88F8 action 1
Step 2: Change the adapter speed to 100M/full duplex
$ethtool -s eth0 speed 100 duplex full
Step 3: Change the adapter speed to 1000M/full duplex
ethtool -s eth0 speed 1000 duplex full
Repeat step2 and step3, then dmesg the system log, you can find the error
message, add new ethtype filter is also failed.

This fixing is move igb_nfc_filter_exit() from __igb_close() to igb_down()
to make igb_nfc_filter_restore()/igb_nfc_filter_exit() is paired.

Signed-off-by: Gangfeng <gangfeng.huang@ni.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 64fd230..d834765 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -1791,6 +1791,8 @@ void igb_down(struct igb_adapter *adapter)
 	wr32(E1000_RCTL, rctl & ~E1000_RCTL_EN);
 	/* flush and sleep below */
 
+	igb_nfc_filter_exit(adapter);
+
 	netif_carrier_off(netdev);
 	netif_tx_stop_all_queues(netdev);
 
@@ -3317,8 +3319,6 @@ static int __igb_close(struct net_device *netdev, bool suspending)
 	igb_down(adapter);
 	igb_free_irq(adapter);
 
-	igb_nfc_filter_exit(adapter);
-
 	igb_free_all_tx_resources(adapter);
 	igb_free_all_rx_resources(adapter);
 
-- 
2.7.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Intel-wired-lan] [PATCH v2] igb: Fix error of RX network flow classification
  2017-05-27  1:17 [Intel-wired-lan] [PATCH v2] igb: Fix error of RX network flow classification Gangfeng
@ 2017-06-29  0:30 ` Brown, Aaron F
  0 siblings, 0 replies; 2+ messages in thread
From: Brown, Aaron F @ 2017-06-29  0:30 UTC (permalink / raw)
  To: intel-wired-lan

> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf
> Of Gangfeng
> Sent: Friday, May 26, 2017 6:18 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Gangfeng Huang <gangfeng.huang@ni.com>
> Subject: [Intel-wired-lan] [PATCH v2] igb: Fix error of RX network flow
> classification
> 
> From: Gangfeng Huang <gangfeng.huang@ni.com>
> 
> After add an ethertype filter, if user change the adapter speed several
> times, the error "ethtool -N: etype filters are all used" is reported by
> igb driver.
> 
> In older patch, function igb_nfc_filter_exit() and igb_nfc_filter_restore()
> is not paried. igb_nfc_filter_restore() exist in igb_up(), but function
> igb_nfc_filter_exit() is exist in __igb_close(). In the process of speed
> changing, only igb_nfc_filter_restore() is called, it will take a position
> of ethertype bitmap.
> 
> Reproduce steps:
> Step 1: Add a etype filter by ethtool
> $ethtool -N eth0 flow-type ether proto 0x88F8 action 1
> Step 2: Change the adapter speed to 100M/full duplex
> $ethtool -s eth0 speed 100 duplex full
> Step 3: Change the adapter speed to 1000M/full duplex
> ethtool -s eth0 speed 1000 duplex full
> Repeat step2 and step3, then dmesg the system log, you can find the error
> message, add new ethtype filter is also failed.
> 
> This fixing is move igb_nfc_filter_exit() from __igb_close() to igb_down()
> to make igb_nfc_filter_restore()/igb_nfc_filter_exit() is paired.
> 
> Signed-off-by: Gangfeng <gangfeng.huang@ni.com>
> ---
>  drivers/net/ethernet/intel/igb/igb_main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Tested-by: Aaron Brown <aaron.f.brown@intel.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-29  0:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-27  1:17 [Intel-wired-lan] [PATCH v2] igb: Fix error of RX network flow classification Gangfeng
2017-06-29  0:30 ` Brown, Aaron F

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.