netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Qdisc->u32_node - licence to kill
@ 2017-08-07 16:41 Jiri Pirko
  2017-08-07 17:47 ` John Fastabend
  0 siblings, 1 reply; 7+ messages in thread
From: Jiri Pirko @ 2017-08-07 16:41 UTC (permalink / raw)
  To: jhs, xiyou.wangcong, davem; +Cc: netdev, mlxsw

Hi Jamal/Cong/David/all.

Digging in the u32 code deeper now. I need to get rid of tp->q for shared
blocks, but I found out about this:

struct Qdisc {
	......
        void                    *u32_node;
	......
};

Yeah, ugly. u32 uses it to store some shared data, tp_c. It actually
stores a linked list of all hashtables added to one qdiscs.

So basically what you have is, you have 1 root ht per prio/pref. Then
you can have multiple hts, linked from any other ht, does not matter in
which prio/pref they are.

Do I understand that correctly that prio/pref only has meaning if
linking does not take place, because if there is linking, the prio/pref
of inserted rule is simply ignored?

That is the most confusing thing I saw in net/sched/ so far. 
Is this a bug? Sounds like one.

Did someone introduce *u32_node (formerly static struct tc_u_common
*u32_list;) just to allow this weirdness?

Can I just remove this shared tp_c and make the linking to other
hashtables only possible within the same prio/pref? That would make
sense to me.

Thanks.

Jiri

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-08-09 12:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-07 16:41 Qdisc->u32_node - licence to kill Jiri Pirko
2017-08-07 17:47 ` John Fastabend
2017-08-07 19:06   ` Jiri Pirko
2017-08-07 19:54     ` John Fastabend
2017-08-07 23:21       ` Cong Wang
2017-08-09 12:40         ` Jamal Hadi Salim
2017-08-09 12:48           ` Jiri Pirko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).