diff options
author | Yi Zou <yi.zou@intel.com> | 2009-09-03 14:55:50 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-03 20:01:51 -0700 |
commit | 8de8b2e63490fe7e90128299983198d09d1679c9 (patch) | |
tree | 480782ed477329516f583a08d3ce6dd0eac21d01 /drivers/net/ixgbe/ixgbe_dcb_nl.c | |
parent | ae641bdc264a5998b7872622c86f0690a5b1c5b5 (diff) |
ixgbe: Add support for multiple Tx queues for FCoE in 82599
This patch adds support for multiple transmit queues to the Fiber Channel
over Ethernet (FCoE) feature found in 82599. Currently, FCoE has multiple
Rx queues available, along with a redirection table, that helps distribute
the I/O load across multiple CPUs based on the FC exchange ID. To make
this the most effective, we need to provide the same layout of transmit
queues to match receive.
Particularly, when Data Center Bridging (DCB) is enabled, the designated
traffic class for FCoE can have dedicated queues for just FCoE traffic,
while not affecting any other type of traffic flow.
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_dcb_nl.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_dcb_nl.c | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c index 47d9dde82a8a..a6bc1ef28f92 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c @@ -36,6 +36,7 @@ #define BIT_PFC 0x02 #define BIT_PG_RX 0x04 #define BIT_PG_TX 0x08 +#define BIT_APP_UPCHG 0x10 #define BIT_RESETLINK 0x40 #define BIT_LINKSPEED 0x80 @@ -348,8 +349,14 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev) while (test_and_set_bit(__IXGBE_RESETTING, &adapter->state)) msleep(1); - if (netif_running(netdev)) - ixgbe_down(adapter); + if (adapter->dcb_set_bitmap & BIT_APP_UPCHG) { + if (netif_running(netdev)) + netdev->netdev_ops->ndo_stop(netdev); + ixgbe_clear_interrupt_scheme(adapter); + } else { + if (netif_running(netdev)) + ixgbe_down(adapter); + } } ret = ixgbe_copy_dcb_cfg(&adapter->temp_dcb_cfg, &adapter->dcb_cfg, @@ -373,8 +380,14 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev) } if (adapter->dcb_set_bitmap & BIT_RESETLINK) { - if (netif_running(netdev)) - ixgbe_up(adapter); + if (adapter->dcb_set_bitmap & BIT_APP_UPCHG) { + ixgbe_init_interrupt_scheme(adapter); + if (netif_running(netdev)) + netdev->netdev_ops->ndo_open(netdev); + } else { + if (netif_running(netdev)) + ixgbe_up(adapter); + } ret = DCB_HW_CHG_RST; } else if (adapter->dcb_set_bitmap & BIT_PFC) { if (adapter->hw.mac.type == ixgbe_mac_82598EB) @@ -526,8 +539,20 @@ static u8 ixgbe_dcbnl_setapp(struct net_device *netdev, switch (idtype) { case DCB_APP_IDTYPE_ETHTYPE: #ifdef IXGBE_FCOE - if (id == ETH_P_FCOE) - rval = ixgbe_fcoe_setapp(netdev_priv(netdev), up); + if (id == ETH_P_FCOE) { + u8 tc; + struct ixgbe_adapter *adapter; + + adapter = netdev_priv(netdev); + tc = adapter->fcoe.tc; + rval = ixgbe_fcoe_setapp(adapter, up); + if ((!rval) && (tc != adapter->fcoe.tc) && + (adapter->flags & IXGBE_FLAG_DCB_ENABLED) && + (adapter->flags & IXGBE_FLAG_FCOE_ENABLED)) { + adapter->dcb_set_bitmap |= BIT_APP_UPCHG; + adapter->dcb_set_bitmap |= BIT_RESETLINK; + } + } #endif break; case DCB_APP_IDTYPE_PORTNUM: |