From: taox.zhu@intel.com
To: beilei.xing@intel.com, qi.z.zhang@intel.com
Cc: dev@dpdk.org, Zhu Tao <taox.zhu@intel.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH v3] net/i40e: fix request queue fail in VF
Date: Wed, 24 Jul 2019 16:32:54 +0800 [thread overview]
Message-ID: <20190724083254.33867-1-taox.zhu@intel.com> (raw)
In-Reply-To: <20190719031804.7392-1-taox.zhu@intel.com>
From: Zhu Tao <taox.zhu@intel.com>
When the VF configuration is larger than the number of queues reserved
by PF, VF sends the request queue command through admin queue. When PF
received this command, it may reset the VF and send a notification
before resetting. If this notification is read by the timed task alarm,
Task request queue will lost notification. This patch prevents two
tasks from running simultaneously.
Fixes: 864a800d70 ("net/i40e: remove VF interrupt handler")
Fixes: ee653bd800 ("net/i40e: determine number of queues per VF at run time")
Cc: stable@dpdk.org
Signed-off-by: Zhu Tao <taox.zhu@intel.com>
---
drivers/net/i40e/i40e_ethdev_vf.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 5be32b069..34aaaf207 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -140,6 +140,8 @@ static int
i40evf_set_mc_addr_list(struct rte_eth_dev *dev,
struct rte_ether_addr *mc_addr_set,
uint32_t nb_mc_addr);
+static void
+i40evf_dev_alarm_handler(void *param);
/* Default hash key buffer for RSS */
static uint32_t rss_key_default[I40E_VFQF_HKEY_MAX_INDEX + 1];
@@ -1051,10 +1053,14 @@ i40evf_request_queues(struct rte_eth_dev *dev, uint16_t num)
args.in_args_size = sizeof(vfres);
args.out_buffer = vf->aq_resp;
args.out_size = I40E_AQ_BUF_SZ;
+
+ rte_eal_alarm_cancel(i40evf_dev_alarm_handler, dev);
err = i40evf_execute_vf_cmd(dev, &args);
if (err)
PMD_DRV_LOG(ERR, "fail to execute command OP_REQUEST_QUEUES");
+ rte_eal_alarm_set(I40EVF_ALARM_INTERVAL,
+ i40evf_dev_alarm_handler, dev);
return err;
}
--
2.17.1
next prev parent reply other threads:[~2019-07-24 8:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-18 14:53 [dpdk-dev] [PATCH] " taox.zhu
2019-07-18 13:09 ` Ye Xiaolong
2019-07-18 7:05 ` Zhu, TaoX
2019-07-18 14:05 ` Ye Xiaolong
2019-07-19 3:18 ` [dpdk-dev] [PATCH v2] " taox.zhu
2019-07-23 6:52 ` Zhang, Qi Z
2019-07-24 8:32 ` taox.zhu [this message]
2019-07-24 12:54 ` [dpdk-dev] [PATCH v3] " Zhang, Qi Z
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=20190724083254.33867-1-taox.zhu@intel.com \
--to=taox.zhu@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@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).