]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: add a helper function to validate a VF based on the vf id
authorHarshitha Ramamurthy <harshitha.ramamurthy@intel.com>
Tue, 28 Aug 2018 17:16:05 +0000 (10:16 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 25 Sep 2018 20:05:37 +0000 (13:05 -0700)
commit977f9821877b1e7241643ba2c274b2f30783b6bf
tree0341e9689a04a28c0cf7fa29d41b58e090bb8c0b
parentec5732b72c2415982e252b9883eb7ce09097d03c
i40e: add a helper function to validate a VF based on the vf id

When we are trying to change VF settings, it is possible for 2 race
conditions to happen. One, when the VF is created but not yet enabled.
Second, the VF is enabled but the VSI is still not created or not yet
re-created in the VF reset flow.

This patch introduces a helper function to validate that the VF is
enabled and that the VSI is set up. This patch also calls this
function from other functions which could get into these race conditions.
While we are poking around here, remove unnecessary parenthesis that
checkpatch was complaining about.

Signed-off-by: Harshitha Ramamurthy <harshitha.ramamurthy@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_virtchnl_pf.c