From: Hangbin Liu Date: Tue, 27 Sep 2022 10:21:07 +0000 (+0800) Subject: tc/tc_monitor: print netlink extack message X-Git-Tag: v6.1.0~33^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cc5533b71dc3d3f07e04e78b36c24e01610837f;p=thirdparty%2Fiproute2.git tc/tc_monitor: print netlink extack message 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 Signed-off-by: David Ahern --- diff --git a/tc/tc_monitor.c b/tc/tc_monitor.c index f8816cc53..c279a4a1a 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 ||