Re: [patch net-next v6 06/11] net: sched: use block index as a handle instead of qdisc when block is shared

2018-01-07 Thread Jamal Hadi Salim
On 18-01-07 09:28 AM, Jamal Hadi Salim wrote: On 18-01-07 08:46 AM, Jiri Pirko wrote: Sun, Jan 07, 2018 at 02:11:19PM CET, j...@mojatatu.com wrote: On 18-01-06 03:43 PM, Jiri Pirko wrote: @@ -886,8 +887,13 @@ static int tcf_fill_node(struct net *net, struct sk_buff *skb,

Re: [patch net-next v6 06/11] net: sched: use block index as a handle instead of qdisc when block is shared

2018-01-07 Thread Jamal Hadi Salim
On 18-01-07 08:46 AM, Jiri Pirko wrote: Sun, Jan 07, 2018 at 02:11:19PM CET, j...@mojatatu.com wrote: On 18-01-06 03:43 PM, Jiri Pirko wrote: @@ -886,8 +887,13 @@ static int tcf_fill_node(struct net *net, struct sk_buff *skb, tcm->tcm_family = AF_UNSPEC; tcm->tcm__pad1 =

Re: [patch net-next v6 06/11] net: sched: use block index as a handle instead of qdisc when block is shared

2018-01-07 Thread Jiri Pirko
Sun, Jan 07, 2018 at 02:11:19PM CET, j...@mojatatu.com wrote: >On 18-01-06 03:43 PM, Jiri Pirko wrote: > > >> >> > @@ -886,8 +887,13 @@ static int tcf_fill_node(struct net *net, struct >> > sk_buff *skb, >> >tcm->tcm_family = AF_UNSPEC; >> >tcm->tcm__pad1 = 0; >> >tcm->tcm__pad2 = 0;

Re: [patch net-next v6 06/11] net: sched: use block index as a handle instead of qdisc when block is shared

2018-01-07 Thread Jamal Hadi Salim
On 18-01-06 03:43 PM, Jiri Pirko wrote: @@ -886,8 +887,13 @@ static int tcf_fill_node(struct net *net, struct sk_buff *skb, tcm->tcm_family = AF_UNSPEC; tcm->tcm__pad1 = 0; tcm->tcm__pad2 = 0; - tcm->tcm_ifindex = qdisc_dev(q)->ifindex; - tcm->tcm_parent

Re: [patch net-next v6 06/11] net: sched: use block index as a handle instead of qdisc when block is shared

2018-01-06 Thread Jiri Pirko
Sat, Jan 06, 2018 at 12:09:24AM CET, j...@resnulli.us wrote: >From: Jiri Pirko > >As the tcm_ifindex 0 is invalid ifindex, reuse it to indicate that we >work with block, instead of qdisc. So if tcm_ifindex is 0, tcm_parent is >used to carry block_index. > >If the block is set