From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C894DA046B for ; Wed, 24 Jul 2019 10:35:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B00081C18E; Wed, 24 Jul 2019 10:35:49 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id ED73F1C11F; Wed, 24 Jul 2019 10:35:43 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jul 2019 01:35:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,302,1559545200"; d="scan'208";a="253534613" Received: from unknown (HELO localhost.localdomain) ([10.240.176.181]) by orsmga001.jf.intel.com with ESMTP; 24 Jul 2019 01:35:41 -0700 From: taox.zhu@intel.com To: beilei.xing@intel.com, qi.z.zhang@intel.com Cc: dev@dpdk.org, Zhu Tao , stable@dpdk.org Date: Wed, 24 Jul 2019 16:32:54 +0800 Message-Id: <20190724083254.33867-1-taox.zhu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190719031804.7392-1-taox.zhu@intel.com> References: <20190719031804.7392-1-taox.zhu@intel.com> Subject: [dpdk-stable] [PATCH v3] net/i40e: fix request queue fail in VF X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Zhu Tao 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 --- 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