Re: [Patch net-next] net_sched: kill u32_node pointer in Qdisc

2017-08-23 Thread Jiri Pirko
Thu, Aug 24, 2017 at 04:02:50AM CEST, xiyou.wangc...@gmail.com wrote: >On Wed, Aug 23, 2017 at 2:38 PM, Jiri Pirko wrote: >> I would not have to spend any time on it, if you would just follow the >> usual workflow. Clearly, you have some problem with that. I cannot >> say I understand it :/ > >You

Re: [Patch net-next] net_sched: kill u32_node pointer in Qdisc

2017-08-23 Thread Cong Wang
On Wed, Aug 23, 2017 at 2:38 PM, Jiri Pirko wrote: > I would not have to spend any time on it, if you would just follow the > usual workflow. Clearly, you have some problem with that. I cannot > say I understand it :/ You are amazing, you still waste your time even after I said "I can fix it"...

Re: [Patch net-next] net_sched: kill u32_node pointer in Qdisc

2017-08-23 Thread Jiri Pirko
Wed, Aug 23, 2017 at 11:31:23PM CEST, xiyou.wangc...@gmail.com wrote: >On Wed, Aug 23, 2017 at 2:20 PM, Jiri Pirko wrote: >> Wed, Aug 23, 2017 at 11:14:15PM CEST, xiyou.wangc...@gmail.com wrote: >>>On Wed, Aug 23, 2017 at 1:25 PM, Jiri Pirko wrote: >+static struct hlist_head *tc_u_common_hash

Re: [Patch net-next] net_sched: kill u32_node pointer in Qdisc

2017-08-23 Thread Cong Wang
On Wed, Aug 23, 2017 at 2:20 PM, Jiri Pirko wrote: > Wed, Aug 23, 2017 at 11:14:15PM CEST, xiyou.wangc...@gmail.com wrote: >>On Wed, Aug 23, 2017 at 1:25 PM, Jiri Pirko wrote: +static struct hlist_head *tc_u_common_hash; >>> >>> Why not use rhashtable? >>> >> >>It doesn't have to be so compli

Re: [Patch net-next] net_sched: kill u32_node pointer in Qdisc

2017-08-23 Thread Jiri Pirko
Wed, Aug 23, 2017 at 11:14:15PM CEST, xiyou.wangc...@gmail.com wrote: >On Wed, Aug 23, 2017 at 1:25 PM, Jiri Pirko wrote: >>>+static struct hlist_head *tc_u_common_hash; >> >> Why not use rhashtable? >> > >It doesn't have to be so complicated, it is not fast path and >we don't have so many qdisc's

Re: [Patch net-next] net_sched: kill u32_node pointer in Qdisc

2017-08-23 Thread Cong Wang
On Wed, Aug 23, 2017 at 1:25 PM, Jiri Pirko wrote: >>+static struct hlist_head *tc_u_common_hash; > > Why not use rhashtable? > It doesn't have to be so complicated, it is not fast path and we don't have so many qdisc's and u32 filters in system relatively. >>+ tc_u_common_hash = kvmalloc_

Re: [Patch net-next] net_sched: kill u32_node pointer in Qdisc

2017-08-23 Thread Jiri Pirko
Wed, Aug 23, 2017 at 07:58:54PM CEST, xiyou.wangc...@gmail.com wrote: >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, shoul

[Patch net-next] net_sched: kill u32_node pointer in Qdisc

2017-08-23 Thread Cong Wang
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