]> git.proxmox.com Git - mirror_iproute2.git/commit
tc: implement support for action terse dump
authorVlad Buslov <vlad@buslov.dev>
Mon, 30 Nov 2020 19:32:50 +0000 (21:32 +0200)
committerDavid Ahern <dsahern@gmail.com>
Thu, 3 Dec 2020 03:51:06 +0000 (03:51 +0000)
commitea130da81ee1c1b6b1e3db88927b2d50b5d0d2fc
tree93c04ebd2d531afe9a86dab81a842d757264b150
parent00fffb2d7935eba3d273c89bf18cc28157fd9be6
tc: implement support for action terse dump

Implement support for action terse dump using new TCA_ACT_FLAG_TERSE_DUMP
value of TCA_ROOT_FLAGS tlv. Set the flag when user requested it with
following example CLI (-br for 'brief'):

$ tc -s -br actions ls action tunnel_key
total acts 2

        action order 0: tunnel_key       index 1
        Action statistics:
        Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
        backlog 0b 0p requeues 0

        action order 1: tunnel_key       index 2
        Action statistics:
        Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
        backlog 0b 0p requeues 0

In terse mode dump only outputs essential data needed to identify the
action (kind, index) and stats, if requested by the user.

Signed-off-by: Vlad Buslov <vlad@buslov.dev>
Suggested-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
man/man8/tc.8
tc/m_action.c