]> 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)
commitecf2d82540bfd1fafa7b8a7faa50ad4a343d8543
tree0341e9689a04a28c0cf7fa29d41b58e090bb8c0b
parentfe8bb3b18e81950c673006246cd3d5ab21467ccc
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