]> www.infradead.org Git - users/jedix/linux-maple.git/commit
i40e: check for and deal with non-contiguous TCs
authorDave Ertman <david.m.ertman@intel.com>
Fri, 12 Aug 2016 16:56:32 +0000 (09:56 -0700)
committerDhaval Giani <dhaval.giani@oracle.com>
Wed, 8 Mar 2017 00:31:08 +0000 (19:31 -0500)
commit2ef60febf8a4d2aa703974315d66a84faf79d70b
tree79a5f7415a8fa64ea6767bc3bd3034f8be2876d1
parentb38f0e664c2d4aa4b9d6c3f710cf8b83ababd84c
i40e: check for and deal with non-contiguous TCs

Orabug: 24568124

The i40e driver was causing a kernel panic when
non-contiguous Traffic Classes, or Traffic Classes not
starting with TC0, were configured on a link partner switch.
i40e does not support non-contiguous TCs.

To fix this, the patch changes the logic when determining
the total number of TCs enabled.  Before, this would use the
highest TC number enabled and assume that all TCs below it were
also enabled.  Now, we create a bitmask of enabled TCs and scan
it to determine not only the number of TCs, but also if the set
of enabled TCs starts at zero and is contiguous.  If not, then
DCB is disabled by only returning one TC.

Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit fbfe12c64f9650aa22f434dd9dd22df7ddf63221)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_main.c