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 6580BA09D3; Thu, 20 Oct 2022 11:10:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F12FA42C7C; Thu, 20 Oct 2022 11:10:18 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 74C7D427F5; Thu, 20 Oct 2022 11:10:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666257017; x=1697793017; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=IujAvD3Le/fSeohltA8GodrCL57pVWYFlC8Rg1amSdY=; b=mrHQsgTE+niWhMQGao26h7LtJVQA9hO2D4RvYlwbNVzrjODnsl4ORyMJ rlKqsOvKqNkzqGyx5hzP+mp9e3FdczrIW8dmuqqXW4eGKFFTt4BfPRCZK ICeH2q0bJyoiZPWY5bXEIMxiFowrgLQ+jTNP6dRxQ5YEJQnDCwPSYzfMx GZX0wHeZFGRkdPOYxts+wegZHNc+tRTeHxhWj1t3Y85pk58miYVm0JeJX ykFIwN0ctinJQRe32K2j2gBm3zPD+AzImd8doRjoQasESlPLbPiL/OllU aaFGU0KSy607WbSEqPIQfIt4JrkleiDQ+0S989hU/cPRFKiCRDNYU2bFM A==; X-IronPort-AV: E=McAfee;i="6500,9779,10505"; a="333224102" X-IronPort-AV: E=Sophos;i="5.95,198,1661842800"; d="scan'208";a="333224102" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2022 02:10:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10505"; a="660805647" X-IronPort-AV: E=Sophos;i="5.95,198,1661842800"; d="scan'208";a="660805647" Received: from silpixa00400884.ir.intel.com ([10.243.22.82]) by orsmga008.jf.intel.com with ESMTP; 20 Oct 2022 02:10:13 -0700 From: Radu Nicolau To: Jingjing Wu , Beilei Xing Cc: dev@dpdk.org, qi.z.zhang@intel.com, Radu Nicolau , stable@dpdk.org, ting.xu@intel.com Subject: [PATCH] net/iavf: fix queue stop for large VF Date: Thu, 20 Oct 2022 10:09:58 +0100 Message-Id: <20221020090958.3847616-1-radu.nicolau@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Use large VF queue stop request when large VF is enabled Fixes: 9cf9c02bf6ee ("net/iavf: add enable/disable queues for large VF") Cc: stable@dpdk.org Cc: ting.xu@intel.com Signed-off-by: Radu Nicolau --- drivers/net/iavf/iavf_rxtx.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 437055f76b..3292541ad9 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -958,6 +958,7 @@ iavf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) { struct iavf_adapter *adapter = IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); + struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); struct iavf_rx_queue *rxq; int err; @@ -966,7 +967,11 @@ iavf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) if (rx_queue_id >= dev->data->nb_rx_queues) return -EINVAL; - err = iavf_switch_queue(adapter, rx_queue_id, true, false); + if (!vf->lv_enabled) + err = iavf_switch_queue(adapter, rx_queue_id, true, false); + else + err = iavf_switch_queue_lv(adapter, rx_queue_id, true, false); + if (err) { PMD_DRV_LOG(ERR, "Failed to switch RX queue %u off", rx_queue_id); @@ -986,6 +991,7 @@ iavf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id) { struct iavf_adapter *adapter = IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); + struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); struct iavf_tx_queue *txq; int err; @@ -994,7 +1000,11 @@ iavf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id) if (tx_queue_id >= dev->data->nb_tx_queues) return -EINVAL; - err = iavf_switch_queue(adapter, tx_queue_id, false, false); + if (!vf->lv_enabled) + err = iavf_switch_queue(adapter, tx_queue_id, false, false); + else + err = iavf_switch_queue_lv(adapter, tx_queue_id, false, false); + if (err) { PMD_DRV_LOG(ERR, "Failed to switch TX queue %u off", tx_queue_id); -- 2.25.1