mirror of
https://github.com/torvalds/linux.git
synced 2026-05-01 13:02:35 -04:00
ixgbe: DCB, fix TX hang occurring in stress condition with PFC
The DCB credits refill quantum _must_ be greater than half the max packet size. This is needed to guarantee that TX DMA operations are not attempted during a pause state. Additionally, the min IFG must be set correctly for DCB mode. If a DMA operation is requested unexpectedly during the pause state the HW data store may be corrupted leading to a DMA hang. The DMA hang requires a reset to correct. This fixes the HW configuration to avoid this condition. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
affa9dfb04
commit
9806307a1c
@@ -3347,6 +3347,7 @@ static void ixgbe_napi_disable_all(struct ixgbe_adapter *adapter)
|
||||
static void ixgbe_configure_dcb(struct ixgbe_adapter *adapter)
|
||||
{
|
||||
struct ixgbe_hw *hw = &adapter->hw;
|
||||
int max_frame = adapter->netdev->mtu + ETH_HLEN + ETH_FCS_LEN;
|
||||
u32 txdctl;
|
||||
int i, j;
|
||||
|
||||
@@ -3359,8 +3360,15 @@ static void ixgbe_configure_dcb(struct ixgbe_adapter *adapter)
|
||||
if (hw->mac.type == ixgbe_mac_82598EB)
|
||||
netif_set_gso_max_size(adapter->netdev, 32768);
|
||||
|
||||
ixgbe_dcb_calculate_tc_credits(&adapter->dcb_cfg, DCB_TX_CONFIG);
|
||||
ixgbe_dcb_calculate_tc_credits(&adapter->dcb_cfg, DCB_RX_CONFIG);
|
||||
#ifdef CONFIG_FCOE
|
||||
if (adapter->netdev->features & NETIF_F_FCOE_MTU)
|
||||
max_frame = max(max_frame, IXGBE_FCOE_JUMBO_FRAME_SIZE);
|
||||
#endif
|
||||
|
||||
ixgbe_dcb_calculate_tc_credits(&adapter->dcb_cfg, max_frame,
|
||||
DCB_TX_CONFIG);
|
||||
ixgbe_dcb_calculate_tc_credits(&adapter->dcb_cfg, max_frame,
|
||||
DCB_RX_CONFIG);
|
||||
|
||||
/* reconfigure the hardware */
|
||||
ixgbe_dcb_hw_config(&adapter->hw, &adapter->dcb_cfg);
|
||||
|
||||
Reference in New Issue
Block a user