Re: [PATCH net-next v11 3/4] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-07-29 Thread Jamal Hadi Salim
On 17-07-29 03:19 AM, Jiri Pirko wrote: That is what the code I wrote above do. And I think that your code does not (if you don't assume that allowed flags are always starting from the least significant bit) Ok, here's how it looks now.. I still have to move things around in the other patches

Re: [PATCH net-next v11 3/4] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-07-29 Thread Jiri Pirko
Sat, Jul 29, 2017 at 12:10:20AM CEST, j...@mojatatu.com wrote: >On 17-07-28 11:45 AM, Jiri Pirko wrote: >> Fri, Jul 28, 2017 at 05:08:10PM CEST, j...@mojatatu.com wrote: >> > On 17-07-28 10:52 AM, Jamal Hadi Salim wrote: >> > > On 17-07-28 10:12 AM, Jiri Pirko wrote: > > >> > /*disallow inv

Re: [PATCH net-next v11 3/4] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-07-28 Thread Jamal Hadi Salim
On 17-07-28 11:45 AM, Jiri Pirko wrote: Fri, Jul 28, 2017 at 05:08:10PM CEST, j...@mojatatu.com wrote: On 17-07-28 10:52 AM, Jamal Hadi Salim wrote: On 17-07-28 10:12 AM, Jiri Pirko wrote: /*disallow invalid selector */ if ((bf->selector & *valid_flags_allowed) > *valid_flag

Re: [PATCH net-next v11 3/4] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-07-28 Thread Jiri Pirko
Fri, Jul 28, 2017 at 05:08:10PM CEST, j...@mojatatu.com wrote: >On 17-07-28 10:52 AM, Jamal Hadi Salim wrote: >> On 17-07-28 10:12 AM, Jiri Pirko wrote: >> > Fri, Jul 28, 2017 at 03:41:44PM CEST, j...@mojatatu.com wrote: >> [..] >> > >> > Looks like a big mess to be honest. Mixing up u32* u32 void

Re: [PATCH net-next v11 3/4] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-07-28 Thread Jamal Hadi Salim
On 17-07-28 10:52 AM, Jamal Hadi Salim wrote: On 17-07-28 10:12 AM, Jiri Pirko wrote: Fri, Jul 28, 2017 at 03:41:44PM CEST, j...@mojatatu.com wrote: [..] Looks like a big mess to be honest. Mixing up u32* u32 void*. I don't understand . Would be probably good to first apply my review comm

Re: [PATCH net-next v11 3/4] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-07-28 Thread Jiri Pirko
Fri, Jul 28, 2017 at 04:52:02PM CEST, j...@mojatatu.com wrote: >On 17-07-28 10:12 AM, Jiri Pirko wrote: >> Fri, Jul 28, 2017 at 03:41:44PM CEST, j...@mojatatu.com wrote: >[..] >> >> Looks like a big mess to be honest. Mixing up u32* u32 void*. I don't >> understand . Would be probably good to

Re: [PATCH net-next v11 3/4] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-07-28 Thread Jamal Hadi Salim
On 17-07-28 10:12 AM, Jiri Pirko wrote: Fri, Jul 28, 2017 at 03:41:44PM CEST, j...@mojatatu.com wrote: [..] Looks like a big mess to be honest. Mixing up u32* u32 void*. I don't understand . Would be probably good to first apply my review comment on the function itselt, then to add the che

Re: [PATCH net-next v11 3/4] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-07-28 Thread Jiri Pirko
Fri, Jul 28, 2017 at 03:41:44PM CEST, j...@mojatatu.com wrote: >On 17-07-25 08:37 AM, Jiri Pirko wrote: >> Tue, Jul 25, 2017 at 02:34:58PM CEST, j...@mojatatu.com wrote: >> > On 17-07-25 07:33 AM, Jiri Pirko wrote: >> > > Tue, Jul 25, 2017 at 01:22:44PM CEST, j...@mojatatu.com wrote: > >[..] >> > >

Re: [PATCH net-next v11 3/4] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-07-28 Thread Jamal Hadi Salim
On 17-07-25 08:37 AM, Jiri Pirko wrote: Tue, Jul 25, 2017 at 02:34:58PM CEST, j...@mojatatu.com wrote: On 17-07-25 07:33 AM, Jiri Pirko wrote: Tue, Jul 25, 2017 at 01:22:44PM CEST, j...@mojatatu.com wrote: [..] What if I pass val 0x1 and selector 0x0 from userspace. I don't have the bit sele

Re: [PATCH net-next v11 3/4] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-07-25 Thread Jiri Pirko
Tue, Jul 25, 2017 at 02:34:58PM CEST, j...@mojatatu.com wrote: >On 17-07-25 07:33 AM, Jiri Pirko wrote: >> Tue, Jul 25, 2017 at 01:22:44PM CEST, j...@mojatatu.com wrote: > >> > > fb? bf? nbf? Please make this synced within the patchset. >> > > >> > > >> > >> > Ok, what do you like best? ;-> >>

Re: [PATCH net-next v11 3/4] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-07-25 Thread Jamal Hadi Salim
On 17-07-25 07:33 AM, Jiri Pirko wrote: Tue, Jul 25, 2017 at 01:22:44PM CEST, j...@mojatatu.com wrote: fb? bf? nbf? Please make this synced within the patchset. Ok, what do you like best? ;-> "bf" Ok. Don't you need to mask value with selector? In fact, I think that nla_get_bitf

Re: [PATCH net-next v11 3/4] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-07-25 Thread Jiri Pirko
Tue, Jul 25, 2017 at 01:22:44PM CEST, j...@mojatatu.com wrote: >On 17-07-24 07:27 AM, Jiri Pirko wrote: >> Mon, Jul 24, 2017 at 03:35:45AM CEST, j...@mojatatu.com wrote: >> > From: Jamal Hadi Salim >[..] >> >> This helper should be part of the previous patch. >> > >Will do next update. >> > >>>

Re: [PATCH net-next v11 3/4] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-07-25 Thread Jamal Hadi Salim
On 17-07-24 07:27 AM, Jiri Pirko wrote: Mon, Jul 24, 2017 at 03:35:45AM CEST, j...@mojatatu.com wrote: From: Jamal Hadi Salim [..] This helper should be part of the previous patch. Will do next update. >> @@ -1157,8 +1164,18 @@ static int tc_dump_action(struct sk_buff *skb, struct ne

Re: [PATCH net-next v11 3/4] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-07-24 Thread Jiri Pirko
Mon, Jul 24, 2017 at 03:35:45AM CEST, j...@mojatatu.com wrote: >From: Jamal Hadi Salim > >When you dump hundreds of thousands of actions, getting only 32 per >dump batch even when the socket buffer and memory allocations allow >is inefficient. > >With this change, the user will get as many as poss

[PATCH net-next v11 3/4] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch

2017-07-23 Thread Jamal Hadi Salim
From: Jamal Hadi Salim When you dump hundreds of thousands of actions, getting only 32 per dump batch even when the socket buffer and memory allocations allow is inefficient. With this change, the user will get as many as possibly fitting within the given constraints available to the kernel. Th