diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2012-06-02 00:11:02 +0000 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2012-07-14 14:38:22 -0700 |
commit | 800bd607c31e648267e8a1055b14ad27bde943f5 (patch) | |
tree | bd6227be40fda4ca53fa46694c269fdd7c52ce16 /drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | |
parent | 02debdc9b9adf88a4e2a42b96d1544e63b82e69a (diff) | |
download | linux-800bd607c31e648267e8a1055b14ad27bde943f5.tar.gz linux-800bd607c31e648267e8a1055b14ad27bde943f5.tar.bz2 linux-800bd607c31e648267e8a1055b14ad27bde943f5.zip |
ixgbe: Add function for obtaining FCoE TC based on FCoE user priority
In upcoming patches it will become increasingly common to need to determine
the FCoE traffic class in order to determine the correct queues for FCoE.
In order to make this easier I am adding a function for obtaining the FCoE
traffic class based on the user priority.
Cc: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c index 83eadd019e6b..c0ff31edb0a9 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c @@ -49,8 +49,8 @@ static inline bool ixgbe_cache_ring_rss(struct ixgbe_adapter *adapter) return true; } -#ifdef CONFIG_IXGBE_DCB +#ifdef CONFIG_IXGBE_DCB /* ixgbe_get_first_reg_idx - Return first register index associated with ring */ static void ixgbe_get_first_reg_idx(struct ixgbe_adapter *adapter, u8 tc, unsigned int *tx, unsigned int *rx) @@ -343,13 +343,10 @@ static inline bool ixgbe_set_dcb_queues(struct ixgbe_adapter *adapter) * configuration later. */ if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) { - u8 prio_tc[MAX_USER_PRIORITY] = {0}; - int tc; + u8 tc = ixgbe_fcoe_get_tc(adapter); struct ixgbe_ring_feature *f = &adapter->ring_feature[RING_F_FCOE]; - ixgbe_dcb_unpack_map(&adapter->dcb_cfg, DCB_TX_CONFIG, prio_tc); - tc = prio_tc[adapter->fcoe.up]; f->indices = dev->tc_to_txq[tc].count; f->offset = dev->tc_to_txq[tc].offset; } |