patch 'examples/l3fwd: remove hash entry number' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Sun Apr 9 17:25:08 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/003a860c86a4cb826f380ba7910e38865d786763

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 003a860c86a4cb826f380ba7910e38865d786763 Mon Sep 17 00:00:00 2001
From: Kamalakshitha Aligeri <kamalakshitha.aligeri at arm.com>
Date: Mon, 6 Mar 2023 16:25:06 +0000
Subject: [PATCH] examples/l3fwd: remove hash entry number
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit f5251734c5e16db9c9881883f7933bd51a9be861 ]

hash_entry_number in l3fwd is not being used by both lpm and em lookup
method. Removed the global variable hash_entry_number and the function
that parses the hash-entry-number flag.

Fixes: e7e6dd643092 ("examples/l3fwd: support config file for EM")

Signed-off-by: Kamalakshitha Aligeri <kamalakshitha.aligeri at arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
---
 examples/l3fwd/l3fwd.h |  1 -
 examples/l3fwd/main.c  | 38 +-------------------------------------
 2 files changed, 1 insertion(+), 38 deletions(-)

diff --git a/examples/l3fwd/l3fwd.h b/examples/l3fwd/l3fwd.h
index ca1426a687..b55855c932 100644
--- a/examples/l3fwd/l3fwd.h
+++ b/examples/l3fwd/l3fwd.h
@@ -55,7 +55,6 @@
 /* 32-bit has less address-space for hugepage memory, limit to 1M entries */
 #define L3FWD_HASH_ENTRIES		(1024*1024*1)
 #endif
-#define HASH_ENTRY_NUMBER_DEFAULT	16
 
 struct parm_cfg {
 	const char *rule_ipv4_name;
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 5198ff30dd..a4f061537e 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -89,7 +89,6 @@ uint32_t enabled_port_mask;
 
 /* Used only in exact match mode. */
 int ipv6; /**< ipv6 is false by default. */
-uint32_t hash_entry_number = HASH_ENTRY_NUMBER_DEFAULT;
 
 struct lcore_conf lcore_conf[RTE_MAX_LCORE];
 
@@ -395,7 +394,6 @@ print_usage(const char *prgname)
 		" [--eth-dest=X,MM:MM:MM:MM:MM:MM]"
 		" [--max-pkt-len PKTLEN]"
 		" [--no-numa]"
-		" [--hash-entry-num]"
 		" [--ipv6]"
 		" [--parse-ptype]"
 		" [--per-port-pool]"
@@ -419,7 +417,6 @@ print_usage(const char *prgname)
 		"  --eth-dest=X,MM:MM:MM:MM:MM:MM: Ethernet destination for port X\n"
 		"  --max-pkt-len PKTLEN: maximum packet length in decimal (64-9600)\n"
 		"  --no-numa: Disable numa awareness\n"
-		"  --hash-entry-num: Specify the hash entry number in hexadecimal to be setup\n"
 		"  --ipv6: Set if running ipv6 packets\n"
 		"  --parse-ptype: Set to use software to analyze packet type\n"
 		"  --per-port-pool: Use separate buffer pool per port\n"
@@ -479,22 +476,6 @@ parse_portmask(const char *portmask)
 	return pm;
 }
 
-static int
-parse_hash_entry_number(const char *hash_entry_num)
-{
-	char *end = NULL;
-	unsigned long hash_en;
-	/* parse hexadecimal string */
-	hash_en = strtoul(hash_entry_num, &end, 16);
-	if ((hash_entry_num[0] == '\0') || (end == NULL) || (*end != '\0'))
-		return -1;
-
-	if (hash_en == 0)
-		return -1;
-
-	return hash_en;
-}
-
 static int
 parse_config(const char *q_arg)
 {
@@ -852,14 +833,7 @@ parse_args(int argc, char **argv)
 			break;
 
 		case CMD_LINE_OPT_HASH_ENTRY_NUM_NUM:
-			ret = parse_hash_entry_number(optarg);
-			if ((ret > 0) && (ret <= L3FWD_HASH_ENTRIES)) {
-				hash_entry_number = ret;
-			} else {
-				fprintf(stderr, "invalid hash entry number\n");
-				print_usage(prgname);
-				return -1;
-			}
+			fprintf(stderr, "Hash entry number will be ignored\n");
 			break;
 
 		case CMD_LINE_OPT_PARSE_PTYPE_NUM:
@@ -963,16 +937,6 @@ parse_args(int argc, char **argv)
 		lookup_mode = L3FWD_LOOKUP_LPM;
 	}
 
-	/*
-	 * ipv6 and hash flags are valid only for
-	 * exact match, reset them to default for
-	 * longest-prefix match.
-	 */
-	if (lookup_mode == L3FWD_LOOKUP_LPM) {
-		ipv6 = 0;
-		hash_entry_number = HASH_ENTRY_NUMBER_DEFAULT;
-	}
-
 	/* For ACL, update port config rss hash filter */
 	if (lookup_mode == L3FWD_LOOKUP_ACL) {
 		port_conf.rx_adv_conf.rss_conf.rss_hf |=
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-04-09 21:45:41.845674700 +0800
+++ 0120-examples-l3fwd-remove-hash-entry-number.patch	2023-04-09 21:45:38.779042200 +0800
@@ -1 +1 @@
-From f5251734c5e16db9c9881883f7933bd51a9be861 Mon Sep 17 00:00:00 2001
+From 003a860c86a4cb826f380ba7910e38865d786763 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit f5251734c5e16db9c9881883f7933bd51a9be861 ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -19,2 +21,2 @@
- examples/l3fwd/main.c  | 37 +------------------------------------
- 2 files changed, 1 insertion(+), 37 deletions(-)
+ examples/l3fwd/main.c  | 38 +-------------------------------------
+ 2 files changed, 1 insertion(+), 38 deletions(-)
@@ -35 +37 @@
-index 71a3018036..a4f061537e 100644
+index 5198ff30dd..a4f061537e 100644
@@ -101 +103 @@
-@@ -963,15 +937,6 @@ parse_args(int argc, char **argv)
+@@ -963,16 +937,6 @@ parse_args(int argc, char **argv)
@@ -106,2 +108,2 @@
--	 * hash flag is valid only for
--	 * exact match, reset it to default for
+-	 * ipv6 and hash flags are valid only for
+-	 * exact match, reset them to default for
@@ -110,0 +113 @@
+-		ipv6 = 0;


More information about the stable mailing list