From: Jie Hai <haijie1@huawei.com>
To: <dev@dpdk.org>, Thomas Monjalon <thomas@monjalon.net>,
Ferruh Yigit <ferruh.yigit@amd.com>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Cc: <lihuisong@huawei.com>, <fengchengwen@huawei.com>,
<liudongdong3@huawei.com>
Subject: [PATCH 7/9] lib/ethdev: add API to get RSS algorithm names
Date: Fri, 27 Oct 2023 17:28:34 +0800 [thread overview]
Message-ID: <20231027092836.445224-8-haijie1@huawei.com> (raw)
In-Reply-To: <20231027092836.445224-1-haijie1@huawei.com>
This patch adds new API rte_eth_dev_rss_algo_name() to get
name of a RSS algorithm and document it.
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
doc/guides/rel_notes/release_23_11.rst | 3 +++
lib/ethdev/rte_ethdev.c | 25 +++++++++++++++++++++++++
lib/ethdev/rte_ethdev.h | 4 ++++
3 files changed, 32 insertions(+)
diff --git a/doc/guides/rel_notes/release_23_11.rst b/doc/guides/rel_notes/release_23_11.rst
index a35d729d2cc7..fe561a6c59b9 100644
--- a/doc/guides/rel_notes/release_23_11.rst
+++ b/doc/guides/rel_notes/release_23_11.rst
@@ -243,6 +243,9 @@ New Features
Added dispatcher library which purpose is to help decouple different
parts (modules) of an eventdev-based application.
+* **Added new API for RSS hash algorithm**
+ Added new function ``rte_eth_dev_rss_algo_name`` to get name of RSS hash
+ algorithm.
Removed Items
-------------
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 7af163b8a4b3..503e1a4cd13d 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -160,6 +160,17 @@ enum {
STAT_QMAP_RX
};
+static const struct {
+ enum rte_eth_hash_function algo;
+ const char *name;
+} rte_eth_dev_rss_algo_names[] = {
+ {RTE_ETH_HASH_FUNCTION_DEFAULT, "default"},
+ {RTE_ETH_HASH_FUNCTION_SIMPLE_XOR, "simple_xor"},
+ {RTE_ETH_HASH_FUNCTION_TOEPLITZ, "toeplitz"},
+ {RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ, "symmetric_toeplitz"},
+ {RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ_SORT, "symmetric_toeplitz_sort"},
+};
+
int
rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs_str)
{
@@ -4761,6 +4772,20 @@ rte_eth_dev_rss_hash_conf_get(uint16_t port_id,
return ret;
}
+const char *
+rte_eth_dev_rss_algo_name(enum rte_eth_hash_function rss_algo)
+{
+ const char *name = "Unknown function";
+ unsigned int i;
+
+ for (i = 0; i < RTE_DIM(rte_eth_dev_rss_algo_names); i++) {
+ if (rss_algo == rte_eth_dev_rss_algo_names[i].algo)
+ return rte_eth_dev_rss_algo_names[i].name;
+ }
+
+ return name;
+}
+
int
rte_eth_dev_udp_tunnel_port_add(uint16_t port_id,
struct rte_eth_udp_tunnel *udp_tunnel)
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 2f639edd8218..b9d4bfa851b4 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -4645,6 +4645,10 @@ int
rte_eth_dev_rss_hash_conf_get(uint16_t port_id,
struct rte_eth_rss_conf *rss_conf);
+
+const char *
+rte_eth_dev_rss_algo_name(enum rte_eth_hash_function rss_algo);
+
/**
* Add UDP tunneling port for a type of tunnel.
*
--
2.30.0
next prev parent reply other threads:[~2023-10-27 9:33 UTC|newest]
Thread overview: 222+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-15 11:00 [PATCH 0/5] support setting and querying RSS algorithms Dongdong Liu
2023-03-15 11:00 ` [PATCH 1/5] ethdev: support setting and querying rss algorithm Dongdong Liu
2023-03-15 11:28 ` Ivan Malov
2023-03-16 13:10 ` Dongdong Liu
2023-03-16 14:31 ` Ivan Malov
2023-03-15 13:43 ` Thomas Monjalon
2023-03-16 13:16 ` Dongdong Liu
2023-06-02 20:19 ` Ferruh Yigit
2023-06-05 12:34 ` Dongdong Liu
2023-03-15 11:00 ` [PATCH 2/5] net/hns3: support setting and querying RSS hash function Dongdong Liu
2023-03-15 11:00 ` [PATCH 3/5] app/proc-info: fix never show RSS info Dongdong Liu
2023-06-02 20:19 ` Ferruh Yigit
2023-06-05 13:04 ` Dongdong Liu
2023-06-02 21:19 ` Stephen Hemminger
2023-06-05 13:07 ` Dongdong Liu
2023-03-15 11:00 ` [PATCH 4/5] app/proc-info: show RSS types with strings Dongdong Liu
2023-06-02 20:22 ` Ferruh Yigit
2023-06-05 13:12 ` Dongdong Liu
2023-03-15 11:00 ` [PATCH 5/5] app/proc-info: support querying RSS hash algorithm Dongdong Liu
2023-08-26 7:46 ` [PATCH v2 0/5] support setting and querying RSS algorithms Jie Hai
2023-08-26 7:46 ` [PATCH v2 1/5] ethdev: support setting and querying RSS algorithm Jie Hai
2023-08-30 11:46 ` Thomas Monjalon
2023-08-31 0:10 ` Ajit Khaparde
2023-08-31 10:59 ` Jie Hai
2023-09-04 6:26 ` Jie Hai
2023-09-05 16:17 ` Ajit Khaparde
2023-09-04 7:10 ` Jie Hai
2023-09-04 7:45 ` Thomas Monjalon
2023-09-08 8:44 ` Jie Hai
2023-09-09 0:01 ` Ajit Khaparde
2023-09-11 10:09 ` Thomas Monjalon
2023-09-11 16:11 ` Ajit Khaparde
2023-09-06 15:10 ` Stephen Hemminger
2023-09-08 9:28 ` Jie Hai
2023-09-08 20:58 ` Stephen Hemminger
2023-09-12 1:49 ` Jie Hai
2023-08-26 7:46 ` [PATCH v2 2/5] net/hns3: support setting and querying RSS hash function Jie Hai
2023-08-26 7:46 ` [PATCH v2 3/5] app/proc-info: fix never show RSS info Jie Hai
2023-08-26 7:46 ` [PATCH v2 4/5] app/proc-info: adjust the display format of " Jie Hai
2023-08-26 7:46 ` [PATCH v2 5/5] app/proc-info: support querying RSS hash algorithm Jie Hai
2023-09-04 6:10 ` [PATCH v3 0/5] support setting and querying RSS algorithms Jie Hai
2023-09-04 6:10 ` [PATCH v3 1/5] app/proc-info: fix never show RSS info Jie Hai
2023-09-04 6:10 ` [PATCH v3 2/5] app/proc-info: adjust the display format of " Jie Hai
2023-09-04 6:10 ` [PATCH v3 3/5] app/proc-info: support querying RSS hash algorithm Jie Hai
2023-09-04 6:10 ` [PATCH v3 4/5] app/testpmd: add RSS hash algorithms display Jie Hai
2023-09-04 6:10 ` [PATCH v3 5/5] app/testpmd: add RSS hash algorithms setting Jie Hai
2023-09-04 7:37 ` [PATCH v3 0/5] support setting and querying RSS algorithms Jie Hai
2023-09-04 7:28 ` [PATCH " Jie Hai
2023-09-04 7:28 ` [PATCH 1/5] ethdev: support setting and querying RSS algorithm Jie Hai
2023-09-04 7:28 ` [PATCH 2/5] net/hns3: support setting and querying RSS hash function Jie Hai
2023-09-04 7:28 ` [PATCH 3/5] app/proc-info: fix never show RSS info Jie Hai
2023-09-05 16:29 ` Pattan, Reshma
2023-09-08 8:01 ` Jie Hai
2023-09-04 7:28 ` [PATCH 4/5] app/proc-info: adjust the display format of " Jie Hai
2023-09-04 7:28 ` [PATCH 5/5] app/proc-info: support querying RSS hash algorithm Jie Hai
2023-09-05 17:07 ` Pattan, Reshma
2023-09-08 8:01 ` Jie Hai
2023-09-08 8:00 ` [PATCH v4 0/7] support setting and querying RSS algorithms Jie Hai
2023-09-08 8:00 ` [PATCH v4 1/7] ethdev: recomment some definitions related to RSS Jie Hai
2023-09-20 16:39 ` Ferruh Yigit
2023-09-26 12:08 ` Jie Hai
2023-09-08 8:00 ` [PATCH v4 2/7] ethdev: support setting and querying RSS algorithm Jie Hai
2023-09-20 16:39 ` Ferruh Yigit
2023-09-20 17:15 ` Ajit Khaparde
2023-09-26 13:23 ` Jie Hai
2023-09-08 8:00 ` [PATCH v4 3/7] net/hns3: support setting and querying RSS hash function Jie Hai
2023-09-08 8:00 ` [PATCH v4 4/7] app/proc-info: fix never show RSS info Jie Hai
2023-09-13 11:48 ` Pattan, Reshma
2023-09-25 1:13 ` Jie Hai
2023-09-08 8:00 ` [PATCH v4 5/7] app/proc-info: adjust the display format of " Jie Hai
2023-09-13 12:22 ` Pattan, Reshma
2023-09-08 8:00 ` [PATCH v4 6/7] app/proc-info: support querying RSS hash algorithm Jie Hai
2023-09-13 11:42 ` Pattan, Reshma
2023-09-13 11:44 ` Pattan, Reshma
2023-09-08 8:00 ` [PATCH v4 7/7] app/testpmd: add RSS hash algorithms display Jie Hai
2023-10-11 9:27 ` [PATCH v5 00/40] support setting and querying RSS algorithms Jie Hai
2023-10-11 9:27 ` [PATCH v5 01/40] ethdev: overwrite some comment related to RSS Jie Hai
2023-10-11 16:31 ` Ferruh Yigit
2023-10-12 2:03 ` Jie Hai
2023-10-12 2:47 ` fengchengwen
2023-10-11 9:27 ` [PATCH v5 02/40] ethdev: support setting and querying RSS algorithm Jie Hai
2023-10-11 17:39 ` Stephen Hemminger
2023-10-12 2:21 ` fengchengwen
2023-10-12 15:23 ` Stephen Hemminger
2023-10-24 12:54 ` Jie Hai
2023-10-11 9:27 ` [PATCH v5 03/40] net/atlantic: check RSS hash algorithms Jie Hai
2023-10-11 9:27 ` [PATCH v5 04/40] net/axgbe: " Jie Hai
2023-10-11 9:27 ` [PATCH v5 05/40] net/bnx2x: " Jie Hai
2023-10-11 17:02 ` Ferruh Yigit
2023-10-11 9:27 ` [PATCH v5 06/40] net/bnxt: " Jie Hai
2023-10-11 9:27 ` [PATCH v5 07/40] net/bonding: " Jie Hai
2023-10-11 9:27 ` [PATCH v5 08/40] net/cnxk: " Jie Hai
2023-10-11 17:04 ` Ferruh Yigit
2023-10-12 2:25 ` Jie Hai
2023-10-11 9:27 ` [PATCH v5 09/40] net/cpfl: " Jie Hai
2023-10-11 17:20 ` Ferruh Yigit
2023-10-12 2:34 ` Xing, Beilei
2023-10-11 9:27 ` [PATCH v5 10/40] net/cxgbe: " Jie Hai
2023-10-11 9:27 ` [PATCH v5 11/40] net/dpaa: " Jie Hai
2023-10-11 9:27 ` [PATCH v5 12/40] net/dpaa2: " Jie Hai
2023-10-11 9:27 ` [PATCH v5 13/40] net/ena: " Jie Hai
2023-10-11 17:27 ` Ferruh Yigit
2023-10-12 2:35 ` Jie Hai
2023-10-11 9:27 ` [PATCH v5 14/40] net/enic: " Jie Hai
2023-10-11 17:32 ` Ferruh Yigit
2023-10-12 18:09 ` John Daley (johndale)
2023-10-11 9:27 ` [PATCH v5 15/40] net/fm10k: " Jie Hai
2023-10-11 9:27 ` [PATCH v5 16/40] net/hinic: " Jie Hai
2023-10-11 9:27 ` [PATCH v5 17/40] net/i40e: " Jie Hai
2023-10-11 9:27 ` [PATCH v5 18/40] net/iavf: " Jie Hai
2023-10-11 9:27 ` [PATCH v5 19/40] net/ice: " Jie Hai
2023-10-11 9:27 ` [PATCH v5 20/40] net/idpf: " Jie Hai
2023-10-11 9:27 ` [PATCH v5 21/40] net/igc: " Jie Hai
2023-10-11 17:51 ` Ferruh Yigit
2023-10-11 9:27 ` [PATCH v5 22/40] net/ionic: " Jie Hai
2023-10-11 9:27 ` [PATCH v5 23/40] net/ixgbe: " Jie Hai
2023-10-11 9:27 ` [PATCH v5 24/40] net/mana: " Jie Hai
2023-10-11 9:27 ` [PATCH v5 25/40] net/mlx5: " Jie Hai
2023-10-11 9:27 ` [PATCH v5 26/40] net/mvpp2: " Jie Hai
2023-10-11 18:00 ` Ferruh Yigit
2023-10-12 2:21 ` Jie Hai
2023-10-11 9:27 ` [PATCH v5 27/40] net/netvsc: " Jie Hai
2023-10-11 9:27 ` [PATCH v5 28/40] net/ngbe: : " Jie Hai
2023-10-11 9:27 ` [PATCH v5 29/40] net/nfp: " Jie Hai
2023-10-11 9:27 ` [PATCH v5 30/40] net/null: " Jie Hai
2023-10-11 18:06 ` Ferruh Yigit
2023-10-11 9:27 ` [PATCH v5 31/40] net/qede: " Jie Hai
2023-10-11 9:27 ` [PATCH v5 32/40] net/sfc: " Jie Hai
2023-10-11 9:27 ` [PATCH v5 33/40] net/tap: " Jie Hai
2023-10-11 18:13 ` Ferruh Yigit
2023-10-11 9:27 ` [PATCH v5 34/40] net/thunderx: " Jie Hai
2023-10-11 9:28 ` [PATCH v5 35/40] net/txgbe: " Jie Hai
2023-10-11 9:28 ` [PATCH v5 36/40] net/hns3: support setting and querying RSS hash function Jie Hai
2023-10-12 2:23 ` fengchengwen
2023-10-12 2:56 ` Jie Hai
2023-10-12 3:05 ` Jie Hai
2023-10-12 3:59 ` fengchengwen
2023-10-11 9:28 ` [PATCH v5 37/40] app/proc-info: fix never show RSS info Jie Hai
2023-10-12 1:59 ` fengchengwen
2023-10-11 9:28 ` [PATCH v5 38/40] app/proc-info: adjust the display format of " Jie Hai
2023-10-12 2:01 ` fengchengwen
2023-10-12 3:10 ` Jie Hai
2023-10-11 9:28 ` [PATCH v5 39/40] app/proc-info: support querying RSS hash algorithm Jie Hai
2023-10-12 2:05 ` fengchengwen
2023-10-12 3:51 ` Jie Hai
2023-10-11 9:28 ` [PATCH v5 40/40] app/testpmd: add RSS hash algorithms display Jie Hai
2023-10-12 3:04 ` fengchengwen
2023-10-11 18:19 ` [PATCH v5 00/40] support setting and querying RSS algorithms Ferruh Yigit
2023-10-12 16:49 ` Stephen Hemminger
2023-10-17 14:06 ` Thomas Monjalon
2023-10-17 14:26 ` Ferruh Yigit
2023-10-24 12:57 ` lihuisong (C)
2023-10-26 8:53 ` Thomas Monjalon
2023-10-27 9:28 ` [PATCH 0/9] " Jie Hai
2023-10-27 9:28 ` [PATCH 1/9] ethdev: overwrite some comment related to RSS Jie Hai
2023-10-29 7:26 ` Ori Kam
2023-11-01 6:06 ` Jie Hai
2023-10-27 9:28 ` [PATCH 2/9] ethdev: support setting and querying RSS algorithm Jie Hai
2023-10-27 9:28 ` [PATCH 3/9] net/hns3: report RSS hash algorithms capability Jie Hai
2023-10-27 9:28 ` [PATCH 4/9] net/hns3: support setting and querying RSS hash function Jie Hai
2023-10-27 9:28 ` [PATCH 5/9] app/proc-info: fix never show RSS info Jie Hai
2023-10-27 9:28 ` [PATCH 6/9] app/proc-info: adjust the display format of " Jie Hai
2023-10-27 9:28 ` Jie Hai [this message]
2023-10-27 9:28 ` [PATCH 8/9] app/proc-info: support querying RSS hash algorithm Jie Hai
2023-10-27 9:28 ` [PATCH 9/9] app/testpmd: add RSS hash algorithms display Jie Hai
2023-10-28 1:46 ` [PATCH v7 0/9] support setting and querying RSS algorithms Jie Hai
2023-10-28 1:46 ` [PATCH v7 1/9] ethdev: overwrite some comment related to RSS Jie Hai
2023-10-28 2:41 ` lihuisong (C)
2023-11-01 12:55 ` Ferruh Yigit
2023-10-28 1:46 ` [PATCH v7 2/9] ethdev: support setting and querying RSS algorithm Jie Hai
2023-10-28 3:01 ` lihuisong (C)
2023-11-01 12:55 ` Ferruh Yigit
2023-10-28 1:46 ` [PATCH v7 3/9] net/hns3: report RSS hash algorithms capability Jie Hai
2023-10-28 3:02 ` lihuisong (C)
2023-10-28 1:46 ` [PATCH v7 4/9] net/hns3: support setting and querying RSS hash function Jie Hai
2023-10-28 1:46 ` [PATCH v7 5/9] app/proc-info: fix never show RSS info Jie Hai
2023-10-28 3:03 ` lihuisong (C)
2023-10-28 1:46 ` [PATCH v7 6/9] app/proc-info: adjust the display format of " Jie Hai
2023-10-28 1:46 ` [PATCH v7 7/9] lib/ethdev: add API to get RSS algorithm names Jie Hai
2023-10-28 3:09 ` lihuisong (C)
2023-11-01 2:04 ` Ferruh Yigit
2023-10-28 1:46 ` [PATCH v7 8/9] app/proc-info: support querying RSS hash algorithm Jie Hai
2023-10-28 1:46 ` [PATCH v7 9/9] app/testpmd: add RSS hash algorithms display Jie Hai
2023-10-28 3:14 ` lihuisong (C)
2023-11-01 2:04 ` [PATCH v7 0/9] support setting and querying RSS algorithms Ferruh Yigit
2023-11-01 7:40 ` [PATCH v8 00/10] " Jie Hai
2023-11-01 7:40 ` [PATCH v8 01/10] ethdev: overwrite some comment related to RSS Jie Hai
2023-11-01 10:09 ` lihuisong (C)
2023-11-01 13:13 ` Ferruh Yigit
2023-11-02 3:29 ` Jie Hai
2023-11-01 7:40 ` [PATCH v8 02/10] lib/ethdev: check RSS key length Jie Hai
2023-11-01 10:07 ` lihuisong (C)
2023-11-01 13:19 ` Ferruh Yigit
2023-11-02 3:40 ` Jie Hai
2023-11-01 7:40 ` [PATCH v8 03/10] ethdev: support setting and querying RSS algorithm Jie Hai
2023-11-01 13:36 ` Ferruh Yigit
2023-11-02 6:58 ` Jie Hai
2023-11-01 7:40 ` [PATCH v8 04/10] net/hns3: report RSS hash algorithms capability Jie Hai
2023-11-01 7:40 ` [PATCH v8 05/10] net/hns3: support setting and querying RSS hash function Jie Hai
2023-11-01 7:40 ` [PATCH v8 06/10] app/proc-info: fix never show RSS info Jie Hai
2023-11-01 7:40 ` [PATCH v8 07/10] app/proc-info: adjust the display format of " Jie Hai
2023-11-01 7:40 ` [PATCH v8 08/10] ethdev: add API to get RSS algorithm names Jie Hai
2023-11-01 7:40 ` [PATCH v8 09/10] app/proc-info: support querying RSS hash algorithm Jie Hai
2023-11-01 10:08 ` lihuisong (C)
2023-11-01 7:40 ` [PATCH v8 10/10] app/testpmd: add RSS hash algorithms display Jie Hai
2023-11-01 13:42 ` Ferruh Yigit
2023-11-02 7:33 ` Jie Hai
2023-11-01 9:44 ` [PATCH v8 00/10] support setting and querying RSS algorithms fengchengwen
2023-11-02 8:20 ` [PATCH v9 0/9] " Jie Hai
2023-11-02 8:20 ` [PATCH v9 1/9] ethdev: overwrite some comment related to RSS Jie Hai
2023-11-06 10:57 ` Andrew Rybchenko
2023-11-02 8:20 ` [PATCH v9 2/9] ethdev: support setting and querying RSS algorithm Jie Hai
2023-11-03 15:52 ` Ferruh Yigit
2023-11-02 8:20 ` [PATCH v9 3/9] net/hns3: report RSS hash algorithms capability Jie Hai
2023-11-02 8:20 ` [PATCH v9 4/9] net/hns3: support setting and querying RSS hash function Jie Hai
2023-11-02 8:20 ` [PATCH v9 5/9] app/proc-info: fix never show RSS info Jie Hai
2023-11-02 8:20 ` [PATCH v9 6/9] app/proc-info: adjust the display format of " Jie Hai
2023-11-02 8:20 ` [PATCH v9 7/9] ethdev: add API to get RSS algorithm names Jie Hai
2023-11-06 10:43 ` Andrew Rybchenko
2023-11-02 8:20 ` [PATCH v9 8/9] app/proc-info: support querying RSS hash algorithm Jie Hai
2023-11-02 8:20 ` [PATCH v9 9/9] app/testpmd: add RSS hash algorithms display Jie Hai
2023-11-02 13:11 ` [PATCH v9 0/9] support setting and querying RSS algorithms Ferruh Yigit
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=20231027092836.445224-8-haijie1@huawei.com \
--to=haijie1@huawei.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=ferruh.yigit@amd.com \
--cc=lihuisong@huawei.com \
--cc=liudongdong3@huawei.com \
--cc=thomas@monjalon.net \
/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).