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 <liuhangbin@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
This commit is contained in:
Hangbin Liu 2022-09-27 18:21:07 +08:00 committed by David Ahern
parent 80059fa5c5
commit 0cc5533b71

View File

@ -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 ||