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 12759A0471 for ; Fri, 19 Jul 2019 05:20:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CDF5D325F; Fri, 19 Jul 2019 05:20:12 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 5387A2BA8; Fri, 19 Jul 2019 05:20:10 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2019 20:20:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,280,1559545200"; d="scan'208";a="179498730" Received: from unknown (HELO localhost.localdomain) ([10.240.176.181]) by orsmga002.jf.intel.com with ESMTP; 18 Jul 2019 20:20:06 -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: Fri, 19 Jul 2019 11:18:04 +0800 Message-Id: <20190719031804.7392-1-taox.zhu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190718145351.13987-1-taox.zhu@intel.com> References: <20190718145351.13987-1-taox.zhu@intel.com> Subject: [dpdk-dev] [PATCH v2] net/i40e: fix request queue fail in VF X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Mark vf_reset, pend_msg flag just as task request queue has received notification in task alarm. 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 5be32b069..3b9740c08 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -1332,6 +1332,10 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg, PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event"); _rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL); + if (!vf->vf_reset) { + vf->vf_reset = true; + vf->pend_msg |= PFMSG_RESET_IMPENDING; + } break; case VIRTCHNL_EVENT_LINK_CHANGE: PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_LINK_CHANGE event"); -- 2.17.1