diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2010-08-19 09:34:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-19 19:40:48 -0400 |
commit | 67ebd79141e2dd503b0bc4898d06d07f07fc2635 (patch) | |
tree | d614407fe8f8fa2a9aa42466abab17bd8065c658 | |
parent | d716a7d88549c99f9afbfc1f75dda1c390e2dc3a (diff) |
ixgbe: move setting of GSO size for 82598 into ixgbe_configure_dcb
We are unnecessarily modifying the GSO size for all HW when we don't need
to. The code can be simplified by moving the check for DCB and the
adjustment of the GSO size for 82598 into ixgbe_configure_dcb.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 5dceaf3dbb7f..fffb1ce4f6ea 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -3157,6 +3157,15 @@ static void ixgbe_configure_dcb(struct ixgbe_adapter *adapter) | |||
3157 | u32 txdctl; | 3157 | u32 txdctl; |
3158 | int i, j; | 3158 | int i, j; |
3159 | 3159 | ||
3160 | if (!(adapter->flags & IXGBE_FLAG_DCB_ENABLED)) { | ||
3161 | if (hw->mac.type == ixgbe_mac_82598EB) | ||
3162 | netif_set_gso_max_size(adapter->netdev, 65536); | ||
3163 | return; | ||
3164 | } | ||
3165 | |||
3166 | if (hw->mac.type == ixgbe_mac_82598EB) | ||
3167 | netif_set_gso_max_size(adapter->netdev, 32768); | ||
3168 | |||
3160 | ixgbe_dcb_check_config(&adapter->dcb_cfg); | 3169 | ixgbe_dcb_check_config(&adapter->dcb_cfg); |
3161 | ixgbe_dcb_calculate_tc_credits(&adapter->dcb_cfg, DCB_TX_CONFIG); | 3170 | ixgbe_dcb_calculate_tc_credits(&adapter->dcb_cfg, DCB_TX_CONFIG); |
3162 | ixgbe_dcb_calculate_tc_credits(&adapter->dcb_cfg, DCB_RX_CONFIG); | 3171 | ixgbe_dcb_calculate_tc_credits(&adapter->dcb_cfg, DCB_RX_CONFIG); |
@@ -3188,17 +3197,7 @@ static void ixgbe_configure(struct ixgbe_adapter *adapter) | |||
3188 | 3197 | ||
3189 | ixgbe_restore_vlan(adapter); | 3198 | ixgbe_restore_vlan(adapter); |
3190 | #ifdef CONFIG_IXGBE_DCB | 3199 | #ifdef CONFIG_IXGBE_DCB |
3191 | if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { | 3200 | ixgbe_configure_dcb(adapter); |
3192 | if (hw->mac.type == ixgbe_mac_82598EB) | ||
3193 | netif_set_gso_max_size(netdev, 32768); | ||
3194 | else | ||
3195 | netif_set_gso_max_size(netdev, 65536); | ||
3196 | ixgbe_configure_dcb(adapter); | ||
3197 | } else { | ||
3198 | netif_set_gso_max_size(netdev, 65536); | ||
3199 | } | ||
3200 | #else | ||
3201 | netif_set_gso_max_size(netdev, 65536); | ||
3202 | #endif | 3201 | #endif |
3203 | 3202 | ||
3204 | #ifdef IXGBE_FCOE | 3203 | #ifdef IXGBE_FCOE |