igb: dont drop packets if rx flow control is enabled
authorRobert Beckett <bob.beckett@collabora.com>
Tue, 22 Oct 2019 15:31:41 +0000 (16:31 +0100)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 31 Dec 2019 19:17:25 +0000 (11:17 -0800)
commit6506f52dcbf8c2afca47bd7a48c18459e1f04f86
tree184804277d99cd4b52e5135f39d28fa24aa5b6c0
parent9e860947d8d7a1504476ac49abfce90a4ce600f3
igb: dont drop packets if rx flow control is enabled

If Rx flow control has been enabled (via autoneg or forced), packets
should not be dropped due to Rx descriptor ring exhaustion. Instead
pause frames should be used to apply back pressure. This only applies
if VFs are not in use.

Move SRRCTL setup to its own function for easy reuse and only set drop
enable bit if Rx flow control is not enabled.

Since v1: always enable dropping of packets if VFs in use.

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igb/igb.h
drivers/net/ethernet/intel/igb/igb_ethtool.c
drivers/net/ethernet/intel/igb/igb_main.c