DPDK patches and discussions
 help / color / mirror / Atom feed
From: Xiaoyun Li <xiaoyun.li@intel.com>
To: jingjing.wu@intel.com, beilei.xing@intel.com
Cc: dev@dpdk.org, Xiaoyun Li <xiaoyun.li@intel.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH] net/i40e: revert fix of PF notify issue when VF not up
Date: Fri,  4 Aug 2017 23:50:06 +0800	[thread overview]
Message-ID: <1501861806-92194-1-git-send-email-xiaoyun.li@intel.com> (raw)

This reverts commit 035a8cf88f010c82de3040c895c801ce0849b065.
Don't send messages to inactive VF will cause DPDK PF failing
to send messages to kernel VF.
With this revert, this issue will be solved.

commit 035a8cf88f01 ("net/i40e: fix PF notify when VF is not up")
Cc: stable@dpdk.org

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 drivers/net/i40e/i40e_pf.c | 28 ++++++++++++----------------
 1 file changed, 12 insertions(+), 16 deletions(-)

diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index e64f849..100f8dc 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -152,21 +152,20 @@ i40e_pf_host_vf_reset(struct i40e_pf_vf *vf, bool do_hw_reset)
 		val |= I40E_VPGEN_VFRTRIG_VFSWR_MASK;
 		I40E_WRITE_REG(hw, I40E_VPGEN_VFRTRIG(vf_id), val);
 		I40E_WRITE_FLUSH(hw);
+	}
 
 #define VFRESET_MAX_WAIT_CNT 100
-		/* Wait until VF reset is done */
-		for (i = 0; i < VFRESET_MAX_WAIT_CNT; i++) {
-			rte_delay_us(10);
-			val = I40E_READ_REG(hw, I40E_VPGEN_VFRSTAT(vf_id));
-			if (val & I40E_VPGEN_VFRSTAT_VFRD_MASK)
-				break;
-		}
+	/* Wait until VF reset is done */
+	for (i = 0; i < VFRESET_MAX_WAIT_CNT; i++) {
+		rte_delay_us(10);
+		val = I40E_READ_REG(hw, I40E_VPGEN_VFRSTAT(vf_id));
+		if (val & I40E_VPGEN_VFRSTAT_VFRD_MASK)
+			break;
+	}
 
-		if (i >= VFRESET_MAX_WAIT_CNT) {
-			PMD_DRV_LOG(ERR, "VF reset timeout");
-			return -ETIMEDOUT;
-		}
-		vf->state = I40E_VF_ACTIVE;
+	if (i >= VFRESET_MAX_WAIT_CNT) {
+		PMD_DRV_LOG(ERR, "VF reset timeout");
+		return -ETIMEDOUT;
 	}
 	/* This is not first time to do reset, do cleanup job first */
 	if (vf->vsi) {
@@ -262,10 +261,7 @@ i40e_pf_host_send_msg_to_vf(struct i40e_pf_vf *vf,
 {
 	struct i40e_hw *hw = I40E_PF_TO_HW(vf->pf);
 	uint16_t abs_vf_id = hw->func_caps.vf_base_id + vf->vf_idx;
-	int ret = I40E_ERR_ADMIN_QUEUE_ERROR;
-
-	if (vf->state == I40E_VF_INACTIVE)
-		return ret;
+	int ret;
 
 	ret = i40e_aq_send_msg_to_vf(hw, abs_vf_id, opcode, retval,
 						msg, msglen, NULL);
-- 
2.7.4

             reply	other threads:[~2017-08-04  7:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-04 15:50 Xiaoyun Li [this message]
2017-08-04  8:40 ` Xing, Beilei
2017-08-04 23:30   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon

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=1501861806-92194-1-git-send-email-xiaoyun.li@intel.com \
    --to=xiaoyun.li@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=stable@dpdk.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;
as well as URLs for NNTP newsgroup(s).