]> git.baikalelectronics.ru Git - kernel.git/commit
ice: Fix queue config fail handling
authorPrzemyslaw Patynowski <przemyslawx.patynowski@intel.com>
Thu, 2 Jun 2022 10:09:04 +0000 (12:09 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 14 Jun 2022 16:38:57 +0000 (09:38 -0700)
commit3b14a4ddb5f598c27ff33fb078373fcc9da761a7
treedd9dd3c590f034938f21b1ddc6f67ea5b08beb49
parent42134ff7590a93bbab8e91dc4e77ce2dd154dbd4
ice: Fix queue config fail handling

Disable VF's RX/TX queues, when VIRTCHNL_OP_CONFIG_VSI_QUEUES fail.
Not disabling them might lead to scenario, where PF driver leaves VF
queues enabled, when VF's VSI failed queue config.
In this scenario VF should not have RX/TX queues enabled. If PF failed
to set up VF's queues, VF will reset due to TX timeouts in VF driver.
Initialize iterator 'i' to -1, so if error happens prior to configuring
queues then error path code will not disable queue 0. Loop that
configures queues will is using same iterator, so error path code will
only disable queues that were configured.

Fixes: 519d5f19ed82 ("ice: add support for virtchnl_queue_select.[tx|rx]_queues bitmap")
Suggested-by: Slawomir Laba <slawomirx.laba@intel.com>
Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_virtchnl.c