Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273529
b: refs/heads/master
c: b120818
h: refs/heads/master
i:
  273527: 4e5cbe1
v: v3
  • Loading branch information
John Fastabend authored and Jeff Kirsher committed Nov 2, 2011
1 parent 564605e commit ec79372
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 93d3ce8fafb888702311fc8c5917faa4c25b8266
refs/heads/master: b120818e652965669d3f1abaeaa5c3ccdfb28126
33 changes: 12 additions & 21 deletions trunk/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3345,34 +3345,25 @@ static void ixgbe_configure_dcb(struct ixgbe_adapter *adapter)

hw->mac.ops.set_vfta(&adapter->hw, 0, 0, true);

/* reconfigure the hardware */
if (adapter->dcbx_cap & DCB_CAP_DCBX_VER_CEE) {
#ifdef IXGBE_FCOE
if (adapter->netdev->features & NETIF_F_FCOE_MTU)
max_frame = max(max_frame, IXGBE_FCOE_JUMBO_FRAME_SIZE);
if (adapter->netdev->features & NETIF_F_FCOE_MTU)
max_frame = max(max_frame, IXGBE_FCOE_JUMBO_FRAME_SIZE);
#endif

/* reconfigure the hardware */
if (adapter->dcbx_cap & DCB_CAP_DCBX_VER_CEE) {
ixgbe_dcb_calculate_tc_credits(hw, &adapter->dcb_cfg, max_frame,
DCB_TX_CONFIG);
ixgbe_dcb_calculate_tc_credits(hw, &adapter->dcb_cfg, max_frame,
DCB_RX_CONFIG);
ixgbe_dcb_hw_config(hw, &adapter->dcb_cfg);
} else {
struct net_device *dev = adapter->netdev;

if (adapter->ixgbe_ieee_ets) {
struct ieee_ets *ets = adapter->ixgbe_ieee_ets;
int max_frame = dev->mtu + ETH_HLEN + ETH_FCS_LEN;

ixgbe_dcb_hw_ets(&adapter->hw, ets, max_frame);
}

if (adapter->ixgbe_ieee_pfc) {
struct ieee_pfc *pfc = adapter->ixgbe_ieee_pfc;
u8 *prio_tc = adapter->ixgbe_ieee_ets->prio_tc;

ixgbe_dcb_hw_pfc_config(&adapter->hw, pfc->pfc_en,
prio_tc);
}
} else if (adapter->ixgbe_ieee_ets && adapter->ixgbe_ieee_pfc) {
ixgbe_dcb_hw_ets(&adapter->hw,
adapter->ixgbe_ieee_ets,
max_frame);
ixgbe_dcb_hw_pfc_config(&adapter->hw,
adapter->ixgbe_ieee_pfc->pfc_en,
adapter->ixgbe_ieee_ets->prio_tc);
}

/* Enable RSS Hash per TC */
Expand Down

0 comments on commit ec79372

Please sign in to comment.