diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2017-08-24 16:51:30 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-25 17:19:10 -0700 |
commit | 3cd904ecbb5d0bcf36dfca7e726bdfd6d3644334 (patch) | |
tree | c29005492c635e72d8d93f611c4f18c57dcc0a9c /net/sched/cls_rsvp6.c | |
parent | 143976ce992fcf3bfc0f4d15d5726bb492dcf262 (diff) |
net_sched: kill u32_node pointer in Qdisc
It is ugly to hide a u32-filter-specific pointer inside Qdisc,
this breaks the TC layers:
1. Qdisc is a generic representation, should not have any specific
data of any type
2. Qdisc layer is above filter layer, should only save filters in
the list of struct tcf_proto.
This pointer is used as the head of the chain of u32 hash tables,
that is struct tc_u_hnode, because u32 filter is very special,
it allows to create multiple hash tables within one qdisc and
across multiple u32 filters.
Instead of using this ugly pointer, we can just save it in a global
hash table key'ed by (dev ifindex, qdisc handle), therefore we can
still treat it as a per qdisc basis data structure conceptually.
Of course, because of network namespaces, this key is not unique
at all, but it is fine as we already have a pointer to Qdisc in
struct tc_u_common, we can just compare the pointers when collision.
And this only affects slow paths, has no impact to fast path,
thanks to the pointer ->tp_c.
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_rsvp6.c')
0 files changed, 0 insertions, 0 deletions