netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guillaume Nault <gnault@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org
Subject: [PATCH iproute2] tc-mpls: fix manpage example and help message string
Date: Mon, 2 Nov 2020 12:24:25 +0100	[thread overview]
Message-ID: <ef7eb4cdf9075eaa9b45baca994ff0d2021e9719.1604316228.git.gnault@redhat.com> (raw)

Manpage:
 * Remove the extra "and to ip packets" part from command description
   to make it more understandable.

 * Redirect packets to eth1, instead of eth0, as told in the
   description.

Help string:
 * "mpls pop" can be followed by a CONTROL keyword.

 * "mpls modify" can also set the MPLS_BOS field.

Signed-off-by: Guillaume Nault <gnault@redhat.com>
---
 man/man8/tc-mpls.8 | 6 +++---
 tc/m_mpls.c        | 5 +++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/man/man8/tc-mpls.8 b/man/man8/tc-mpls.8
index 9e563e98..7f8be221 100644
--- a/man/man8/tc-mpls.8
+++ b/man/man8/tc-mpls.8
@@ -147,15 +147,15 @@ a label 123 and sends them out eth1:
 .EE
 .RE
 
-In this example, incoming MPLS unicast packets on eth0 are decapsulated and to
-ip packets and output to eth1:
+In this example, incoming MPLS unicast packets on eth0 are decapsulated
+and redirected to eth1:
 
 .RS
 .EX
 #tc qdisc add dev eth0 handle ffff: ingress
 #tc filter add dev eth0 protocol mpls_uc parent ffff: flower \\
 	action mpls pop protocol ipv4  \\
-	action mirred egress redirect dev eth0
+	action mirred egress redirect dev eth1
 .EE
 .RE
 
diff --git a/tc/m_mpls.c b/tc/m_mpls.c
index 2c3752ba..9fee22e3 100644
--- a/tc/m_mpls.c
+++ b/tc/m_mpls.c
@@ -23,12 +23,13 @@ static const char * const action_names[] = {
 static void explain(void)
 {
 	fprintf(stderr,
-		"Usage: mpls pop [ protocol MPLS_PROTO ]\n"
+		"Usage: mpls pop [ protocol MPLS_PROTO ] [CONTROL]\n"
 		"       mpls push [ protocol MPLS_PROTO ] [ label MPLS_LABEL ] [ tc MPLS_TC ]\n"
 		"                 [ ttl MPLS_TTL ] [ bos MPLS_BOS ] [CONTROL]\n"
 		"       mpls mac_push [ protocol MPLS_PROTO ] [ label MPLS_LABEL ] [ tc MPLS_TC ]\n"
 		"                     [ ttl MPLS_TTL ] [ bos MPLS_BOS ] [CONTROL]\n"
-		"       mpls modify [ label MPLS_LABEL ] [ tc MPLS_TC ] [ ttl MPLS_TTL ] [CONTROL]\n"
+		"       mpls modify [ label MPLS_LABEL ] [ tc MPLS_TC ] [ ttl MPLS_TTL ]\n"
+		"                   [ bos MPLS_BOS ] [CONTROL]\n"
 		"           for pop, MPLS_PROTO is next header of packet - e.g. ip or mpls_uc\n"
 		"           for push and mac_push, MPLS_PROTO is one of mpls_uc or mpls_mc\n"
 		"               with default: mpls_uc\n"
-- 
2.21.3


                 reply	other threads:[~2020-11-02 11:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=ef7eb4cdf9075eaa9b45baca994ff0d2021e9719.1604316228.git.gnault@redhat.com \
    --to=gnault@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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).