All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>
Subject: Re: [Patch net 0/5] net_sched: tc action fixes and updates
Date: Thu, 11 Aug 2016 17:08:30 -0700	[thread overview]
Message-ID: <CAM_iQpXW4Rt4=H89ZdK2BwEmK2FBHownmXEoeAWjBsQW5mLxRQ@mail.gmail.com> (raw)
In-Reply-To: <62bb1c25-2967-dedc-89ac-01632d0e090d@mojatatu.com>

On Thu, Aug 11, 2016 at 9:20 AM, Jamal Hadi Salim <jhs@mojatatu.com> wrote:
> On 16-08-10 04:06 PM, Cong Wang wrote:
>>
>> On Wed, Aug 10, 2016 at 7:34 AM, Jamal Hadi Salim <jhs@mojatatu.com>
>> wrote:
>>>
>>> On 16-08-08 04:46 PM, Cong Wang wrote:
>
>
>>> tcf_exts_exec() is the culprit - and conversion to from flexarray
>>> to linked list in the fast problem to be specific.
>>
>>
>> Ah, this reminds me that I don't have to use flex_array, initially
>> I thought the tcf_exts could hold as many actions as it wants,
>> but actually there is a upper bound, TCA_ACT_MAX_PRIO.
>> IOW, a regular dynamic array is just enough here.
>>
>
> Yes, a regular array would be enough.
>
>
>> I just replaced the flex_array with a regular one, it works fine
>> for me too, at least no crash with all of my test cases.
>>
>
> Ok, I did a quick look at your patch - I still see you converting
> from array to list. I mean get tcf_exts_exec() to take an array
> and walk it. That will restore the perf numbers to the same level.


Makes sense! I just did this change as you suggest.


>
>> Please try v2, since you have more test cases that I do.
>> Or it would be great if you can share your test cases with
>> me or us.
>>
>> Be patient, every big change could have regression. :)
>>
>
> No problem Cong - except we have a kernel that crashes right now.
> BTW: I just thought of another test which uses a different code
> path
> # add a policer rule
> sudo $TC actions add action police rate 1kbit burst 90k drop
> #dump rules..
> sudo $TC -s actions ls action police
>

Passed:

[root@localhost ~]# tc actions add action police rate 1kbit burst 90k drop
[root@localhost ~]# tc actions ls action police

action order 0:  police 0x1 rate 1000bit burst 23440b mtu 2Kb action
drop overhead 0b
ref 1 bind 0
[root@localhost ~]# tc -s actions ls action police

action order 0:  police 0x1 rate 1000bit burst 23440b mtu 2Kb action
drop overhead 0b
ref 1 bind 0
Action statistics:
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0


Thanks.

  reply	other threads:[~2016-08-12  0:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08 20:46 [Patch net 0/5] net_sched: tc action fixes and updates Cong Wang
2016-08-08 20:46 ` [Patch net 1/5] net_sched: remove the leftover cleanup_a() Cong Wang
2016-08-09 21:05   ` Jamal Hadi Salim
2016-08-08 20:46 ` [Patch net 2/5] net_sched: remove an unnecessary list_del() Cong Wang
2016-08-08 20:46 ` [Patch net 3/5] net_sched: fix a typo in tc_for_each_action() Cong Wang
2016-08-09  6:37   ` Amir Vadai
2016-08-08 20:46 ` [Patch net 4/5] net_sched: move tc offload macros to pkt_cls.h Cong Wang
2016-08-08 20:46 ` [Patch net 5/5] net_sched: convert tcf_exts from list to flex_array Cong Wang
2016-08-09  8:03   ` Amir Vadai
2016-08-09 18:02     ` Cong Wang
2016-08-10 13:54 ` [Patch net 0/5] net_sched: tc action fixes and updates Jamal Hadi Salim
2016-08-10 14:34 ` Jamal Hadi Salim
2016-08-10 14:38   ` Jamal Hadi Salim
2016-08-10 20:06   ` Cong Wang
2016-08-11 16:20     ` Jamal Hadi Salim
2016-08-12  0:08       ` Cong Wang [this message]
2016-08-12 11:12         ` Jamal Hadi Salim
2016-08-13 11:05         ` Jamal Hadi Salim
2016-08-14  4:58           ` Cong Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM_iQpXW4Rt4=H89ZdK2BwEmK2FBHownmXEoeAWjBsQW5mLxRQ@mail.gmail.com' \
    --to=xiyou.wangcong@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.