ixgbe: Use num_tcs.pg_tcs as upper limit for TC when checking based on UP
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 <af56634f9be8457194a3461ec96c497f138af4ff@intel.com>
Acked-by: Greg Rose <fdff95cc3a51f0ebfc2cd0523e9ef9af6ad07484@intel.com>
Tested-by: Stephen Ko <62e072d38818c16b5fb04a74a1e79fd680cb696e@intel.com>
Tested-by: Ross Brattain <ddebe0db9486ace8e4376a8be8a0aaa0090ac511@intel.com>
Signed-off-by: Jeff Kirsher <87e35f5be20bb3e67f4ba6b86f5f6be3085b1b3a@intel.com>

KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas