]> git.proxmox.com Git - mirror_iproute2.git/commit - lib/utils.c
lib: parse_mapping: Recognize a keyword "all"
authorPetr Machata <me@pmachata.org>
Thu, 12 Nov 2020 22:24:46 +0000 (23:24 +0100)
committerDavid Ahern <dsahern@gmail.com>
Sat, 14 Nov 2020 02:43:15 +0000 (19:43 -0700)
commit66a2d7148713d4e168b8a596d1eef03d4e9d4826
tree469c56a2d45e351718a8bd52cb42879a3cf89094
parentbc3523ae701315a421db00ab1fd766f4845974c3
lib: parse_mapping: Recognize a keyword "all"

The DCB tool will have to provide an interface to a number of fixed-size
arrays. Unlike the egress- and ingress-qos-map, it makes good sense to have
an interface to set all members to the same value. For example to set
strict priority on all TCs besides select few, or to reset allocated
bandwidth to all zeroes, again besides several explicitly-given ones.

To support this usage, extend the parse_mapping() with a boolean that
determines whether this special use is supported. If "all" is given and
recognized, mapping_cb is called with the key of -1.

Have iplink_vlan pass false for allow_all.

Signed-off-by: Petr Machata <me@pmachata.org>
Signed-off-by: David Ahern <dsahern@gmail.com>
include/utils.h
ip/iplink_vlan.c
lib/utils.c