]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: check for invalid DCB config
authorMitch Williams <mitch.a.williams@intel.com>
Mon, 18 Dec 2017 10:17:42 +0000 (05:17 -0500)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 23 Jan 2018 19:29:19 +0000 (11:29 -0800)
commitc76916d5f1d4dfcea07114f21135ee2a42d7076f
treeb224d0404eede171d3d93822234e331c6f75033c
parentbcfc14b7f539af0893568adcc1d5afec93ef6e71
i40e: check for invalid DCB config

The driver (and the entire netdev layer for that matter) assumes
that TC0 will always be present in our DCB configuration.
Unfortunately, this isn't always the case. Rather than fail to
configure the VSI, let's go ahead and try to make it work, even
though DCB will end up being disabled by the kernel.

If the driver fails to configure DCB, the driver queries what's
valid, then writes that back to the hardware, always forcing TC0.

This fixes a bug where the driver could fail to adhere to ETS BW
allocations if 8 TCs were configured on the switch.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c