[dpdk-stable] patch 'examples/l2fwd: fix [no-]mac-updating options' has been queued to stable release 20.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 12 15:04:38 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a3519aa2e1d177af30d5f1ddddaa39082bec2fe3

Thanks.

Luca Boccassi

---
>From a3519aa2e1d177af30d5f1ddddaa39082bec2fe3 Mon Sep 17 00:00:00 2001
From: Chenglian Sun <sunchenglian at loongson.cn>
Date: Tue, 22 Jun 2021 10:47:05 +0800
Subject: [PATCH] examples/l2fwd: fix [no-]mac-updating options

[ upstream commit bbbe38a6d59ccdda25917712701e629d0b10af6f ]

For l2fwd, --no-mac-updating and --mac-updating are treated as invalid
arguments. Rework long options parsing to let --no-mac-updating and
--mac-updating options work well.

Fixes: fa19eb20d212 ("examples/l2fwd: add forwarding port mapping option")

Signed-off-by: Chenglian Sun <sunchenglian at loongson.cn>
Reviewed-by: David Marchand <david.marchand at redhat.com>
---
 examples/l2fwd/main.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index ffb67bb901..23e5e46761 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -434,13 +434,16 @@ enum {
 
 	/* first long only option value must be >= 256, so that we won't
 	 * conflict with short options */
-	CMD_LINE_OPT_MIN_NUM = 256,
+	CMD_LINE_OPT_MAC_UPDATING_NUM = 256,
+	CMD_LINE_OPT_NO_MAC_UPDATING_NUM,
 	CMD_LINE_OPT_PORTMAP_NUM,
 };
 
 static const struct option lgopts[] = {
-	{ CMD_LINE_OPT_MAC_UPDATING, no_argument, &mac_updating, 1},
-	{ CMD_LINE_OPT_NO_MAC_UPDATING, no_argument, &mac_updating, 0},
+	{ CMD_LINE_OPT_MAC_UPDATING, no_argument, 0,
+		CMD_LINE_OPT_MAC_UPDATING_NUM},
+	{ CMD_LINE_OPT_NO_MAC_UPDATING, no_argument, 0,
+		CMD_LINE_OPT_NO_MAC_UPDATING_NUM},
 	{ CMD_LINE_OPT_PORTMAP_CONFIG, 1, 0, CMD_LINE_OPT_PORTMAP_NUM},
 	{NULL, 0, 0, 0}
 };
@@ -502,6 +505,14 @@ l2fwd_parse_args(int argc, char **argv)
 			}
 			break;
 
+		case CMD_LINE_OPT_MAC_UPDATING_NUM:
+			mac_updating = 1;
+			break;
+
+		case CMD_LINE_OPT_NO_MAC_UPDATING_NUM:
+			mac_updating = 0;
+			break;
+
 		default:
 			l2fwd_usage(prgname);
 			return -1;
-- 
2.30.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-07-12 13:41:38.885958775 +0100
+++ 0043-examples-l2fwd-fix-no-mac-updating-options.patch	2021-07-12 13:41:36.334119361 +0100
@@ -1 +1 @@
-From bbbe38a6d59ccdda25917712701e629d0b10af6f Mon Sep 17 00:00:00 2001
+From a3519aa2e1d177af30d5f1ddddaa39082bec2fe3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bbbe38a6d59ccdda25917712701e629d0b10af6f ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 32d405e65a..ca4db6014b 100644
+index ffb67bb901..23e5e46761 100644
@@ -23 +24 @@
-@@ -433,13 +433,16 @@ enum {
+@@ -434,13 +434,16 @@ enum {
@@ -43 +44 @@
-@@ -501,6 +504,14 @@ l2fwd_parse_args(int argc, char **argv)
+@@ -502,6 +505,14 @@ l2fwd_parse_args(int argc, char **argv)


More information about the stable mailing list