]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i40e: Fix incorrect netdev's real number of RX/TX queues
authorJedrzej Jagielski <jedrzej.jagielski@intel.com>
Fri, 17 Dec 2021 14:29:05 +0000 (14:29 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jan 2022 12:37:11 +0000 (13:37 +0100)
commit486a2379db924073abe8715a1b47f145ad4d5dfe
treef6b3072d8f63fe0016980743ad7f968c2507fa2d
parent004e7cf81646aea52f380b1b4fb8bf4fc02ac5b9
i40e: Fix incorrect netdev's real number of RX/TX queues

commit e738451d78b2f8a9635d66c6a87f304b4d965f7a upstream.

There was a wrong queues representation in sysfs during
driver's reinitialization in case of online cpus number is
less than combined queues. It was caused by stopped
NetworkManager, which is responsible for calling vsi_open
function during driver's initialization.
In specific situation (ex. 12 cpus online) there were 16 queues
in /sys/class/net/<iface>/queues. In case of modifying queues with
value higher, than number of online cpus, then it caused write
errors and other errors.
Add updating of sysfs's queues representation during driver
initialization.

Fixes: 41c445ff0f48 ("i40e: main driver core")
Signed-off-by: Lukasz Cieplicki <lukaszx.cieplicki@intel.com>
Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/i40e/i40e_main.c