From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH S28 2/9] ice: report link down for VF when PF's queues are not enabled
Date: Tue, 27 Aug 2019 06:13:47 -0700 [thread overview]
Message-ID: <20190827131354.12703-2-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20190827131354.12703-1-anthony.l.nguyen@intel.com>
From: Lukasz Czapnik <lukasz.czapnik@intel.com>
This is port of a fix from i40e commit 2ad1274fa35a ("i40e: don't
report link up for a VF who hasn't enabled queues")
Older VF drivers do not respond well to receiving a link
up notification before queues are enabled. This can cause their state
machine to think that it is safe to send traffic. This results in a Tx
hang on the VF.
Record whether the PF has actually enabled queues for the VF. When
reporting link status, always report link down if the queues aren't
enabled. In this way, the VF driver will never receive a link up
notification until after its queues are enabled.
Signed-off-by: Lukasz Czapnik <lukasz.czapnik@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
index 3ba6613048ef..1ec2a037a369 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
@@ -129,7 +129,10 @@ static void ice_vc_notify_vf_link_state(struct ice_vf *vf)
pfe.event = VIRTCHNL_EVENT_LINK_CHANGE;
pfe.severity = PF_EVENT_SEVERITY_INFO;
- if (vf->link_forced)
+ /* Always report link is down if the VF queues aren't enabled */
+ if (!vf->num_qs_ena)
+ ice_set_pfe_link(vf, &pfe, ICE_AQ_LINK_SPEED_UNKNOWN, false);
+ else if (vf->link_forced)
ice_set_pfe_link_forced(vf, &pfe, vf->link_up);
else
ice_set_pfe_link(vf, &pfe, ls->link_speed, ls->link_info &
--
2.20.1
next prev parent reply other threads:[~2019-08-27 13:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 13:13 [Intel-wired-lan] [PATCH S28 1/9] ice: Reliably reset VFs Tony Nguyen
2019-08-27 13:13 ` Tony Nguyen [this message]
2019-08-28 17:02 ` [Intel-wired-lan] [PATCH S28 2/9] ice: report link down for VF when PF's queues are not enabled Bowers, AndrewX
2019-08-27 13:13 ` [Intel-wired-lan] [PATCH S28 3/9] ice: Check for DCB capability before initializing DCB Tony Nguyen
2019-08-28 17:03 ` Bowers, AndrewX
2019-08-27 13:13 ` [Intel-wired-lan] [PATCH S28 4/9] ice: Report VF link status with opcode to get resources Tony Nguyen
2019-08-28 17:03 ` Bowers, AndrewX
2019-08-27 13:13 ` [Intel-wired-lan] [PATCH S28 5/9] ice: update tx context struct Tony Nguyen
2019-08-28 17:04 ` Bowers, AndrewX
2019-08-27 13:13 ` [Intel-wired-lan] [PATCH S28 6/9] ice: Allow for delayed LLDP MIB change registration Tony Nguyen
2019-08-28 17:04 ` Bowers, AndrewX
2019-08-27 13:13 ` [Intel-wired-lan] [PATCH S28 7/9] ice: Minor refactor in queue management Tony Nguyen
2019-08-28 17:05 ` Bowers, AndrewX
2019-08-27 13:13 ` [Intel-wired-lan] [PATCH S28 8/9] ice: change default number of receive descriptors Tony Nguyen
2019-08-28 17:05 ` Bowers, AndrewX
2019-08-27 13:13 ` [Intel-wired-lan] [PATCH S28 9/9] ice: Rework around device/function capabilities Tony Nguyen
2019-08-28 17:05 ` Bowers, AndrewX
2019-08-28 17:02 ` [Intel-wired-lan] [PATCH S28 1/9] ice: Reliably reset VFs 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=20190827131354.12703-2-anthony.l.nguyen@intel.com \
--to=anthony.l.nguyen@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