]> 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)
commitfb99db391931be8b2adef4a829de03eb0385e121
treeb224d0404eede171d3d93822234e331c6f75033c
parent206a573721ecb27d33b28792e4ea494a528b6ddf
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