iproute2/include
Arkadi Sharshevsky 8cd6440958 devlink: Add support for devlink resource abstraction
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>
2018-02-23 08:36:05 -08:00
..
iptables SPDX license identifiers 2017-11-24 12:21:35 -08:00
libiptc SPDX license identifiers 2017-11-24 12:21:35 -08:00
netinet ss: report ecnseen 2011-11-23 14:51:54 -08:00
uapi uapi: update if_ether compat headers 2018-02-20 10:48:32 -08:00
bpf_api.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
bpf_elf.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
bpf_scm.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
bpf_util.h bpf: allow loading programs for a specific ifindex 2017-11-26 11:57:57 -08:00
color.h color: disable color when json output is requested 2018-02-23 08:18:33 -08:00
dlfcn.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
ip6tables.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
iptables.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
json_print.h tc: red: JSON-ify RED output 2018-01-26 12:59:55 -08:00
json_writer.h json_writer: add new json handlers (null, float with format, lluint, hu) 2017-08-17 18:02:40 -07:00
libgenl.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
libnetlink.h devlink: mnlg: Add support for extended ack 2018-02-23 08:36:05 -08:00
list.h devlink: Add support for devlink resource abstraction 2018-02-23 08:36:05 -08:00
ll_map.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
names.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
namespace.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
rt_names.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
rtm_map.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
SNAPSHOT.h v4.15.0 2018-01-29 08:08:52 -08:00
utils.h utils: Introduce get_addr_rta() and inet_addr_match_rta() 2018-01-25 09:31:16 -08:00
xt-internal.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
xtables.h SPDX license identifiers 2017-11-24 12:21:35 -08:00