From: Petr Machata <petrm@mellanox.com>
To: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org
Cc: davem@davemloft.net, shuah@kernel.org
Subject: [PATCH net-next 3/6] selftests: forwarding: tc_rule_stats_get: Parameterize direction
Date: Tue, 26 Jun 2018 02:07:45 +0200 [thread overview]
Message-ID: <53efc91c8ae4eebef123adc9c597b3cc3ecffb99.1529971148.git.petrm@mellanox.com> (raw)
In-Reply-To: <cover.1529971148.git.petrm@mellanox.com>
The GRE multipath tests need stats on an egress counter. Change
tc_rule_stats_get() to take direction as an optional argument, with
default of ingress.
Take the opportunity to change line continuation character from | to \.
Move the | to the next line, which indent.
Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
---
tools/testing/selftests/net/forwarding/lib.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
index 911d753c4ff0..f94ea4bafa13 100644
--- a/tools/testing/selftests/net/forwarding/lib.sh
+++ b/tools/testing/selftests/net/forwarding/lib.sh
@@ -383,9 +383,10 @@ tc_rule_stats_get()
{
local dev=$1; shift
local pref=$1; shift
+ local dir=$1; shift
- tc -j -s filter show dev $dev ingress pref $pref |
- jq '.[1].options.actions[].stats.packets'
+ tc -j -s filter show dev $dev ${dir:-ingress} pref $pref \
+ | jq '.[1].options.actions[].stats.packets'
}
mac_get()
--
2.4.11
WARNING: multiple messages have this Message-ID (diff)
From: petrm at mellanox.com (Petr Machata)
Subject: [PATCH net-next 3/6] selftests: forwarding: tc_rule_stats_get: Parameterize direction
Date: Tue, 26 Jun 2018 02:07:45 +0200 [thread overview]
Message-ID: <53efc91c8ae4eebef123adc9c597b3cc3ecffb99.1529971148.git.petrm@mellanox.com> (raw)
In-Reply-To: <cover.1529971148.git.petrm@mellanox.com>
The GRE multipath tests need stats on an egress counter. Change
tc_rule_stats_get() to take direction as an optional argument, with
default of ingress.
Take the opportunity to change line continuation character from | to \.
Move the | to the next line, which indent.
Signed-off-by: Petr Machata <petrm at mellanox.com>
Reviewed-by: Ido Schimmel <idosch at mellanox.com>
---
tools/testing/selftests/net/forwarding/lib.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
index 911d753c4ff0..f94ea4bafa13 100644
--- a/tools/testing/selftests/net/forwarding/lib.sh
+++ b/tools/testing/selftests/net/forwarding/lib.sh
@@ -383,9 +383,10 @@ tc_rule_stats_get()
{
local dev=$1; shift
local pref=$1; shift
+ local dir=$1; shift
- tc -j -s filter show dev $dev ingress pref $pref |
- jq '.[1].options.actions[].stats.packets'
+ tc -j -s filter show dev $dev ${dir:-ingress} pref $pref \
+ | jq '.[1].options.actions[].stats.packets'
}
mac_get()
--
2.4.11
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: petrm@mellanox.com (Petr Machata)
Subject: [PATCH net-next 3/6] selftests: forwarding: tc_rule_stats_get: Parameterize direction
Date: Tue, 26 Jun 2018 02:07:45 +0200 [thread overview]
Message-ID: <53efc91c8ae4eebef123adc9c597b3cc3ecffb99.1529971148.git.petrm@mellanox.com> (raw)
Message-ID: <20180626000745.RxjnSVarAw6peAjVsOyuAPYxnTSX6aenYTysmE5Bwiw@z> (raw)
In-Reply-To: <cover.1529971148.git.petrm@mellanox.com>
The GRE multipath tests need stats on an egress counter. Change
tc_rule_stats_get() to take direction as an optional argument, with
default of ingress.
Take the opportunity to change line continuation character from | to \.
Move the | to the next line, which indent.
Signed-off-by: Petr Machata <petrm at mellanox.com>
Reviewed-by: Ido Schimmel <idosch at mellanox.com>
---
tools/testing/selftests/net/forwarding/lib.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
index 911d753c4ff0..f94ea4bafa13 100644
--- a/tools/testing/selftests/net/forwarding/lib.sh
+++ b/tools/testing/selftests/net/forwarding/lib.sh
@@ -383,9 +383,10 @@ tc_rule_stats_get()
{
local dev=$1; shift
local pref=$1; shift
+ local dir=$1; shift
- tc -j -s filter show dev $dev ingress pref $pref |
- jq '.[1].options.actions[].stats.packets'
+ tc -j -s filter show dev $dev ${dir:-ingress} pref $pref \
+ | jq '.[1].options.actions[].stats.packets'
}
mac_get()
--
2.4.11
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2018-06-26 0:08 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-26 0:05 [PATCH net-next 0/6] Multipath tests for tunnel devices Petr Machata
2018-06-26 0:05 ` Petr Machata
2018-06-26 0:05 ` petrm
2018-06-26 0:06 ` [PATCH net-next 1/6] selftests: forwarding: Move multipath_eval() to lib.sh Petr Machata
2018-06-26 0:06 ` Petr Machata
2018-06-26 0:06 ` petrm
2018-06-26 0:07 ` [PATCH net-next 2/6] selftests: forwarding: multipath_eval(): Improve style Petr Machata
2018-06-26 0:07 ` Petr Machata
2018-06-26 0:07 ` petrm
2018-06-26 0:07 ` Petr Machata [this message]
2018-06-26 0:07 ` [PATCH net-next 3/6] selftests: forwarding: tc_rule_stats_get: Parameterize direction Petr Machata
2018-06-26 0:07 ` petrm
2018-06-26 0:08 ` [PATCH net-next 4/6] selftests: forwarding: lib: Extract interface-init functions Petr Machata
2018-06-26 0:08 ` Petr Machata
2018-06-26 0:08 ` petrm
2018-06-26 0:08 ` [PATCH net-next 5/6] selftests: forwarding: Test multipath tunneling Petr Machata
2018-06-26 0:08 ` Petr Machata
2018-06-26 0:08 ` petrm
2018-06-26 0:08 ` [PATCH net-next 6/6] selftests: forwarding: README: Require diagrams Petr Machata
2018-06-26 0:08 ` Petr Machata
2018-06-26 0:08 ` petrm
2018-06-27 1:42 ` [PATCH net-next 0/6] Multipath tests for tunnel devices David Miller
2018-06-27 1:42 ` David Miller
2018-06-27 1:42 ` davem
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=53efc91c8ae4eebef123adc9c597b3cc3ecffb99.1529971148.git.petrm@mellanox.com \
--to=petrm@mellanox.com \
--cc=davem@davemloft.net \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shuah@kernel.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 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.