]> git.proxmox.com Git - mirror_iproute2.git/commit
tc: implement support for terse dump
authorVlad Buslov <vladbu@mellanox.com>
Fri, 23 Oct 2020 14:55:36 +0000 (17:55 +0300)
committerDavid Ahern <dsahern@gmail.com>
Sat, 31 Oct 2020 15:15:15 +0000 (09:15 -0600)
commit477ca0dfb416e204654b634e8b73965efe01ac1a
tree7c5ad99c05bd27bbf69b9acd00a7962a013185ad
parenta99ebeeef2c95f580f6fae67ce20ace7d22706bc
tc: implement support for terse dump

Implement support for classifier/action terse dump using new TCA_DUMP_FLAGS
tlv with only available flag value TCA_DUMP_FLAGS_TERSE. Set the flag when
user requested it with following example CLI (-br for 'brief'):

$ tc -s -br filter show dev ens1f0 ingress
filter protocol ip pref 49151 flower chain 0
filter protocol ip pref 49151 flower chain 0 handle 0x1
  not_in_hw
        action order 1: gact    Action statistics:
        Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
        backlog 0b 0p requeues 0

filter protocol ip pref 49152 flower chain 0
filter protocol ip pref 49152 flower chain 0 handle 0x1
  not_in_hw
        action order 1: gact    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
filter and action (handle, cookie, etc.) and stats, if requested by the
user. The intention is to significantly improve rule dump rate by omitting
all static data that do not change after rule is created.

Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
man/man8/tc.8
tc/tc.c
tc/tc_filter.c