From patchwork Thu Aug 31 12:33:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 130988 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6B9A241FDD; Thu, 31 Aug 2023 14:34:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 199B2402AB; Thu, 31 Aug 2023 14:34:04 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 38DE0402AF for ; Thu, 31 Aug 2023 14:34:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693485242; x=1725021242; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3XBqPQgVvJQNy2LvCY+Yep7093VsgR9okFBo7HfWajg=; b=iXQviYQuDO7v+xAWEaLdALLSUPvpr77Ts8bxUMZ3nB+f7ueDMhq/xRpV hUyMbcg0BjyLxuSbYAE7oFsYpFPMsK1Hk/XE5fyTvxJDM6J68XcbXKXsR KyuQ8kJhaPviVAGZRGXh6XP/sO6IE/VMjBfpage+QkOKfPHToEoJfklST xB4g38nhZ/8yaGR42URS+Emz7sw1yLA5mkXsu4jdbOxaMeQNWBprfMYcY WNmbylbam8nEk/8/N/6Y/t/ieyia0PZM/SiAs7HWV+ZkU5/pCwLCx3+d+ rBMGliDX7hBo3uW8VGl6Je7/t9XdGpfnBXzUC5wUTC/21Wd5QVuo0RTdU A==; X-IronPort-AV: E=McAfee;i="6600,9927,10818"; a="439874012" X-IronPort-AV: E=Sophos;i="6.02,216,1688454000"; d="scan'208";a="439874012" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2023 05:34:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10818"; a="913230969" X-IronPort-AV: E=Sophos;i="6.02,216,1688454000"; d="scan'208";a="913230969" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by orsmga005.jf.intel.com with ESMTP; 31 Aug 2023 05:34:01 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v2 4/4] net/iavf: add support for runtime queue reconfiguration Date: Thu, 31 Aug 2023 13:33:37 +0100 Message-Id: <20230831123337.871496-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230831123337.871496-1-bruce.richardson@intel.com> References: <20230830155919.592390-1-bruce.richardson@intel.com> <20230831123337.871496-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 Unlike the i40e driver, the iavf driver does not advertise support for runtime reconfiguration, meaning that application using the same hardware may get different behaviour when using a PF vs a VF. On testing with a 40G NIC, the only blocker to reconfiguring an RX queue on the fly is the fact that this support is not advertised by the driver. Add support for runtime reconfig by reporting it in the device info flags. Signed-off-by: Bruce Richardson Acked-by: Qi Zhang --- doc/guides/nics/features/iavf.ini | 2 ++ drivers/net/iavf/iavf_ethdev.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/guides/nics/features/iavf.ini b/doc/guides/nics/features/iavf.ini index b72cd98484..db4f92ce71 100644 --- a/doc/guides/nics/features/iavf.ini +++ b/doc/guides/nics/features/iavf.ini @@ -11,6 +11,8 @@ Speed capabilities = Y Link status = Y Rx interrupt = Y Queue start/stop = Y +Runtime Rx queue setup = Y +Runtime Tx queue setup = Y Power mgmt address monitor = Y MTU update = Y Scattered Rx = Y diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index f2fc5a5621..22fbd7d6b2 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -1127,7 +1127,9 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->reta_size = vf->vf_res->rss_lut_size; dev_info->flow_type_rss_offloads = IAVF_RSS_OFFLOAD_ALL; dev_info->max_mac_addrs = IAVF_NUM_MACADDR_MAX; - dev_info->dev_capa &= ~RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP; + dev_info->dev_capa = + RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP | + RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP; dev_info->rx_offload_capa = RTE_ETH_RX_OFFLOAD_VLAN_STRIP | RTE_ETH_RX_OFFLOAD_QINQ_STRIP |