DPDK patches and discussions
 help / color / mirror / Atom feed
From: SunChengLian <sunchenglian@loongson.cn>
To: dev@dpdk.org, sunchenglian@loongson.cn
Cc: bruce.richardson@intel.com, stable@dpdk.org, david.marchand@redhat.com
Subject: [dpdk-dev] [PATCH v3 2/2] examples/l2fwd: remove mac-updating option
Date: Tue, 22 Jun 2021 10:49:43 +0800	[thread overview]
Message-ID: <20210622024944.1180109-2-sunchenglian@loongson.cn> (raw)
In-Reply-To: <20210611100357.388290-1-sunchenglian@loongson.cn>

The "mac-updating" option can be removed since the associated mac_updating
variable is set to 1 by default.

Signed-off-by: SunChengLian <sunchenglian@loongson.cn>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 examples/l2fwd/main.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 23e5e46761..70d342f23a 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -307,7 +307,7 @@ l2fwd_usage(const char *prgname)
 	       "  -p PORTMASK: hexadecimal bitmask of ports to configure\n"
 	       "  -q NQ: number of queue (=ports) per lcore (default is 1)\n"
 	       "  -T PERIOD: statistics will be refreshed each PERIOD seconds (0 to disable, 10 default, 86400 maximum)\n"
-	       "  --[no-]mac-updating: Enable or disable MAC addresses updating (enabled by default)\n"
+	       "  --no-mac-updating: Disable MAC addresses updating (enabled by default)\n"
 	       "      When enabled:\n"
 	       "       - The source MAC address is replaced by the TX port MAC address\n"
 	       "       - The destination MAC address is replaced by 02:00:00:00:00:TX_PORT_ID\n"
@@ -425,7 +425,6 @@ static const char short_options[] =
 	"T:"  /* timer period */
 	;
 
-#define CMD_LINE_OPT_MAC_UPDATING "mac-updating"
 #define CMD_LINE_OPT_NO_MAC_UPDATING "no-mac-updating"
 #define CMD_LINE_OPT_PORTMAP_CONFIG "portmap"
 
@@ -434,14 +433,11 @@ enum {
 
 	/* first long only option value must be >= 256, so that we won't
 	 * conflict with short options */
-	CMD_LINE_OPT_MAC_UPDATING_NUM = 256,
-	CMD_LINE_OPT_NO_MAC_UPDATING_NUM,
+	CMD_LINE_OPT_NO_MAC_UPDATING_NUM = 256,
 	CMD_LINE_OPT_PORTMAP_NUM,
 };
 
 static const struct option lgopts[] = {
-	{ 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},
@@ -505,10 +501,6 @@ 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;
-- 
2.25.1


  parent reply	other threads:[~2021-06-22  2:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10  1:01 [dpdk-dev] [PATCH] examples/l2fwd: fix l2fwd long options parse issue SunChengLian
2021-06-11  7:01 ` [dpdk-dev] [dpdk-stable] " David Marchand
2021-06-11 10:03 ` [dpdk-dev] [PATCH v2 1/2] examples/l2fwd: fix long option parsing SunChengLian
2021-06-17  9:14   ` David Marchand
2021-06-22  2:47   ` [dpdk-dev] [PATCH v3 " SunChengLian
2021-07-05  9:38     ` David Marchand
2021-06-22  2:49   ` SunChengLian [this message]
2021-06-11 10:27 ` [dpdk-dev] [PATCH v2 2/2] examples/l2fwd: remove mac-updating option SunChengLian
2021-06-17  9:16   ` [dpdk-dev] [dpdk-stable] " David Marchand

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=20210622024944.1180109-2-sunchenglian@loongson.cn \
    --to=sunchenglian@loongson.cn \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /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).