From: Hangbin Liu <liuhangbin@gmail.com>
To: netdev@vger.kernel.org
Cc: Jay Vosburgh <j.vosburgh@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>, Liang Li <liali@redhat.com>,
Vincent Bernat <vincent@bernat.ch>,
Hangbin Liu <liuhangbin@gmail.com>
Subject: [PATCHv2 net 3/4] selftests: forwarding: lib: add netns support for tc rule handle stats get
Date: Thu, 27 Apr 2023 11:39:08 +0800 [thread overview]
Message-ID: <20230427033909.4109569-4-liuhangbin@gmail.com> (raw)
In-Reply-To: <20230427033909.4109569-1-liuhangbin@gmail.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
tools/testing/selftests/net/forwarding/lib.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
index d47499ba81c7..426bab05fe0a 100755
--- a/tools/testing/selftests/net/forwarding/lib.sh
+++ b/tools/testing/selftests/net/forwarding/lib.sh
@@ -773,8 +773,9 @@ tc_rule_handle_stats_get()
local id=$1; shift
local handle=$1; shift
local selector=${1:-.packets}; shift
+ local netns=${1:-""}; shift
- tc -j -s filter show $id \
+ tc $netns -j -s filter show $id \
| jq ".[] | select(.options.handle == $handle) | \
.options.actions[0].stats$selector"
}
--
2.38.1
next prev parent reply other threads:[~2023-04-27 3:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-27 3:39 [PATCHv2 net 0/4] bonding: fix send_peer_notif overflow Hangbin Liu
2023-04-27 3:39 ` [PATCHv2 net 1/4] " Hangbin Liu
2023-04-28 20:04 ` Simon Horman
2023-05-02 12:45 ` Hangbin Liu
2023-04-27 3:39 ` [PATCHv2 net 2/4] Documentation: bonding: fix the doc of peer_notif_delay Hangbin Liu
2023-04-27 3:39 ` Hangbin Liu [this message]
2023-04-28 20:08 ` [PATCHv2 net 3/4] selftests: forwarding: lib: add netns support for tc rule handle stats get Simon Horman
2023-04-27 3:39 ` [PATCHv2 net 4/4] kselftest: bonding: add num_grat_arp test Hangbin Liu
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=20230427033909.4109569-4-liuhangbin@gmail.com \
--to=liuhangbin@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=j.vosburgh@gmail.com \
--cc=kuba@kernel.org \
--cc=liali@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vincent@bernat.ch \
/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).