From patchwork Thu Jul 18 14:53:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhu, TaoX" X-Patchwork-Id: 56692 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D7684152A; Thu, 18 Jul 2019 08:07:11 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 0002B2AB for ; Thu, 18 Jul 2019 08:07:10 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jul 2019 23:07:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,276,1559545200"; d="scan'208";a="187720696" Received: from unknown (HELO localhost.localdomain) ([10.240.176.181]) by fmsmga001.fm.intel.com with ESMTP; 17 Jul 2019 23:07:08 -0700 From: taox.zhu@intel.com To: beilei.xing@intel.com, qi.z.zhang@intel.com Cc: dev@dpdk.org, Zhu Tao Date: Thu, 18 Jul 2019 14:53:51 +0000 Message-Id: <20190718145351.13987-1-taox.zhu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] 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. 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..86dfda1c0 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 == false) { + 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");