diff options
author | Jiri Pirko <jiri@mellanox.com> | 2018-01-17 11:46:51 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-17 14:53:57 -0500 |
commit | 7960d1daf278cbe23bb48974fe6ae6a1e44c3c15 (patch) | |
tree | 8372dff3b1b3c49916b48db78c56b93fd6dfe611 /include/net/sch_generic.h | |
parent | caa7260156eb3a1496348a2c69fa68e85183d5d7 (diff) | |
download | lwn-7960d1daf278cbe23bb48974fe6ae6a1e44c3c15.tar.gz lwn-7960d1daf278cbe23bb48974fe6ae6a1e44c3c15.zip |
net: sched: use block index as a handle instead of qdisc when block is shared
As the tcm_ifindex with value TCM_IFINDEX_MAGIC_BLOCK is invalid ifindex,
use it to indicate that we work with block, instead of qdisc.
So if tcm_ifindex is set to TCM_IFINDEX_MAGIC_BLOCK, tcm_parent is used
to carry block_index.
If the block is set to be shared between at least 2 qdiscs, it is
forbidden to use the qdisc handle to add/delete filters. In that case,
userspace has to pass block_index.
Also, for dump of the filters, in case the block is shared in between at
least 2 qdiscs, the each filter is dumped with tcm_ifindex value
TCM_IFINDEX_MAGIC_BLOCK and tcm_parent set to block_index. That gives
the user clear indication, that the filter belongs to a shared block
and not only to one qdisc under which it is dumped.
Suggested-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sch_generic.h')
0 files changed, 0 insertions, 0 deletions