[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191113101245.182025-4-roid@mellanox.com>
Date: Wed, 13 Nov 2019 12:12:43 +0200
From: Roi Dayan <roid@...lanox.com>
To: netdev@...r.kernel.org
Cc: David Ahern <dsahern@...il.com>,
Stephen Hemminger <stephen@...workplumber.org>,
Jiri Pirko <jiri@...lanox.com>,
Eli Britstein <elibr@...lanox.com>,
Roi Dayan <roid@...lanox.com>
Subject: [PATCH iproute2 3/5] tc: flower: fix newline prints for ct-mark and ct-zone
From: Eli Britstein <elibr@...lanox.com>
Matches of ct-mark and ct-zone were printed all in the same line. Fix
that so each ct match is printed in a separate line.
Example:
$ tc qdisc add dev eth0 ingress
$ tc filter add dev eth0 protocol ip parent ffff: prio 1 flower skip_hw \
ct_zone 5 ct_mark 6/0xf action ct commit zone 7 mark 8/0xf drop
Before:
$ tc -s filter show dev eth0 parent ffff:
filter protocol ip pref 1 flower chain 0
filter protocol ip pref 1 flower chain 0 handle 0x1
eth_type ipv4 ct_zone 5 ct_mark 6/0xf
skip_hw
not_in_hw
action order 1: ct commit mark 8/0xf zone 7 drop
index 1 ref 1 bind 1 installed 31 sec used 31 sec
Action statistics:
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
After:
$ tc -s filter show dev eth0 parent ffff:
filter protocol ip pref 1 flower chain 0
filter protocol ip pref 1 flower chain 0 handle 0x1
eth_type ipv4
ct_zone 5
ct_mark 6/0xf
skip_hw
not_in_hw
action order 1: ct commit mark 8/0xf zone 7 drop
index 1 ref 1 bind 1 installed 108 sec used 108 sec
Action statistics:
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
Fixes: c8a494314c40 ("tc: Introduce tc ct action")
Signed-off-by: Eli Britstein <elibr@...lanox.com>
Reviewed-by: Roi Dayan <roid@...lanox.com>
Acked-by: Jiri Pirko <jiri@...lanox.com>
---
tc/f_flower.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tc/f_flower.c b/tc/f_flower.c
index 41b81217e47e..724577563c27 100644
--- a/tc/f_flower.c
+++ b/tc/f_flower.c
@@ -1847,13 +1847,13 @@ static void flower_print_ct_label(struct rtattr *attr,
static void flower_print_ct_zone(struct rtattr *attr,
struct rtattr *mask_attr)
{
- print_masked_u16("ct_zone", attr, mask_attr, false);
+ print_masked_u16("ct_zone", attr, mask_attr, true);
}
static void flower_print_ct_mark(struct rtattr *attr,
struct rtattr *mask_attr)
{
- print_masked_u32("ct_mark", attr, mask_attr, false);
+ print_masked_u32("ct_mark", attr, mask_attr, true);
}
static void flower_print_key_id(const char *name, struct rtattr *attr)
--
2.8.4
Powered by blists - more mailing lists