diff options
author | Dave Ertman <david.m.ertman@intel.com> | 2016-08-12 09:56:32 -0700 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2016-08-16 13:23:13 -0700 |
commit | fbfe12c64f9650aa22f434dd9dd22df7ddf63221 (patch) | |
tree | a12280873f34b4d3b72d350ae7fde0d9e1d95d79 /net/sched/act_api.c | |
parent | 3d951822be216d8c6fcfc8abf75e5ed307eeb646 (diff) | |
download | linux-fbfe12c64f9650aa22f434dd9dd22df7ddf63221.tar.gz linux-fbfe12c64f9650aa22f434dd9dd22df7ddf63221.tar.xz |
i40e: check for and deal with non-contiguous TCs
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>
Diffstat (limited to 'net/sched/act_api.c')
0 files changed, 0 insertions, 0 deletions