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 v2 06/15] common/idpf: add config RSS
Date: Fri, 6 Jan 2023 09:16:18 +0000 [thread overview]
Message-ID: <20230106091627.13530-7-beilei.xing@intel.com> (raw)
In-Reply-To: <20230106091627.13530-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/idpf_common_virtchnl.h | 3 ---
drivers/common/idpf/version.map | 4 +---
drivers/net/idpf/idpf_ethdev.c | 26 ----------------------
5 files changed, 28 insertions(+), 32 deletions(-)
diff --git a/drivers/common/idpf/idpf_common_device.c b/drivers/common/idpf/idpf_common_device.c
index 2aad9bcdd3..19d638824d 100644
--- a/drivers/common/idpf/idpf_common_device.c
+++ b/drivers/common/idpf/idpf_common_device.c
@@ -286,4 +286,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 1f7483fd85..026d852de4 100644
--- a/drivers/common/idpf/idpf_common_device.h
+++ b/drivers/common/idpf/idpf_common_device.h
@@ -150,5 +150,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/idpf_common_virtchnl.h b/drivers/common/idpf/idpf_common_virtchnl.h
index e9e1c172eb..182a6a4490 100644
--- a/drivers/common/idpf/idpf_common_virtchnl.h
+++ b/drivers/common/idpf/idpf_common_virtchnl.h
@@ -12,11 +12,8 @@ int idpf_vc_get_caps(struct idpf_adapter *adapter);
int idpf_vc_create_vport(struct idpf_vport *vport,
struct virtchnl2_create_vport *vport_info);
int idpf_vc_destroy_vport(struct idpf_vport *vport);
-__rte_internal
int idpf_vc_set_rss_key(struct idpf_vport *vport);
-__rte_internal
int idpf_vc_set_rss_lut(struct idpf_vport *vport);
-__rte_internal
int idpf_vc_set_rss_hash(struct idpf_vport *vport);
__rte_internal
int idpf_switch_queue(struct idpf_vport *vport, uint16_t qid,
diff --git a/drivers/common/idpf/version.map b/drivers/common/idpf/version.map
index 172906fcfa..62ea6579e3 100644
--- a/drivers/common/idpf/version.map
+++ b/drivers/common/idpf/version.map
@@ -7,9 +7,6 @@ INTERNAL {
idpf_ctlq_recv;
idpf_ctlq_send;
idpf_ctlq_post_rx_buffs;
- idpf_vc_set_rss_key;
- idpf_vc_set_rss_lut;
- idpf_vc_set_rss_hash;
idpf_switch_queue;
idpf_vc_ena_dis_queues;
idpf_vc_ena_dis_vport;
@@ -23,6 +20,7 @@ INTERNAL {
idpf_adapter_deinit;
idpf_vport_init;
idpf_vport_deinit;
+ idpf_config_rss;
local: *;
};
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
next prev parent reply other threads:[~2023-01-06 9:40 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-08 7:52 [PATCH 00/15] net/idpf: refactor idpf pmd beilei.xing
2022-12-08 7:52 ` [PATCH 01/15] common/idpf: add adapter structure beilei.xing
2022-12-08 7:52 ` [PATCH 02/15] common/idpf: add vport structure beilei.xing
2022-12-08 7:52 ` [PATCH 03/15] common/idpf: move vc functions to common module beilei.xing
2022-12-08 7:52 ` [PATCH 04/15] common/idpf: introduce adapter init and deinit beilei.xing
2022-12-08 7:52 ` [PATCH 05/15] common/idpf: add vport init/deinit beilei.xing
2022-12-08 7:53 ` [PATCH 06/15] common/idpf: add config RSS beilei.xing
2022-12-08 7:53 ` [PATCH 07/15] common/idpf: add irq map/unmap beilei.xing
2022-12-08 7:53 ` [PATCH 08/15] common/idpf: move ptype table to adapter structure beilei.xing
2022-12-08 7:53 ` [PATCH 09/15] common/idpf: init create vport info beilei.xing
2022-12-08 7:53 ` [PATCH 10/15] common/idpf: add vector flags in vport beilei.xing
2022-12-08 7:53 ` [PATCH 11/15] common/idpf: add rxq and txq struct beilei.xing
2022-12-08 7:53 ` [PATCH 12/15] common/idpf: add help functions for queue setup and release beilei.xing
2022-12-08 7:53 ` [PATCH 13/15] common/idpf: add scalar data path beilei.xing
2022-12-08 7:53 ` [PATCH 14/15] common/idpf: add vec queue setup beilei.xing
2022-12-08 7:53 ` [PATCH 15/15] common/idpf: add avx512 for single queue model beilei.xing
2023-01-06 9:16 ` [PATCH v2 00/15] net/idpf: introduce idpf common modle beilei.xing
2023-01-06 9:16 ` [PATCH v2 01/15] common/idpf: add adapter structure beilei.xing
2023-01-06 9:16 ` [PATCH v2 02/15] common/idpf: add vport structure beilei.xing
2023-01-06 9:16 ` [PATCH v2 03/15] common/idpf: move vc functions to common module beilei.xing
2023-01-06 9:16 ` [PATCH v2 04/15] common/idpf: introduce adapter init and deinit beilei.xing
2023-01-06 9:16 ` [PATCH v2 05/15] common/idpf: add vport init/deinit beilei.xing
2023-01-08 12:10 ` Zhang, Qi Z
2023-01-09 1:34 ` Xing, Beilei
2023-01-06 9:16 ` beilei.xing [this message]
2023-01-06 9:16 ` [PATCH v2 07/15] common/idpf: add irq map/unmap beilei.xing
2023-01-17 1:14 ` Zhang, Qi Z
2023-01-06 9:16 ` [PATCH v2 08/15] common/idpf: move ptype table to adapter structure beilei.xing
2023-01-06 9:16 ` [PATCH v2 09/15] common/idpf: init create vport info beilei.xing
2023-01-06 9:16 ` [PATCH v2 10/15] common/idpf: add vector flags in vport beilei.xing
2023-01-06 9:16 ` [PATCH v2 11/15] common/idpf: add rxq and txq struct beilei.xing
2023-01-06 9:16 ` [PATCH v2 12/15] common/idpf: add help functions for queue setup and release beilei.xing
2023-01-06 9:16 ` [PATCH v2 13/15] common/idpf: add scalar data path beilei.xing
2023-01-06 9:16 ` [PATCH v2 14/15] common/idpf: add vec queue setup beilei.xing
2023-01-06 9:16 ` [PATCH v2 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=20230106091627.13530-7-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).