From: Hangbin Liu <liuhangbin@gmail.com>
To: netdev@vger.kernel.org
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Jiri Pirko <jiri@resnulli.us>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
David Ahern <dsahern@kernel.org>,
Hangbin Liu <liuhangbin@gmail.com>
Subject: [PATCH iproute2-next 2/2] tc/tc_monitor: print netlink extack message
Date: Tue, 27 Sep 2022 18:21:07 +0800 [thread overview]
Message-ID: <20220927102107.191852-2-liuhangbin@gmail.com> (raw)
In-Reply-To: <20220927101755.191352-1-liuhangbin@gmail.com>
Upstream commit "sched: add extack for tfilter_notify" will make
tc event contain extack message, which could be used for logging
offloading failures. Let's print the extack message in tc monitor.
e.g.
# tc monitor
added chain dev enp3s0f1np1 parent ffff: chain 0
added filter dev enp3s0f1np1 ingress protocol all pref 49152 flower chain 0 handle 0x1
ct_state +trk+new
not_in_hw
action order 1: gact action drop
random type none pass val 0
index 1 ref 1 bind 1
Warning: mlx5_core: matching on ct_state +new isn't supported.
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
tc/tc_monitor.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tc/tc_monitor.c b/tc/tc_monitor.c
index f8816cc5..c279a4a1 100644
--- a/tc/tc_monitor.c
+++ b/tc/tc_monitor.c
@@ -42,6 +42,9 @@ static int accept_tcmsg(struct rtnl_ctrl_data *ctrl,
if (timestamp)
print_timestamp(fp);
+ if (n->nlmsg_type == NLMSG_DONE)
+ nl_dump_ext_ack_done(n, 0, 0);
+
if (n->nlmsg_type == RTM_NEWTFILTER ||
n->nlmsg_type == RTM_DELTFILTER ||
n->nlmsg_type == RTM_NEWCHAIN ||
--
2.37.2
next prev parent reply other threads:[~2022-09-27 10:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 10:17 [PATCH net-next] sched: add extack for tfilter_notify Hangbin Liu
2022-09-27 10:21 ` [PATCH iproute2-next 1/2] libnetlink: add offset for nl_dump_ext_ack_done Hangbin Liu
2022-09-28 3:30 ` patchwork-bot+netdevbpf
2022-09-27 10:21 ` Hangbin Liu [this message]
2022-09-28 3:30 ` [PATCH net-next] sched: add extack for tfilter_notify patchwork-bot+netdevbpf
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=20220927102107.191852-2-liuhangbin@gmail.com \
--to=liuhangbin@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=xiyou.wangcong@gmail.com \
/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).