From: Alice Michael <alice.michael@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next PATCH S78-V8 10/12] i40e: fix handling of vf_states variable
Date: Tue, 22 Aug 2017 06:57:52 -0400 [thread overview]
Message-ID: <20170822105754.29486-11-alice.michael@intel.com> (raw)
In-Reply-To: <20170822105754.29486-1-alice.michael@intel.com>
From: Alan Brady <alan.brady@intel.com>
Currently we inappropriately clear the vf_states variable with a null
assignment. This is problematic because we should be using atomic
bitops on this variable and we don't actually want to clear all the
flags. We should just clear the ones we know we want to clear.
Additionally remove the I40E_VF_STATE_FCOEENA bit because it is no
longer being used.
Signed-off-by: Alan Brady <alan.brady@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 5 ++++-
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 1 -
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 5b30192..e51fa2d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -876,7 +876,8 @@ static void i40e_free_vf_res(struct i40e_vf *vf)
}
/* reset some of the state variables keeping track of the resources */
vf->num_queue_pairs = 0;
- vf->vf_states = 0;
+ clear_bit(I40E_VF_STATE_MC_PROMISC, &vf->vf_states);
+ clear_bit(I40E_VF_STATE_UC_PROMISC, &vf->vf_states);
}
/**
@@ -1583,6 +1584,8 @@ static int i40e_vc_get_vf_resources_msg(struct i40e_vf *vf, u8 *msg)
(vf->driver_caps & VIRTCHNL_VF_OFFLOAD_IWARP)) {
vfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_IWARP;
set_bit(I40E_VF_STATE_IWARPENA, &vf->vf_states);
+ } else {
+ clear_bit(I40E_VF_STATE_IWARPENA, &vf->vf_states);
}
if (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_RSS_PF) {
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
index 5ea42ad..5efc4f9 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
@@ -56,7 +56,6 @@ enum i40e_vf_states {
I40E_VF_STATE_INIT = 0,
I40E_VF_STATE_ACTIVE,
I40E_VF_STATE_IWARPENA,
- I40E_VF_STATE_FCOEENA,
I40E_VF_STATE_DISABLED,
I40E_VF_STATE_MC_PROMISC,
I40E_VF_STATE_UC_PROMISC,
--
2.9.4
next prev parent reply other threads:[~2017-08-22 10:57 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-22 10:57 [Intel-wired-lan] [next PATCH S78-V8 00/12] Change Log Alice Michael
2017-08-22 10:57 ` [Intel-wired-lan] [next PATCH S78-V8 01/12] i40e: Fix reporting of supported link modes Alice Michael
2017-08-23 16:28 ` Bowers, AndrewX
2017-08-22 10:57 ` [Intel-wired-lan] [next PATCH S78-V8 02/12] i40e: Add support for 'ethtool -m' Alice Michael
2017-08-23 16:29 ` Bowers, AndrewX
2017-08-22 10:57 ` [Intel-wired-lan] [next PATCH S78-V8 03/12] i40e: use admin queue for setting LEDs behavior Alice Michael
2017-08-23 16:29 ` Bowers, AndrewX
2017-08-22 10:57 ` [Intel-wired-lan] [next PATCH S78-V8 04/12] i40e: don't hold spinlock while resetting VF Alice Michael
2017-08-23 16:42 ` Bowers, AndrewX
2017-08-22 10:57 ` [Intel-wired-lan] [next PATCH S78-V8 05/12] i40e: drop i40e_pf *pf from i40e_vc_disable_vf() Alice Michael
2017-08-23 16:43 ` Bowers, AndrewX
2017-08-22 10:57 ` [Intel-wired-lan] [next PATCH S78-V8 06/12] i40e: make use of i40e_vc_disable_vf Alice Michael
2017-08-23 20:41 ` Bowers, AndrewX
2017-08-22 10:57 ` [Intel-wired-lan] [next PATCH S78-V8 07/12] i40e: ensure reset occurs when disabling VF Alice Michael
2017-08-23 20:42 ` Bowers, AndrewX
2017-08-22 10:57 ` [Intel-wired-lan] [next PATCH S78-V8 08/12] i40evf: Enable VF to request an alternate queue allocation Alice Michael
2017-08-23 20:43 ` Bowers, AndrewX
2017-08-22 10:57 ` [Intel-wired-lan] [next PATCH S78-V8 09/12] i40e: make i40evf_map_rings_to_vectors void Alice Michael
2017-08-23 20:52 ` Bowers, AndrewX
2017-08-22 10:57 ` Alice Michael [this message]
2017-08-23 20:53 ` [Intel-wired-lan] [next PATCH S78-V8 10/12] i40e: fix handling of vf_states variable Bowers, AndrewX
2017-08-22 10:57 ` [Intel-wired-lan] [next PATCH S78-V8 11/12] i40e: fix client notify of VF reset Alice Michael
2017-08-23 20:53 ` Bowers, AndrewX
2017-08-22 10:57 ` [Intel-wired-lan] [next PATCH S78-V8 12/12] i40e: Stop dropping 802.1ad tags (eth proto 0x88a8 Alice Michael
2017-08-23 20:54 ` Bowers, AndrewX
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170822105754.29486-11-alice.michael@intel.com \
--to=alice.michael@intel.com \
--cc=intel-wired-lan@osuosl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox