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 EF7C9423FA; Tue, 17 Jan 2023 08:51:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F329942D53; Tue, 17 Jan 2023 08:51:03 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 1BC5242D4D for ; Tue, 17 Jan 2023 08:51:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673941862; x=1705477862; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sgEbeQUfERDAXOUxrhxN2PkK2Ce3LiZZ94h0Co/lx4M=; b=dXv2lmgCQDxEoccj5rAqZFn3QhbjiW3/17rQeJ3XDvE0tE6IOd0dJxDu ks5g3/Kpj9dA8BeQfdm8Cg9uKivJM7mh422uaa4EwrlaeLxutc6fpzUcA ERPC4DhENTXyqqOQ5ms3LTYbyR5RncR8O0I2SO/WoS7hBwM3k893lre1x SNXTDpYqAFyAmmNqwtJ3K6tBs46WgA9R5HbYVJd7oG6v2XdlBHU4M+Dzl 8TOYJTs++h5Xo0akLeQJ8y54dMYB30P4ZnyUh7EUNORmhTS10bcrAIH28 pc3IE7lEYuF0GlevcwMi0uC3pcP7GJ/Y9usgQEJX8AyT/IWLkz1FxaYu1 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="312497029" X-IronPort-AV: E=Sophos;i="5.97,222,1669104000"; d="scan'208";a="312497029" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2023 23:51:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="767174507" X-IronPort-AV: E=Sophos;i="5.97,222,1669104000"; d="scan'208";a="767174507" Received: from dpdk-beileix-3.sh.intel.com ([10.67.110.253]) by fmsmga002.fm.intel.com with ESMTP; 16 Jan 2023 23:50:59 -0800 From: beilei.xing@intel.com To: jingjing.wu@intel.com Cc: dev@dpdk.org, qi.z.zhang@intel.com, Beilei Xing Subject: [PATCH v3 06/15] common/idpf: add config RSS Date: Tue, 17 Jan 2023 07:26:14 +0000 Message-Id: <20230117072626.93796-8-beilei.xing@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20230117072626.93796-1-beilei.xing@intel.com> References: <20230117072626.93796-1-beilei.xing@intel.com> 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 From: Beilei Xing Move configure RSS to common module. Signed-off-by: Beilei Xing --- drivers/common/idpf/idpf_common_device.c | 25 +++++++++++++++++++++++ drivers/common/idpf/idpf_common_device.h | 2 ++ drivers/common/idpf/version.map | 1 + drivers/net/idpf/idpf_ethdev.c | 26 ------------------------ 4 files changed, 28 insertions(+), 26 deletions(-) diff --git a/drivers/common/idpf/idpf_common_device.c b/drivers/common/idpf/idpf_common_device.c index 5628fb5c57..eee96b5083 100644 --- a/drivers/common/idpf/idpf_common_device.c +++ b/drivers/common/idpf/idpf_common_device.c @@ -273,4 +273,29 @@ idpf_vport_deinit(struct idpf_vport *vport) return 0; } +int +idpf_config_rss(struct idpf_vport *vport) +{ + int ret; + + ret = idpf_vc_set_rss_key(vport); + if (ret != 0) { + DRV_LOG(ERR, "Failed to configure RSS key"); + return ret; + } + + ret = idpf_vc_set_rss_lut(vport); + if (ret != 0) { + DRV_LOG(ERR, "Failed to configure RSS lut"); + return ret; + } + + ret = idpf_vc_set_rss_hash(vport); + if (ret != 0) { + DRV_LOG(ERR, "Failed to configure RSS hash"); + return ret; + } + + return ret; +} RTE_LOG_REGISTER_SUFFIX(idpf_common_logtype, common, NOTICE); diff --git a/drivers/common/idpf/idpf_common_device.h b/drivers/common/idpf/idpf_common_device.h index 14d04268e5..1d3bb06fef 100644 --- a/drivers/common/idpf/idpf_common_device.h +++ b/drivers/common/idpf/idpf_common_device.h @@ -153,5 +153,7 @@ int idpf_vport_init(struct idpf_vport *vport, void *dev_data); __rte_internal int idpf_vport_deinit(struct idpf_vport *vport); +__rte_internal +int idpf_config_rss(struct idpf_vport *vport); #endif /* _IDPF_COMMON_DEVICE_H_ */ diff --git a/drivers/common/idpf/version.map b/drivers/common/idpf/version.map index 680a69822c..d8d5275b1c 100644 --- a/drivers/common/idpf/version.map +++ b/drivers/common/idpf/version.map @@ -3,6 +3,7 @@ INTERNAL { idpf_adapter_deinit; idpf_adapter_init; + idpf_config_rss; idpf_ctlq_clean_sq; idpf_ctlq_deinit; idpf_ctlq_init; diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c index 7a8fb6fd4a..f728318dad 100644 --- a/drivers/net/idpf/idpf_ethdev.c +++ b/drivers/net/idpf/idpf_ethdev.c @@ -178,32 +178,6 @@ idpf_init_vport_req_info(struct rte_eth_dev *dev, return 0; } -static int -idpf_config_rss(struct idpf_vport *vport) -{ - int ret; - - ret = idpf_vc_set_rss_key(vport); - if (ret != 0) { - PMD_INIT_LOG(ERR, "Failed to configure RSS key"); - return ret; - } - - ret = idpf_vc_set_rss_lut(vport); - if (ret != 0) { - PMD_INIT_LOG(ERR, "Failed to configure RSS lut"); - return ret; - } - - ret = idpf_vc_set_rss_hash(vport); - if (ret != 0) { - PMD_INIT_LOG(ERR, "Failed to configure RSS hash"); - return ret; - } - - return ret; -} - static int idpf_init_rss(struct idpf_vport *vport) { -- 2.26.2