summaryrefslogtreecommitdiff
path: root/drivers/ntb/core.c
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2020-03-13 01:10:56 +0200
committerDavid S. Miller <davem@davemloft.net>2020-03-14 21:03:46 -0700
commit14bc175d9c885c86239de3d730eea85ad67bfe7b (patch)
tree3ed29d52deaade51d77355b59fead738a40de8e5 /drivers/ntb/core.c
parent10ef49bdcc793ab3e9c2d1ade93a4ff9c82ddf99 (diff)
net: sched: Allow extending set of supported RED flags
The qdiscs RED, GRED, SFQ and CHOKE use different subsets of the same pool of global RED flags. These are passed in tc_red_qopt.flags. However none of these qdiscs validate the flag field, and just copy it over wholesale to internal structures, and later dump it back. (An exception is GRED, which does validate for VQs -- however not for the main setup.) A broken userspace can therefore configure a qdisc with arbitrary unsupported flags, and later expect to see the flags on qdisc dump. The current ABI therefore allows storage of several bits of custom data to qdisc instances of the types mentioned above. How many bits, depends on which flags are meaningful for the qdisc in question. E.g. SFQ recognizes flags ECN and HARDDROP, and the rest is not interpreted. If SFQ ever needs to support ADAPTATIVE, it needs another way of doing it, and at the same time it needs to retain the possibility to store 6 bits of uninterpreted data. Likewise RED, which adds a new flag later in this patchset. To that end, this patch adds a new function, red_get_flags(), to split the passed flags of RED-like qdiscs to flags and user bits, and red_validate_flags() to validate the resulting configuration. It further adds a new attribute, TCA_RED_FLAGS, to pass arbitrary flags. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ntb/core.c')
0 files changed, 0 insertions, 0 deletions