All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch iproute2] u32: add terminal parameter
@ 2014-04-04 17:17 Cong Wang
  2014-04-11 21:04 ` Stephen Hemminger
  0 siblings, 1 reply; 12+ messages in thread
From: Cong Wang @ 2014-04-04 17:17 UTC (permalink / raw)
  To: netdev; +Cc: davem, Cong Wang, Stephen Hemminger

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-04-16 12:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-04 17:17 [Patch iproute2] u32: add terminal parameter Cong Wang
2014-04-11 21:04 ` 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.