netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, Cong Wang <xiyou.wangcong@gmail.com>,
	Stephen Hemminger <stephen@networkplumber.org>
Subject: [Patch iproute2] u32: add terminal parameter
Date: Fri,  4 Apr 2014 10:17:06 -0700	[thread overview]
Message-ID: <1396631826-15188-1-git-send-email-xiyou.wangcong@gmail.com> (raw)

It is useful to allow user to specify to terminate u32 filter matching
when there is no action. Currently we only terminate it when there is
an action attached.

Cc: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
 tc/f_u32.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tc/f_u32.c b/tc/f_u32.c
index f2a862d..a64ad10 100644
--- a/tc/f_u32.c
+++ b/tc/f_u32.c
@@ -1129,7 +1129,14 @@ static int u32_parse_opt(struct filter_util *qu, char *handle,
 			}
 			terminal_ok++;
 			continue;
-
+		} else if (matches(*argv, "terminal") == 0) {
+			argc--;
+			if (argc != 0) {
+				fprintf(stderr, "Illegal \"terminal\"\n");
+				return -1;
+			}
+			terminal_ok++;
+			continue;
 		} else if (matches(*argv, "police") == 0) {
 			NEXT_ARG();
 			if (parse_police(&argc, &argv, TCA_U32_POLICE, n)) {
-- 
1.7.11.7

             reply	other threads:[~2014-04-04 17:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-04 17:17 Cong Wang [this message]
2014-04-11 21:04 ` [Patch iproute2] u32: add terminal parameter Stephen Hemminger
2014-04-12  0:45   ` Cong Wang
2014-04-12  0:58     ` Stephen Hemminger
2014-04-12  1:15       ` Cong Wang
2014-04-12 11:43         ` Jamal Hadi Salim
2014-04-14 21:18           ` Cong Wang
2014-04-14 23:14             ` Jamal Hadi Salim
2014-04-15  1:57               ` Cong Wang
2014-04-15 13:00                 ` Jamal Hadi Salim
2014-04-15 20:17                   ` Cong Wang
2014-04-16 12:19                     ` Jamal Hadi Salim

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=1396631826-15188-1-git-send-email-xiyou.wangcong@gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=davem@davemloft.net \
    --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).