]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
tc/tc_monitor: print netlink extack message
authorHangbin Liu <liuhangbin@gmail.com>
Tue, 27 Sep 2022 10:21:07 +0000 (18:21 +0800)
committerDavid Ahern <dsahern@kernel.org>
Wed, 28 Sep 2022 03:18:54 +0000 (21:18 -0600)
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>
tc/tc_monitor.c

index f8816cc53a46a077d7bd9f6f6f5e6269af3edb89..c279a4a1a89831c2e45e0877e6e8404a2e88be1f 100644 (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 ||