diff options
| author | Victor Nogueira <[email protected]> | 2023-12-19 18:16:19 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2023-12-26 21:20:08 +0000 |
| commit | 913b47d3424e7d99eaf34b798c47dfa840c64a08 (patch) | |
| tree | 9bc8fe26272a2fb1d1ae0fe011c3367fceced8c0 /net/sched/cls_api.c | |
| parent | net: remove SOCK_DEBUG macro (diff) | |
| download | kernel-913b47d3424e7d99eaf34b798c47dfa840c64a08.tar.gz kernel-913b47d3424e7d99eaf34b798c47dfa840c64a08.zip | |
net/sched: Introduce tc block netdev tracking infra
This commit makes tc blocks track which ports have been added to them.
And, with that, we'll be able to use this new information to send
packets to the block's ports. Which will be done in the patch #3 of this
series.
Suggested-by: Jiri Pirko <[email protected]>
Co-developed-by: Jamal Hadi Salim <[email protected]>
Signed-off-by: Jamal Hadi Salim <[email protected]>
Co-developed-by: Pedro Tammela <[email protected]>
Signed-off-by: Pedro Tammela <[email protected]>
Signed-off-by: Victor Nogueira <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/sched/cls_api.c')
| -rw-r--r-- | net/sched/cls_api.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 8978cf5531d0..421ea10bc82a 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -531,6 +531,7 @@ static void tcf_block_destroy(struct tcf_block *block) { mutex_destroy(&block->lock); mutex_destroy(&block->proto_destroy_lock); + xa_destroy(&block->ports); kfree_rcu(block, rcu); } @@ -1002,6 +1003,7 @@ static struct tcf_block *tcf_block_create(struct net *net, struct Qdisc *q, refcount_set(&block->refcnt, 1); block->net = net; block->index = block_index; + xa_init(&block->ports); /* Don't store q pointer for blocks which are shared */ if (!tcf_block_shared(block)) |
