mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2024-11-15 22:15:13 +08:00
8cd6440958
Add support for devlink resource abstraction. The resources are represented by a tree based structure and are identified by a name and a size. Some resources can present their real time occupancy. First the resources exposed by the driver can be observed, for example: $devlink resource show pci/0000:03:00.0 pci/0000:03:00.0: name kvd size 245760 unit entry resources: name linear size 98304 occ 0 unit entry size_min 0 size_max 147456 size_gran 128 name hash_double size 60416 unit entry size_min 32768 size_max 180224 size_gran 128 name hash_single size 87040 unit entry size_min 65536 size_max 212992 size_gran 128 Some resource's size can be changed. Examples: $devlink resource set pci/0000:03:00.0 path /kvd/hash_single size 73088 $devlink resource set pci/0000:03:00.0 path /kvd/hash_double size 74368 The changes do not apply immediately, this can be validate by the 'size_new' attribute, which represents the pending changed size. For example $devlink resource show pci/0000:03:00.0 pci/0000:03:00.0: name kvd size 245760 unit entry size_valid false resources: name linear size 98304 size_new 147456 occ 0 unit entry size_min 0 size_max 147456 size_gran 128 name hash_double size 60416 unit entry size_min 32768 size_max 180224 size_gran 128 name hash_single size 87040 unit entry size_min 65536 size_max 212992 size_gran 128 In case of a pending change the nested resources present an indication for a valid configuration of its children (sum of its children sizes doesn't exceed the parent's size). In order for the changes to take place hot reload is needed. The hot reload through devlink will be introduced in the following patch. Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> |
||
---|---|---|
.. | ||
iptables | ||
libiptc | ||
netinet | ||
uapi | ||
bpf_api.h | ||
bpf_elf.h | ||
bpf_scm.h | ||
bpf_util.h | ||
color.h | ||
dlfcn.h | ||
ip6tables.h | ||
iptables.h | ||
json_print.h | ||
json_writer.h | ||
libgenl.h | ||
libnetlink.h | ||
list.h | ||
ll_map.h | ||
names.h | ||
namespace.h | ||
rt_names.h | ||
rtm_map.h | ||
SNAPSHOT.h | ||
utils.h | ||
xt-internal.h | ||
xtables.h |