DPDK patches and discussions
 help / color / mirror / Atom feed
From: beilei.xing@intel.com
To: jingjing.wu@intel.com
Cc: dev@dpdk.org, qi.z.zhang@intel.com, Beilei Xing <beilei.xing@intel.com>
Subject: [PATCH v3 06/15] common/idpf: add config RSS
Date: Tue, 17 Jan 2023 07:26:14 +0000	[thread overview]
Message-ID: <20230117072626.93796-8-beilei.xing@intel.com> (raw)
In-Reply-To: <20230117072626.93796-1-beilei.xing@intel.com>

From: Beilei Xing <beilei.xing@intel.com>

Move configure RSS to common module.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 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


  parent reply	other threads:[~2023-01-17  7:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <https://patches.dpdk.org/project/dpdk/cover/20230106091627.13530-1-beilei.xing@intel.com/>
2023-01-17  7:26 ` [PATCH v3 00/15] net/idpf: introduce idpf common modle beilei.xing
2023-01-17  7:26   ` [PATCH v3 01/15] common/idpf: add adapter structure beilei.xing
2023-01-17  7:26   ` [PATCH v3 02/15] common/idpf: add vport structure beilei.xing
2023-01-17  7:26   ` [PATCH v3 03/15] common/idpf: add virtual channel functions beilei.xing
2023-01-17  7:26   ` [PATCH 03/15] common/idpf: move vc functions to common module beilei.xing
2023-01-17  7:26   ` [PATCH v3 04/15] common/idpf: introduce adapter init and deinit beilei.xing
2023-01-17  7:26   ` [PATCH v3 05/15] common/idpf: add vport init/deinit beilei.xing
2023-01-17  7:26   ` beilei.xing [this message]
2023-01-17  7:26   ` [PATCH v3 07/15] common/idpf: add irq map/unmap beilei.xing
2023-01-17  7:26   ` [PATCH 08/15] common/idpf: move ptype table to adapter structure beilei.xing
2023-01-17  7:26   ` [PATCH v3 08/15] common/idpf: support get packet type beilei.xing
2023-01-17  7:26   ` [PATCH v3 09/15] common/idpf: add vport info initialization beilei.xing
2023-01-17  7:26   ` [PATCH 09/15] common/idpf: init create vport info beilei.xing
2023-01-17  7:26   ` [PATCH v3 10/15] common/idpf: add vector flags in vport beilei.xing
2023-01-17  7:26   ` [PATCH v3 11/15] common/idpf: add rxq and txq struct beilei.xing
2023-01-17  7:26   ` [PATCH v3 12/15] common/idpf: add help functions for queue setup and release beilei.xing
2023-01-17  7:26   ` [PATCH v3 13/15] common/idpf: add Rx and Tx data path beilei.xing
2023-01-17  7:26   ` [PATCH 13/15] common/idpf: add scalar " beilei.xing
2023-01-17  7:26   ` [PATCH v3 14/15] common/idpf: add vec queue setup beilei.xing
2023-01-17  7:26   ` [PATCH v3 15/15] common/idpf: add avx512 for single queue model beilei.xing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230117072626.93796-8-beilei.xing@intel.com \
    --to=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=qi.z.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).