OSDN Git Service

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)
commitd8a87856607ebcc5456feb96f6a639b2b0fd746f
treeb224d0404eede171d3d93822234e331c6f75033c
parent07d44190a38939adfec6177a6e1b683417da291f
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