From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CA97F43CB1 for ; Thu, 14 Mar 2024 02:44:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5ACC42DD9; Thu, 14 Mar 2024 02:44:08 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by mails.dpdk.org (Postfix) with ESMTP id B53ED40297; Thu, 14 Mar 2024 02:44:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710380647; x=1741916647; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=VNxDr+G7AMY1FTPwYFzCpvtaoEFIvsb27tkUu596+l0=; b=QhwgIbHwIIMh2wrSc2BZAQL2mfBztmAc/X8v+lijaITGZXRI82tQLZwV 4x0O2Q8kbbil8T2BlwNDUkyB275fUgnIGJ77hpR/iN0Lk7+aKwulc6cbI VZxQ38e2LcoXP7hEhuwg624uvJU2quJ2w8tCWC/Mqa/kNJYyC8YVT+0PP Rwc+42v5XxBzauSGfb+U6dqAPC7nhjW0RwraBaXOFzbMr3eIZ2ktnIfxW laPWWVJI9MFbz6ntLK9SFbNriSff9qEXmNCc2MqBYAO15tp16/Nin89zJ z6Ki+QbiiFyVBdSJkyvGcz1ErXi9SW5GqHHrq/fnfzeVIG+spPvZf60hL g==; X-IronPort-AV: E=McAfee;i="6600,9927,11012"; a="16630239" X-IronPort-AV: E=Sophos;i="6.07,124,1708416000"; d="scan'208";a="16630239" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2024 18:44:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,124,1708416000"; d="scan'208";a="12141412" Received: from shwdenpg561.ccr.corp.intel.com (HELO dpdk..) ([10.239.252.3]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2024 18:44:02 -0700 From: Kaiwen Deng To: dev@dpdk.org Cc: stable@dpdk.org, yidingx.zhou@intel.com, Kaiwen Deng , Jingjing Wu , Zhichao Zeng , Qi Zhang Subject: [PATCH] net/iavf: fix fail to reset vf when using dcf Date: Thu, 14 Mar 2024 09:00:49 +0800 Message-Id: <20240314010049.340381-1-kaiwenx.deng@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 On the latest ice kernel driver, renegotiating VIRTCHNL_OP_GET_VF_RESOURCES will fail without hardware reset when using dcf. This commit will send VIRTCHNL_OP_RESET_VF to pf before dpdk resets vf. Fixes: 7a93cd3575eb ("net/iavf: add VF reset check") Cc: stable@dpdk.org Signed-off-by: Kaiwen Deng --- drivers/net/iavf/iavf_ethdev.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 245b3cd854..1c2d23f80f 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -3038,6 +3038,16 @@ iavf_dev_reset(struct rte_eth_dev *dev) struct iavf_adapter *adapter = IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); struct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(dev->data->dev_private); + struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); + + if (!vf->in_reset_recovery) { + ret = iavf_aq_send_msg_to_pf(hw, VIRTCHNL_OP_RESET_VF, + IAVF_SUCCESS, NULL, 0, NULL); + if (ret) { + PMD_DRV_LOG(ERR, "fail to send cmd VIRTCHNL_OP_RESET_VF"); + return ret; + } + } /* * Check whether the VF reset has been done and inform application, -- 2.34.1