mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
committed by
Jeff Kirsher
parent
02debdc9b9
commit
800bd607c3
@@ -3646,18 +3646,12 @@ static int ixgbe_hpbthresh(struct ixgbe_adapter *adapter, int pb)
|
||||
|
||||
#ifdef IXGBE_FCOE
|
||||
/* FCoE traffic class uses FCOE jumbo frames */
|
||||
if (dev->features & NETIF_F_FCOE_MTU) {
|
||||
int fcoe_pb = 0;
|
||||
|
||||
#ifdef CONFIG_IXGBE_DCB
|
||||
fcoe_pb = netdev_get_prio_tc_map(dev, adapter->fcoe.up);
|
||||
if ((dev->features & NETIF_F_FCOE_MTU) &&
|
||||
(tc < IXGBE_FCOE_JUMBO_FRAME_SIZE) &&
|
||||
(pb == ixgbe_fcoe_get_tc(adapter)))
|
||||
tc = IXGBE_FCOE_JUMBO_FRAME_SIZE;
|
||||
|
||||
#endif
|
||||
if (fcoe_pb == pb && tc < IXGBE_FCOE_JUMBO_FRAME_SIZE)
|
||||
tc = IXGBE_FCOE_JUMBO_FRAME_SIZE;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Calculate delay value for device */
|
||||
switch (hw->mac.type) {
|
||||
case ixgbe_mac_X540:
|
||||
|
||||
Reference in New Issue
Block a user