[dpdk-stable] patch 'net/i40e: fix PF notify issue when VF is not up' has been queued to LTS release 16.11.4
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Oct 30 16:34:10 CET 2017
Hi,
FYI, your patch has been queued to LTS release 16.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/01/17. So please
shout if anyone has objections.
Thanks.
Kind regards,
Luca Boccassi
---
>From e591d604873ef48b51e6d8fc3919eb638a3f2b52 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li at intel.com>
Date: Tue, 15 Aug 2017 15:39:36 +0800
Subject: [PATCH] net/i40e: fix PF notify issue when VF is not up
[ upstream commit 16048c4cb70386512917073c1661d743f5a78806 ]
This patch stops PF from sending message to VF when VF's admin queue
isn't enabled, namely VF isn't up.
Fixes: 4861cde46116 ("i40e: new poll mode driver")
Signed-off-by: Xiaoyun Li <xiaoyun.li at intel.com>
Acked-by: Beilei Xing <beilei.xing at intel.com>
---
drivers/net/i40e/i40e_pf.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index b36d9019c..c5e06ca7b 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -902,7 +902,10 @@ send_msg:
static void
i40e_notify_vf_link_status(struct rte_eth_dev *dev, struct i40e_pf_vf *vf)
{
+ struct i40e_hw *hw = I40E_PF_TO_HW(vf->pf);
struct i40e_virtchnl_pf_event event;
+ uint16_t vf_id = vf->vf_idx;
+ uint32_t tval, rval;
event.event = I40E_VIRTCHNL_EVENT_LINK_CHANGE;
event.event_data.link_event.link_status =
@@ -934,8 +937,15 @@ i40e_notify_vf_link_status(struct rte_eth_dev *dev, struct i40e_pf_vf *vf)
break;
}
- i40e_pf_host_send_msg_to_vf(vf, I40E_VIRTCHNL_OP_EVENT,
- I40E_SUCCESS, (uint8_t *)&event, sizeof(event));
+ tval = I40E_READ_REG(hw, I40E_VF_ATQLEN(vf_id));
+ rval = I40E_READ_REG(hw, I40E_VF_ARQLEN(vf_id));
+
+ if (tval & I40E_VF_ATQLEN_ATQLEN_MASK ||
+ tval & I40E_VF_ATQLEN_ATQENABLE_MASK ||
+ rval & I40E_VF_ARQLEN_ARQLEN_MASK ||
+ rval & I40E_VF_ARQLEN_ARQENABLE_MASK)
+ i40e_pf_host_send_msg_to_vf(vf, I40E_VIRTCHNL_OP_EVENT,
+ I40E_SUCCESS, (uint8_t *)&event, sizeof(event));
}
void
--
2.11.0
More information about the stable
mailing list