]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: Use num_tcs.pg_tcs as upper limit for TC when checking based on UP
authorAlexander Duyck <alexander.h.duyck@intel.com>
Fri, 25 May 2012 01:45:38 +0000 (01:45 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 21 Jul 2012 23:05:28 +0000 (16:05 -0700)
commit660d391b5a6e36e96c7953e80132a216f60351af
tree2ad2f30991a2d630ad0db895dda95d8237bc582f
parent13aee4bfd2bb81a059cfd713617845f14fb03cb9
ixgbe: Use num_tcs.pg_tcs as upper limit for TC when checking based on UP

This change makes it so the function ixgbe_dcb_get_tc_from_up will use the
num_tcs.pg_tcs to determine the starting value for determining a traffic
class based on a user priority.  The main motivation for this change is to
address possible bad configurations in which more TCs worth of data are
populated then there are actual TCs.  By limiting this value we can at
least make certain we are not providing a map with values that are out of
range.

As a result any user priorities that are setup in the configuration with a
traffic class mapping higher than what the hardware supports will be
reported as being on TC 0.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c