[v2,12/12] examples/l2fwd: improvements to the usage print

Message ID 1531289248-20025-13-git-send-email-anoob.joseph@caviumnetworks.com
State New
Delegated to: Thomas Monjalon
Headers show
Series
  • preparing l2fwd for eventmode additions
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Anoob Joseph July 11, 2018, 6:07 a.m.
Fixed alignment and split the usage print to aid easy addition of
eventmode usage prints.

Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
---
v2:
* No change

v1:
* No change

 examples/l2fwd/main.c | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

Patch

diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 3b697d1..ac81beb 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -66,15 +66,20 @@  l2fwd_usage(const char *prgname)
 {
 	fprintf(stderr, "%s [EAL options] --"
 		" -p PORTMASK"
-		" [-q NQ]\n"
-	       "  -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"
-		   "      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",
-	       prgname);
+		" [-q NQ]",
+		prgname);
+
+	fprintf(stderr, "\n\n");
+
+	fprintf(stderr,
+		"  -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"
+		"      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"
+		"\n");
 }
 
 static int