From: Yuanhan Liu <yliu@fridaylinux.org>
To: "Li, Xiaoyun" <xiaoyun.li@intel.com>
Cc: "Wu, Jingjing" <jingjing.wu@intel.com>, dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-stable] patch 'net/i40e: fix PF notify when VF is not up' has been queued to LTS release 16.11.3
Date: Wed, 9 Aug 2017 12:05:17 +0800 [thread overview]
Message-ID: <20170809040517.GK9612@yliu-home> (raw)
In-Reply-To: <B9E724F4CB7543449049E7AE7669D82F432037@SHSMSX101.ccr.corp.intel.com>
On Wed, Aug 09, 2017 at 03:53:36AM +0000, Li, Xiaoyun wrote:
> Hi, this patch will cause DPDK PF failing to send messages to kernel VF, and can't get kernel interface in VM.
> So I will rework on this issue.
Thanks for the note. I will drop it then.
--yliu
>
> -----Original Message-----
> From: Yuanhan Liu [mailto:yliu@fridaylinux.org]
> Sent: Wednesday, August 9, 2017 11:44
> To: Li, Xiaoyun <xiaoyun.li@intel.com>
> Cc: Wu, Jingjing <jingjing.wu@intel.com>; dpdk stable <stable@dpdk.org>; Yuanhan Liu <yliu@fridaylinux.org>
> Subject: patch 'net/i40e: fix PF notify when VF is not up' has been queued to LTS release 16.11.3
>
> Hi,
>
> FYI, your patch has been queued to LTS release 16.11.3
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 08/11/17. So please shout if anyone has objections.
>
> Thanks.
>
> --yliu
>
> ---
> >From a01cf403496049b6991eedc7084279b3bd43b431 Mon Sep 17 00:00:00 2001
> From: Xiaoyun Li <xiaoyun.li@intel.com>
> Date: Fri, 28 Jul 2017 23:48:11 +0800
> Subject: [PATCH] net/i40e: fix PF notify when VF is not up
>
> [ upstream commit 035a8cf88f010c82de3040c895c801ce0849b065 ]
>
> This patch stops PF from sending messages to inactive VF and modifies VF state to active when VF reset is completed.
>
> Fixes: 4861cde46116 ("i40e: new poll mode driver")
>
> Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
> Acked-by: Jingjing Wu <jingjing.wu@intel.com>
> ---
> drivers/net/i40e/i40e_pf.c | 29 ++++++++++++++++-------------
> 1 file changed, 16 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c index b36d901..978b82b 100644
> --- a/drivers/net/i40e/i40e_pf.c
> +++ b/drivers/net/i40e/i40e_pf.c
> @@ -151,22 +151,22 @@ 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;
> + if (i >= VFRESET_MAX_WAIT_CNT) {
> + PMD_DRV_LOG(ERR, "VF reset timeout");
> + return -ETIMEDOUT;
> + }
> + vf->state = I40E_VF_ACTIVE;
> }
> -
> /* This is not first time to do reset, do cleanup job first */
> if (vf->vsi) {
> /* Disable queues */
> @@ -261,7 +261,10 @@ 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;
> + int ret = I40E_ERR_ADMIN_QUEUE_ERROR;
> +
> + if (vf->state == I40E_VF_INACTIVE)
> + return ret;
>
> ret = i40e_aq_send_msg_to_vf(hw, abs_vf_id, opcode, retval,
> msg, msglen, NULL);
> --
> 2.7.4
next prev parent reply other threads:[~2017-08-09 4:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-09 3:43 [dpdk-stable] patch 'crypto/aesni_mb: fix HMAC supported key sizes' " Yuanhan Liu
2017-08-09 3:43 ` [dpdk-stable] patch 'crypto/openssl: " Yuanhan Liu
2017-08-09 3:43 ` [dpdk-stable] patch 'mbuf: fix doxygen comment of bulk alloc' " Yuanhan Liu
2017-08-09 3:43 ` [dpdk-stable] patch 'net/bnxt: fix set link config' " Yuanhan Liu
2017-08-09 3:43 ` [dpdk-stable] patch 'net/bnxt: check invalid L2 filter id' " Yuanhan Liu
2017-08-09 3:43 ` [dpdk-stable] patch 'net/bnxt: free filter before reusing it' " Yuanhan Liu
2017-08-09 3:43 ` [dpdk-stable] patch 'net/ixgbe: fix mirror rule index overflow' " Yuanhan Liu
2017-08-09 3:43 ` [dpdk-stable] patch 'net/mlx5: fix inconsistent link status query' " Yuanhan Liu
2017-08-09 3:43 ` [dpdk-stable] patch 'net/i40e: fix PF notify when VF is not up' " Yuanhan Liu
2017-08-09 3:53 ` Li, Xiaoyun
2017-08-09 4:05 ` Yuanhan Liu [this message]
2017-08-09 3:43 ` [dpdk-stable] patch 'test/bonding: fix memory corruptions' " Yuanhan Liu
2017-08-09 3:43 ` [dpdk-stable] patch 'test/bonding: fix parameters of a balance Tx' " Yuanhan Liu
2017-08-09 3:43 ` [dpdk-stable] patch 'test/bonding: fix namespace of the RSS tests' " Yuanhan Liu
2017-08-09 3:43 ` [dpdk-stable] patch 'net/qede: fix chip details print' " Yuanhan Liu
2017-08-09 3:43 ` [dpdk-stable] patch 'net/vmxnet3: fix filtering on promiscuous disabling' " Yuanhan Liu
2017-08-09 3:43 ` [dpdk-stable] patch 'net/i40e: fix Rx data segment buffer length' " Yuanhan Liu
2017-08-09 3:43 ` [dpdk-stable] patch 'net/enic: fix crash when freeing 0 packet to mempool' " Yuanhan Liu
2017-08-09 19:27 ` John Daley (johndale)
2017-08-10 1:24 ` Yuanhan Liu
2017-08-09 3:43 ` [dpdk-stable] patch 'examples/l3fwd: fix IPv6 packet type parse' " Yuanhan Liu
2017-08-09 3:44 ` [dpdk-stable] patch 'vhost: make page logging atomic' " Yuanhan Liu
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=20170809040517.GK9612@yliu-home \
--to=yliu@fridaylinux.org \
--cc=jingjing.wu@intel.com \
--cc=stable@dpdk.org \
--cc=xiaoyun.li@intel.com \
/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).