Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-25 Thread Cong Wang
On Fri, May 25, 2018 at 1:39 PM, Vlad Buslov  wrote:
>
> On Thu 24 May 2018 at 23:34, Cong Wang  wrote:
>> On Mon, May 14, 2018 at 7:27 AM, Vlad Buslov  wrote:
>>> Currently, all netlink protocol handlers for updating rules, actions and
>>> qdiscs are protected with single global rtnl lock which removes any
>>> possibility for parallelism. This patch set is a first step to remove
>>> rtnl lock dependency from TC rules update path. It updates act API to
>>> use atomic operations, rcu and spinlocks for fine-grained locking. It
>>> also extend API with functions that are needed to update existing
>>> actions for parallel execution.
>>
>> Can you give a summary here for what and how it is achieved?
>
> Got it, will expand cover letter in V2 with summary.
>>
>> You said this is the first step, what do you want to achieve in this
>> very first step? And how do you achieve it? Do you break the RTNL
>
> But aren't this questions answered in paragraph you quoted?


Obviously not, you said to remove it, but never explains why it can
be removed and how it is removed. This is crucial for review.

"use atomic operations, rcu and spinlocks for fine-grained locking"
is literately nothing, why atomic/rcu makes RTNL unnecessary?
How RCU is used? What spinlocks are you talking about? What
do these spinlocks protect after removing RTNL? Why are they
safe with other netdevice and netns operations?

You explain _nothing_ here. Really. Please don't force people to
read 14 patches to understand how it works. In fact, no one wants
to read the code unless there is some high-level explanation that
makes basic sense.


> What: Change act API to not rely on one-big-global-RTNL-lock and to use
> more fine-grained synchronization methods to allow safe concurrent
> execution.

Sure, how fine-grained it is after your patchset? Why this fine-grained
lock could safely replace RTNL?

Could you stop letting us guess your puzzle words? It would save your
time from exchanging emails with me, it would save my time from
guessing you too. It is a win-win.


> How: Refactor act API code to use atomics, rcu and spinlocks, etc. for
> protecting shared data structures, add new functions required to update


What shared data structures? The per-netns idr which is already protected
by a spinlock? The TC hierarchy? The shared standalone actions? Hey,
why do I have to guess? :-/


> specific actions implementation for parallel execution. (step 2)


Claim is easy, prove is hard. I can easily claim I break RTNL down
to a per-netns lock, but I can't prove it really works. :-D


>
> If you feel that this cover letter is too terse, I will add outline of
> changes in V2.

It is not my rule, it is how you have to help people to review your
14 patches. I think it is a fair game: you help people like me to
review your patches, we help you to get them reviewed and merged
if they all make sense.



>
>> lock down to, for a quick example, a per-device lock? Or perhaps you
>> completely remove it because of what reason?
>
> I want to remove RTNL _dependency_ from act API data structures and
> code. I probably should me more specific in this case:
>
> Florian recently made a change that allows registering netlink protocol
> handlers with flag RTNL_FLAG_DOIT_UNLOCKED. Handlers registered with
> this flag are called without RTNL taken. My end goal is to have rule
> update handlers(RTM_NEWTFILTER, RTM_DELTFILTER, etc.) to be registered
> with UNLOCKED flag to allow parallel execution.


Please add this paragraph in your cover letter, it is very important for review.

>
> I do not intend to globally remove or break RTNL.
>
>>
>> I go through all the descriptions of your 14 patches (but not any code),
>> I still have no clue how you successfully avoid RTNL. Please don't
>> let me read into your code to understand that, there must be some
>> high-level justification on how it works. Without it, I don't event want
>> to read into the code.
>
> On internal code review I've been asked not to duplicate info from
> commit messages in cover letter, but I guess I can expand it with some
> high level outline in V2.

In cover letter, you should put a high-level overview of "why" and "how".
If, in the worst case, on high-level it doesn't make sense, why should
we bother to read the code? In short, you have to convince people to
read your code here.

In each patch description, you should explain what a single patch does.
I don't see any duplication.


Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-25 Thread Vlad Buslov

On Thu 24 May 2018 at 23:34, Cong Wang  wrote:
> On Mon, May 14, 2018 at 7:27 AM, Vlad Buslov  wrote:
>> Currently, all netlink protocol handlers for updating rules, actions and
>> qdiscs are protected with single global rtnl lock which removes any
>> possibility for parallelism. This patch set is a first step to remove
>> rtnl lock dependency from TC rules update path. It updates act API to
>> use atomic operations, rcu and spinlocks for fine-grained locking. It
>> also extend API with functions that are needed to update existing
>> actions for parallel execution.
>
> Can you give a summary here for what and how it is achieved?

Got it, will expand cover letter in V2 with summary.
>
> You said this is the first step, what do you want to achieve in this
> very first step? And how do you achieve it? Do you break the RTNL

But aren't this questions answered in paragraph you quoted?
What: Change act API to not rely on one-big-global-RTNL-lock and to use
more fine-grained synchronization methods to allow safe concurrent
execution.
How: Refactor act API code to use atomics, rcu and spinlocks, etc. for
protecting shared data structures, add new functions required to update
specific actions implementation for parallel execution. (step 2)

If you feel that this cover letter is too terse, I will add outline of
changes in V2.

> lock down to, for a quick example, a per-device lock? Or perhaps you
> completely remove it because of what reason?

I want to remove RTNL _dependency_ from act API data structures and
code. I probably should me more specific in this case:

Florian recently made a change that allows registering netlink protocol
handlers with flag RTNL_FLAG_DOIT_UNLOCKED. Handlers registered with
this flag are called without RTNL taken. My end goal is to have rule
update handlers(RTM_NEWTFILTER, RTM_DELTFILTER, etc.) to be registered
with UNLOCKED flag to allow parallel execution.

I do not intend to globally remove or break RTNL.

>
> I go through all the descriptions of your 14 patches (but not any code),
> I still have no clue how you successfully avoid RTNL. Please don't
> let me read into your code to understand that, there must be some
> high-level justification on how it works. Without it, I don't event want
> to read into the code.

On internal code review I've been asked not to duplicate info from
commit messages in cover letter, but I guess I can expand it with some
high level outline in V2.

>
> Thanks.

Thank you for your feedback!


Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-24 Thread Cong Wang
On Mon, May 14, 2018 at 7:27 AM, Vlad Buslov  wrote:
> Currently, all netlink protocol handlers for updating rules, actions and
> qdiscs are protected with single global rtnl lock which removes any
> possibility for parallelism. This patch set is a first step to remove
> rtnl lock dependency from TC rules update path. It updates act API to
> use atomic operations, rcu and spinlocks for fine-grained locking. It
> also extend API with functions that are needed to update existing
> actions for parallel execution.

Can you give a summary here for what and how it is achieved?

You said this is the first step, what do you want to achieve in this
very first step? And how do you achieve it? Do you break the RTNL
lock down to, for a quick example, a per-device lock? Or perhaps you
completely remove it because of what reason?

I go through all the descriptions of your 14 patches (but not any code),
I still have no clue how you successfully avoid RTNL. Please don't
let me read into your code to understand that, there must be some
high-level justification on how it works. Without it, I don't event want
to read into the code.

Thanks.


Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-18 Thread Vlad Buslov

On Fri 18 May 2018 at 12:33, Jamal Hadi Salim  wrote:
> On 17/05/18 09:35 AM, Vlad Buslov wrote:
>> 
>> On Wed 16 May 2018 at 21:51, Jiri Pirko  wrote:
>>> Wed, May 16, 2018 at 11:23:41PM CEST, vla...@mellanox.com wrote:

>
> Please make sure you have these in your kernel config:
>
> CONFIG_NET_ACT_IFE=y
> CONFIG_NET_IFE_SKBMARK=m
> CONFIG_NET_IFE_SKBPRIO=m
> CONFIG_NET_IFE_SKBTCINDEX=m
>>>
>>> Roman, could you please add this to some file? Something similar to:
>>> tools/testing/selftests/net/forwarding/config
>>>
>
> How would putting the file there help?
>
>>> Thanks!
>>>
>
> For tdc to run all the tests, it is assumed that all the supported tc
> actions/filters are enabled and compiled.

 Enabling these options allowed all ife tests to pass. Thanks!

 Error in u32 test still appears however:

 Test e9a3: Add u32 with source match

 -> prepare stage *** Could not execute: "$TC qdisc add dev $DEV1 
 ingress"

 -> prepare stage *** Error message: "Cannot find device "v0p1"
>> 
>> I investigated and was able to fix u32 problems.
>> 
>> First of all, u32 test requires having veth interfaces that are not
>> created by test infrastructure by default. Following command fixes the
>> issue:
>> 
>> sudo ip link add v0p0 type veth peer name v0p1
>> 
>
> That is documented on the README i believe - however, we should
> be able to detect that a test needs the device and create it via
> a plugin. Lucas?

Description from README:

*  The kernel must have veth support available, as a veth pair is created
   prior to running the tests.

For me it looked like test suite will create veth pair by itself and I
only need to enable veth support in kernel config.

>
>> After executing this command test passes, however looking at test
>> definition itself it seems meaningless. It creates filter with match
>> source IP 127.0.0.1, then tests if filter with source IP 127.0.0.2
>> exists, but passes successfully because it actually expects to match
>> zero filters with such IP :)
>> 
>> I fixed it and it passed properly matching single filter with source IP
>> 127.0.0.2.
>>
>
> Please send a patch.

Done.

>
>> After this flower test failed. The flower test expects that user
>> explicitly provide "-d" option with interface to use. With -d it failed
>> again. This time because it expects action to have 1m references, but
>> actual value was 101. I investigated it and found out that test
>> passed, if executed without running other tests first. So it seemed that
>> some other test was leaking reference to gact action. It turned out that
>> culprit was mirred test 6fb4, which created pipe action but didn't flush
>> it afterward.
>>
>
> Hopefully the last patch from Roman fixes that? Otherwise send something
> on top.

Done.

>
>> With all tests passing on that particular version of net-next, I will
>> now rebase my changes on top of it and run them again.
>> 
>
> Thank you Vlad!
>
> cheers,
> jamal



Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-18 Thread Jamal Hadi Salim

On 17/05/18 09:35 AM, Vlad Buslov wrote:


On Wed 16 May 2018 at 21:51, Jiri Pirko  wrote:

Wed, May 16, 2018 at 11:23:41PM CEST, vla...@mellanox.com wrote:





Please make sure you have these in your kernel config:

CONFIG_NET_ACT_IFE=y
CONFIG_NET_IFE_SKBMARK=m
CONFIG_NET_IFE_SKBPRIO=m
CONFIG_NET_IFE_SKBTCINDEX=m


Roman, could you please add this to some file? Something similar to:
tools/testing/selftests/net/forwarding/config



How would putting the file there help?


Thanks!



For tdc to run all the tests, it is assumed that all the supported tc
actions/filters are enabled and compiled.


Enabling these options allowed all ife tests to pass. Thanks!

Error in u32 test still appears however:

Test e9a3: Add u32 with source match

-> prepare stage *** Could not execute: "$TC qdisc add dev $DEV1 ingress"

-> prepare stage *** Error message: "Cannot find device "v0p1"


I investigated and was able to fix u32 problems.

First of all, u32 test requires having veth interfaces that are not
created by test infrastructure by default. Following command fixes the
issue:

sudo ip link add v0p0 type veth peer name v0p1



That is documented on the README i believe - however, we should
be able to detect that a test needs the device and create it via
a plugin. Lucas?


After executing this command test passes, however looking at test
definition itself it seems meaningless. It creates filter with match
source IP 127.0.0.1, then tests if filter with source IP 127.0.0.2
exists, but passes successfully because it actually expects to match
zero filters with such IP :)

I fixed it and it passed properly matching single filter with source IP
127.0.0.2.



Please send a patch.


After this flower test failed. The flower test expects that user
explicitly provide "-d" option with interface to use. With -d it failed
again. This time because it expects action to have 1m references, but
actual value was 101. I investigated it and found out that test
passed, if executed without running other tests first. So it seemed that
some other test was leaking reference to gact action. It turned out that
culprit was mirred test 6fb4, which created pipe action but didn't flush
it afterward.



Hopefully the last patch from Roman fixes that? Otherwise send something
on top.


With all tests passing on that particular version of net-next, I will
now rebase my changes on top of it and run them again.



Thank you Vlad!

cheers,
jamal


Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-17 Thread Vlad Buslov

On Wed 16 May 2018 at 21:51, Jiri Pirko  wrote:
> Wed, May 16, 2018 at 11:23:41PM CEST, vla...@mellanox.com wrote:
>>
>>On Wed 16 May 2018 at 17:36, Roman Mashak  wrote:
>>> Vlad Buslov  writes:
>>>
 On Wed 16 May 2018 at 14:38, Roman Mashak  wrote:
> On Wed, May 16, 2018 at 2:43 AM, Vlad Buslov  wrote:
>> I'm trying to run tdc, but keep getting following error even on clean
>> branch without my patches:
>
> Vlad, not sure if you saw my email:
> Apply Roman's patch and try again
>
> https://marc.info/?l=linux-netdev=152639369112020=2
>
> cheers,
> jamal

 With patch applied I get following error:

 Test 7d50: Add skbmod action to set destination mac
 exit: 255 0
 dst MAC address <11:22:33:44:55:66>
 RTNETLINK answers: No such file or directory
 We have an error talking to the kernel

>>>
>>> You may actually have broken something with your patches in this case.
>>
>> Results is for net-next without my patches.
>
> Do you have skbmod compiled in kernel or as a module?

 Thanks, already figured out that default config has some actions
 disabled.
 Have more errors now. Everything related to ife:

 Test 7682: Create valid ife encode action with mark and pass control
 exit: 255 0
 IFE type 0xED3E
 RTNETLINK answers: No such file or directory
 We have an error talking to the kernel

 Test ef47: Create valid ife encode action with mark and pipe control
 exit: 255 0
 IFE type 0xED3E
 RTNETLINK answers: No space left on device
 We have an error talking to the kernel

 Test df43: Create valid ife encode action with mark and continue control
 exit: 255 0
 IFE type 0xED3E
 RTNETLINK answers: No space left on device
 We have an error talking to the kernel

 Test e4cf: Create valid ife encode action with mark and drop control
 exit: 255 0
 IFE type 0xED3E
 RTNETLINK answers: No space left on device
 We have an error talking to the kernel

 Test ccba: Create valid ife encode action with mark and reclassify control
 exit: 255 0
 IFE type 0xED3E
 RTNETLINK answers: No space left on device
 We have an error talking to the kernel

 Test a1cf: Create valid ife encode action with mark and jump control
 exit: 255 0
 IFE type 0xED3E
 RTNETLINK answers: No space left on device
 We have an error talking to the kernel

 ...


>>>
>>> Please make sure you have these in your kernel config:
>>>
>>> CONFIG_NET_ACT_IFE=y
>>> CONFIG_NET_IFE_SKBMARK=m
>>> CONFIG_NET_IFE_SKBPRIO=m
>>> CONFIG_NET_IFE_SKBTCINDEX=m
>
> Roman, could you please add this to some file? Something similar to:
> tools/testing/selftests/net/forwarding/config
>
> Thanks!
>
>>>
>>> For tdc to run all the tests, it is assumed that all the supported tc
>>> actions/filters are enabled and compiled.
>>
>>Enabling these options allowed all ife tests to pass. Thanks!
>>
>>Error in u32 test still appears however:
>>
>>Test e9a3: Add u32 with source match
>>
>>-> prepare stage *** Could not execute: "$TC qdisc add dev $DEV1 ingress"
>>
>>-> prepare stage *** Error message: "Cannot find device "v0p1"

I investigated and was able to fix u32 problems.

First of all, u32 test requires having veth interfaces that are not
created by test infrastructure by default. Following command fixes the
issue:

sudo ip link add v0p0 type veth peer name v0p1

After executing this command test passes, however looking at test
definition itself it seems meaningless. It creates filter with match
source IP 127.0.0.1, then tests if filter with source IP 127.0.0.2
exists, but passes successfully because it actually expects to match
zero filters with such IP :)

I fixed it and it passed properly matching single filter with source IP
127.0.0.2.

After this flower test failed. The flower test expects that user
explicitly provide "-d" option with interface to use. With -d it failed
again. This time because it expects action to have 1m references, but
actual value was 101. I investigated it and found out that test
passed, if executed without running other tests first. So it seemed that
some other test was leaking reference to gact action. It turned out that
culprit was mirred test 6fb4, which created pipe action but didn't flush
it afterward.

With all tests passing on that particular version of net-next, I will
now rebase my changes on top of it and run them again.

Regards,
Vlad


Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-16 Thread Jiri Pirko
Wed, May 16, 2018 at 11:23:41PM CEST, vla...@mellanox.com wrote:
>
>On Wed 16 May 2018 at 17:36, Roman Mashak  wrote:
>> Vlad Buslov  writes:
>>
>>> On Wed 16 May 2018 at 14:38, Roman Mashak  wrote:
 On Wed, May 16, 2018 at 2:43 AM, Vlad Buslov  wrote:
> I'm trying to run tdc, but keep getting following error even on clean
> branch without my patches:

 Vlad, not sure if you saw my email:
 Apply Roman's patch and try again

 https://marc.info/?l=linux-netdev=152639369112020=2

 cheers,
 jamal
>>>
>>> With patch applied I get following error:
>>>
>>> Test 7d50: Add skbmod action to set destination mac
>>> exit: 255 0
>>> dst MAC address <11:22:33:44:55:66>
>>> RTNETLINK answers: No such file or directory
>>> We have an error talking to the kernel
>>>
>>
>> You may actually have broken something with your patches in this case.
>
> Results is for net-next without my patches.

 Do you have skbmod compiled in kernel or as a module?
>>>
>>> Thanks, already figured out that default config has some actions
>>> disabled.
>>> Have more errors now. Everything related to ife:
>>>
>>> Test 7682: Create valid ife encode action with mark and pass control
>>> exit: 255 0
>>> IFE type 0xED3E
>>> RTNETLINK answers: No such file or directory
>>> We have an error talking to the kernel
>>>
>>> Test ef47: Create valid ife encode action with mark and pipe control
>>> exit: 255 0
>>> IFE type 0xED3E
>>> RTNETLINK answers: No space left on device
>>> We have an error talking to the kernel
>>>
>>> Test df43: Create valid ife encode action with mark and continue control
>>> exit: 255 0
>>> IFE type 0xED3E
>>> RTNETLINK answers: No space left on device
>>> We have an error talking to the kernel
>>>
>>> Test e4cf: Create valid ife encode action with mark and drop control
>>> exit: 255 0
>>> IFE type 0xED3E
>>> RTNETLINK answers: No space left on device
>>> We have an error talking to the kernel
>>>
>>> Test ccba: Create valid ife encode action with mark and reclassify control
>>> exit: 255 0
>>> IFE type 0xED3E
>>> RTNETLINK answers: No space left on device
>>> We have an error talking to the kernel
>>>
>>> Test a1cf: Create valid ife encode action with mark and jump control
>>> exit: 255 0
>>> IFE type 0xED3E
>>> RTNETLINK answers: No space left on device
>>> We have an error talking to the kernel
>>>
>>> ...
>>>
>>>
>>
>> Please make sure you have these in your kernel config:
>>
>> CONFIG_NET_ACT_IFE=y
>> CONFIG_NET_IFE_SKBMARK=m
>> CONFIG_NET_IFE_SKBPRIO=m
>> CONFIG_NET_IFE_SKBTCINDEX=m

Roman, could you please add this to some file? Something similar to:
tools/testing/selftests/net/forwarding/config

Thanks!

>>
>> For tdc to run all the tests, it is assumed that all the supported tc
>> actions/filters are enabled and compiled.
>
>Enabling these options allowed all ife tests to pass. Thanks!
>
>Error in u32 test still appears however:
>
>Test e9a3: Add u32 with source match
>
>-> prepare stage *** Could not execute: "$TC qdisc add dev $DEV1 ingress"
>
>-> prepare stage *** Error message: "Cannot find device "v0p1"


Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-16 Thread Vlad Buslov

On Wed 16 May 2018 at 18:10, Davide Caratti  wrote:
> On Wed, 2018-05-16 at 13:36 -0400, Roman Mashak wrote:
>> Vlad Buslov  writes:
>> 
>> > On Wed 16 May 2018 at 14:38, Roman Mashak  wrote:
>> > > On Wed, May 16, 2018 at 2:43 AM, Vlad Buslov  wrote:
>> > > > > > > > I'm trying to run tdc, but keep getting following error even 
>> > > > > > > > on clean
>> > > > > > > > branch without my patches:
>> > > > > > > 
>> > > > > > > Vlad, not sure if you saw my email:
>> > > > > > > Apply Roman's patch and try again
>> > > > > > > 
>> > > > > > > https://marc.info/?l=linux-netdev=152639369112020=2
>> > > > > > > 
>> > > > > > > cheers,
>> > > > > > > jamal
>> > > > > > 
>> > > > > > With patch applied I get following error:
>> > > > > > 
>> > > > > > Test 7d50: Add skbmod action to set destination mac
>> > > > > > exit: 255 0
>> > > > > > dst MAC address <11:22:33:44:55:66>
>> > > > > > RTNETLINK answers: No such file or directory
>> > > > > > We have an error talking to the kernel
>> > > > > > 
>> > > > > 
>> > > > > You may actually have broken something with your patches in this 
>> > > > > case.
>> > > > 
>> > > > Results is for net-next without my patches.
>> > > 
>> > > Do you have skbmod compiled in kernel or as a module?
>> > 
>> > Thanks, already figured out that default config has some actions
>> > disabled.
>> > Have more errors now. Everything related to ife:
>> > 
>> > Test 7682: Create valid ife encode action with mark and pass control
>> > exit: 255 0
>> > IFE type 0xED3E
>> > RTNETLINK answers: No such file or directory
>> > We have an error talking to the kernel
>> > 
>> > Test ef47: Create valid ife encode action with mark and pipe control
>> > exit: 255 0
>> > IFE type 0xED3E
>> > RTNETLINK answers: No space left on device
>> > We have an error talking to the kernel
>> > 
>> > Test df43: Create valid ife encode action with mark and continue control
>> > exit: 255 0
>> > IFE type 0xED3E
>> > RTNETLINK answers: No space left on device
>> > We have an error talking to the kernel
>> > 
>> > Test e4cf: Create valid ife encode action with mark and drop control
>> > exit: 255 0
>> > IFE type 0xED3E
>> > RTNETLINK answers: No space left on device
>> > We have an error talking to the kernel
>> > 
>> > Test ccba: Create valid ife encode action with mark and reclassify control
>> > exit: 255 0
>> > IFE type 0xED3E
>> > RTNETLINK answers: No space left on device
>> > We have an error talking to the kernel
>> > 
>> > Test a1cf: Create valid ife encode action with mark and jump control
>> > exit: 255 0
>> > IFE type 0xED3E
>> > RTNETLINK answers: No space left on device
>> > We have an error talking to the kernel
>> > 
>> > ...
>> > 
>> > 
>> 
>> Please make sure you have these in your kernel config:
>> 
>> CONFIG_NET_ACT_IFE=y
>> CONFIG_NET_IFE_SKBMARK=m
>> CONFIG_NET_IFE_SKBPRIO=m
>> CONFIG_NET_IFE_SKBTCINDEX=m
>> 
>> For tdc to run all the tests, it is assumed that all the supported tc
>> actions/filters are enabled and compiled.
> hello,
>
> looking at ife.json, it seems that we have at least 4 typos in
> 'teardown'. 
>
> It does
>
> $TC actions flush action skbedit
>
> in place of 
>
> $TC actions flush action ife
>
> On my fedora28 (with fedora28 kernel), fixing them made test 7682 return
> 'ok' (and all others in ife category, except ee94, 7ee0 and 0a7d).
>
> regards,

I can confirm that on net-next kernel version that I use, there are also
multiple teardowns of actions type skbedit after actually creating ife
action in file ife.json. However, tests pass when I enabled config
options that Roman suggested:

ok 119 - 7682 # Create valid ife encode action with mark and pass control


Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-16 Thread Vlad Buslov

On Wed 16 May 2018 at 17:36, Roman Mashak  wrote:
> Vlad Buslov  writes:
>
>> On Wed 16 May 2018 at 14:38, Roman Mashak  wrote:
>>> On Wed, May 16, 2018 at 2:43 AM, Vlad Buslov  wrote:
 I'm trying to run tdc, but keep getting following error even on clean
 branch without my patches:
>>>
>>> Vlad, not sure if you saw my email:
>>> Apply Roman's patch and try again
>>>
>>> https://marc.info/?l=linux-netdev=152639369112020=2
>>>
>>> cheers,
>>> jamal
>>
>> With patch applied I get following error:
>>
>> Test 7d50: Add skbmod action to set destination mac
>> exit: 255 0
>> dst MAC address <11:22:33:44:55:66>
>> RTNETLINK answers: No such file or directory
>> We have an error talking to the kernel
>>
>
> You may actually have broken something with your patches in this case.

 Results is for net-next without my patches.
>>>
>>> Do you have skbmod compiled in kernel or as a module?
>>
>> Thanks, already figured out that default config has some actions
>> disabled.
>> Have more errors now. Everything related to ife:
>>
>> Test 7682: Create valid ife encode action with mark and pass control
>> exit: 255 0
>> IFE type 0xED3E
>> RTNETLINK answers: No such file or directory
>> We have an error talking to the kernel
>>
>> Test ef47: Create valid ife encode action with mark and pipe control
>> exit: 255 0
>> IFE type 0xED3E
>> RTNETLINK answers: No space left on device
>> We have an error talking to the kernel
>>
>> Test df43: Create valid ife encode action with mark and continue control
>> exit: 255 0
>> IFE type 0xED3E
>> RTNETLINK answers: No space left on device
>> We have an error talking to the kernel
>>
>> Test e4cf: Create valid ife encode action with mark and drop control
>> exit: 255 0
>> IFE type 0xED3E
>> RTNETLINK answers: No space left on device
>> We have an error talking to the kernel
>>
>> Test ccba: Create valid ife encode action with mark and reclassify control
>> exit: 255 0
>> IFE type 0xED3E
>> RTNETLINK answers: No space left on device
>> We have an error talking to the kernel
>>
>> Test a1cf: Create valid ife encode action with mark and jump control
>> exit: 255 0
>> IFE type 0xED3E
>> RTNETLINK answers: No space left on device
>> We have an error talking to the kernel
>>
>> ...
>>
>>
>
> Please make sure you have these in your kernel config:
>
> CONFIG_NET_ACT_IFE=y
> CONFIG_NET_IFE_SKBMARK=m
> CONFIG_NET_IFE_SKBPRIO=m
> CONFIG_NET_IFE_SKBTCINDEX=m
>
> For tdc to run all the tests, it is assumed that all the supported tc
> actions/filters are enabled and compiled.

Enabling these options allowed all ife tests to pass. Thanks!

Error in u32 test still appears however:

Test e9a3: Add u32 with source match

-> prepare stage *** Could not execute: "$TC qdisc add dev $DEV1 ingress"

-> prepare stage *** Error message: "Cannot find device "v0p1"


Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-16 Thread Davide Caratti
On Wed, 2018-05-16 at 13:36 -0400, Roman Mashak wrote:
> Vlad Buslov  writes:
> 
> > On Wed 16 May 2018 at 14:38, Roman Mashak  wrote:
> > > On Wed, May 16, 2018 at 2:43 AM, Vlad Buslov  wrote:
> > > > > > > > I'm trying to run tdc, but keep getting following error even on 
> > > > > > > > clean
> > > > > > > > branch without my patches:
> > > > > > > 
> > > > > > > Vlad, not sure if you saw my email:
> > > > > > > Apply Roman's patch and try again
> > > > > > > 
> > > > > > > https://marc.info/?l=linux-netdev=152639369112020=2
> > > > > > > 
> > > > > > > cheers,
> > > > > > > jamal
> > > > > > 
> > > > > > With patch applied I get following error:
> > > > > > 
> > > > > > Test 7d50: Add skbmod action to set destination mac
> > > > > > exit: 255 0
> > > > > > dst MAC address <11:22:33:44:55:66>
> > > > > > RTNETLINK answers: No such file or directory
> > > > > > We have an error talking to the kernel
> > > > > > 
> > > > > 
> > > > > You may actually have broken something with your patches in this case.
> > > > 
> > > > Results is for net-next without my patches.
> > > 
> > > Do you have skbmod compiled in kernel or as a module?
> > 
> > Thanks, already figured out that default config has some actions
> > disabled.
> > Have more errors now. Everything related to ife:
> > 
> > Test 7682: Create valid ife encode action with mark and pass control
> > exit: 255 0
> > IFE type 0xED3E
> > RTNETLINK answers: No such file or directory
> > We have an error talking to the kernel
> > 
> > Test ef47: Create valid ife encode action with mark and pipe control
> > exit: 255 0
> > IFE type 0xED3E
> > RTNETLINK answers: No space left on device
> > We have an error talking to the kernel
> > 
> > Test df43: Create valid ife encode action with mark and continue control
> > exit: 255 0
> > IFE type 0xED3E
> > RTNETLINK answers: No space left on device
> > We have an error talking to the kernel
> > 
> > Test e4cf: Create valid ife encode action with mark and drop control
> > exit: 255 0
> > IFE type 0xED3E
> > RTNETLINK answers: No space left on device
> > We have an error talking to the kernel
> > 
> > Test ccba: Create valid ife encode action with mark and reclassify control
> > exit: 255 0
> > IFE type 0xED3E
> > RTNETLINK answers: No space left on device
> > We have an error talking to the kernel
> > 
> > Test a1cf: Create valid ife encode action with mark and jump control
> > exit: 255 0
> > IFE type 0xED3E
> > RTNETLINK answers: No space left on device
> > We have an error talking to the kernel
> > 
> > ...
> > 
> > 
> 
> Please make sure you have these in your kernel config:
> 
> CONFIG_NET_ACT_IFE=y
> CONFIG_NET_IFE_SKBMARK=m
> CONFIG_NET_IFE_SKBPRIO=m
> CONFIG_NET_IFE_SKBTCINDEX=m
> 
> For tdc to run all the tests, it is assumed that all the supported tc
> actions/filters are enabled and compiled.
hello,

looking at ife.json, it seems that we have at least 4 typos in
'teardown'. 

It does

$TC actions flush action skbedit

in place of 

$TC actions flush action ife

On my fedora28 (with fedora28 kernel), fixing them made test 7682 return
'ok' (and all others in ife category, except ee94, 7ee0 and 0a7d).

regards,
-- 
davide



Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-16 Thread Roman Mashak
Vlad Buslov  writes:

> On Wed 16 May 2018 at 14:38, Roman Mashak  wrote:
>> On Wed, May 16, 2018 at 2:43 AM, Vlad Buslov  wrote:
>>> I'm trying to run tdc, but keep getting following error even on clean
>>> branch without my patches:
>>
>> Vlad, not sure if you saw my email:
>> Apply Roman's patch and try again
>>
>> https://marc.info/?l=linux-netdev=152639369112020=2
>>
>> cheers,
>> jamal
>
> With patch applied I get following error:
>
> Test 7d50: Add skbmod action to set destination mac
> exit: 255 0
> dst MAC address <11:22:33:44:55:66>
> RTNETLINK answers: No such file or directory
> We have an error talking to the kernel
>

 You may actually have broken something with your patches in this case.
>>>
>>> Results is for net-next without my patches.
>>
>> Do you have skbmod compiled in kernel or as a module?
>
> Thanks, already figured out that default config has some actions
> disabled.
> Have more errors now. Everything related to ife:
>
> Test 7682: Create valid ife encode action with mark and pass control
> exit: 255 0
> IFE type 0xED3E
> RTNETLINK answers: No such file or directory
> We have an error talking to the kernel
>
> Test ef47: Create valid ife encode action with mark and pipe control
> exit: 255 0
> IFE type 0xED3E
> RTNETLINK answers: No space left on device
> We have an error talking to the kernel
>
> Test df43: Create valid ife encode action with mark and continue control
> exit: 255 0
> IFE type 0xED3E
> RTNETLINK answers: No space left on device
> We have an error talking to the kernel
>
> Test e4cf: Create valid ife encode action with mark and drop control
> exit: 255 0
> IFE type 0xED3E
> RTNETLINK answers: No space left on device
> We have an error talking to the kernel
>
> Test ccba: Create valid ife encode action with mark and reclassify control
> exit: 255 0
> IFE type 0xED3E
> RTNETLINK answers: No space left on device
> We have an error talking to the kernel
>
> Test a1cf: Create valid ife encode action with mark and jump control
> exit: 255 0
> IFE type 0xED3E
> RTNETLINK answers: No space left on device
> We have an error talking to the kernel
>
> ...
>
>

Please make sure you have these in your kernel config:

CONFIG_NET_ACT_IFE=y
CONFIG_NET_IFE_SKBMARK=m
CONFIG_NET_IFE_SKBPRIO=m
CONFIG_NET_IFE_SKBTCINDEX=m

For tdc to run all the tests, it is assumed that all the supported tc
actions/filters are enabled and compiled.


Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-16 Thread Vlad Buslov

On Wed 16 May 2018 at 15:02, Jamal Hadi Salim  wrote:
> On 16/05/18 10:38 AM, Roman Mashak wrote:
>

 You may actually have broken something with your patches in this case.
>>>
>>> Results is for net-next without my patches.
>> 
>> Do you have skbmod compiled in kernel or as a module?
>> 
>
> Also - suggestion is to use latest iproute2 which interprets
> extended error information (instead of the classical
> "We have an error talking to the kernel").
>
> cheers,
> jamal

I have very recent iproute2 installed. Last commit date is May 9th.


Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-16 Thread Vlad Buslov

On Wed 16 May 2018 at 14:38, Roman Mashak  wrote:
> On Wed, May 16, 2018 at 2:43 AM, Vlad Buslov  wrote:
>> I'm trying to run tdc, but keep getting following error even on clean
>> branch without my patches:
>
> Vlad, not sure if you saw my email:
> Apply Roman's patch and try again
>
> https://marc.info/?l=linux-netdev=152639369112020=2
>
> cheers,
> jamal

 With patch applied I get following error:

 Test 7d50: Add skbmod action to set destination mac
 exit: 255 0
 dst MAC address <11:22:33:44:55:66>
 RTNETLINK answers: No such file or directory
 We have an error talking to the kernel

>>>
>>> You may actually have broken something with your patches in this case.
>>
>> Results is for net-next without my patches.
>
> Do you have skbmod compiled in kernel or as a module?

Thanks, already figured out that default config has some actions
disabled.
Have more errors now. Everything related to ife:

Test 7682: Create valid ife encode action with mark and pass control
exit: 255 0
IFE type 0xED3E
RTNETLINK answers: No such file or directory
We have an error talking to the kernel

Test ef47: Create valid ife encode action with mark and pipe control
exit: 255 0
IFE type 0xED3E
RTNETLINK answers: No space left on device
We have an error talking to the kernel

Test df43: Create valid ife encode action with mark and continue control
exit: 255 0
IFE type 0xED3E
RTNETLINK answers: No space left on device
We have an error talking to the kernel

Test e4cf: Create valid ife encode action with mark and drop control
exit: 255 0
IFE type 0xED3E
RTNETLINK answers: No space left on device
We have an error talking to the kernel

Test ccba: Create valid ife encode action with mark and reclassify control
exit: 255 0
IFE type 0xED3E
RTNETLINK answers: No space left on device
We have an error talking to the kernel

Test a1cf: Create valid ife encode action with mark and jump control
exit: 255 0
IFE type 0xED3E
RTNETLINK answers: No space left on device
We have an error talking to the kernel

...


And problem with u32:
Test e9a3: Add u32 with source match

-> prepare stage *** Could not execute: "$TC qdisc add dev $DEV1 ingress"

-> prepare stage *** Error message: "Cannot find device "v0p1"
"

-> prepare stage *** Aborting test run.


<_io.BufferedReader name=3> *** stdout ***


<_io.BufferedReader name=5> *** stderr ***
"-> prepare stage" did not complete successfully
Exception  ('setup', None, '"-> prepare 
stage" did not complete successfully') (caught in test_runner, running test 238 
e9a3 Add u32 with source match stage setup)
---
traceback
  File "./tdc.py", line 293, in test_runner
tap += run_one_test(pm, args, index, tidx)
  File "./tdc.py", line 192, in run_one_test
prepare_env(args, pm, 'setup', "-> prepare stage", tidx["setup"])
  File "./tdc.py", line 177, in prepare_env
'"{}" did not complete successfully'.format(prefix))
---
---

Any suggestions regarding these errors?

Thanks,
Vlad


Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-16 Thread Jamal Hadi Salim

On 16/05/18 10:38 AM, Roman Mashak wrote:



You may actually have broken something with your patches in this case.


Results is for net-next without my patches.


Do you have skbmod compiled in kernel or as a module?



Also - suggestion is to use latest iproute2 which interprets
extended error information (instead of the classical
"We have an error talking to the kernel").

cheers,
jamal


Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-16 Thread Roman Mashak
On Wed, May 16, 2018 at 2:43 AM, Vlad Buslov  wrote:
> I'm trying to run tdc, but keep getting following error even on clean
> branch without my patches:

 Vlad, not sure if you saw my email:
 Apply Roman's patch and try again

 https://marc.info/?l=linux-netdev=152639369112020=2

 cheers,
 jamal
>>>
>>> With patch applied I get following error:
>>>
>>> Test 7d50: Add skbmod action to set destination mac
>>> exit: 255 0
>>> dst MAC address <11:22:33:44:55:66>
>>> RTNETLINK answers: No such file or directory
>>> We have an error talking to the kernel
>>>
>>
>> You may actually have broken something with your patches in this case.
>
> Results is for net-next without my patches.

Do you have skbmod compiled in kernel or as a module?


Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-16 Thread Vlad Buslov

On Tue 15 May 2018 at 22:07, Lucas Bates  wrote:
> On Tue, May 15, 2018 at 6:03 PM, Lucas Bates  wrote:
>> On Tue, May 15, 2018 at 5:49 PM, Jamal Hadi Salim  wrote:
 Test 7d50: Add skbmod action to set destination mac
 exit: 255 0
 dst MAC address <11:22:33:44:55:66>
 RTNETLINK answers: No such file or directory
 We have an error talking to the kernel

>>>
>>> You may actually have broken something with your patches in this case.
>>>
>>> Lucas - does this test pass on latest net-next?
>>
>> Yes, 7d50 has been passing on our builds for at least the last month.
>
> Also, Vlad, you can look at the JSON to see the test case data, or run
> tdc.py -s | less and search for the ID to see the commands being run.
> I'm here if you need help using tdc.

Hello Lucas,

I'll look into JSON test definition and try to understand whats wrong.


Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-16 Thread Vlad Buslov

On Tue 15 May 2018 at 21:49, Jamal Hadi Salim  wrote:
> On 15/05/18 05:21 PM, Vlad Buslov wrote:
>> 
>> On Tue 15 May 2018 at 18:25, Jamal Hadi Salim  wrote:
>>> On 14/05/18 04:46 PM, Vlad Buslov wrote:

 On Mon 14 May 2018 at 18:03, Jamal Hadi Salim  wrote:
> On 14/05/18 10:27 AM, Vlad Buslov wrote:
>>>
>>>
 Hello Jamal,

 I'm trying to run tdc, but keep getting following error even on clean
 branch without my patches:
>>>
>>> Vlad, not sure if you saw my email:
>>> Apply Roman's patch and try again
>>>
>>> https://marc.info/?l=linux-netdev=152639369112020=2
>>>
>>> cheers,
>>> jamal
>> 
>> With patch applied I get following error:
>> 
>> Test 7d50: Add skbmod action to set destination mac
>> exit: 255 0
>> dst MAC address <11:22:33:44:55:66>
>> RTNETLINK answers: No such file or directory
>> We have an error talking to the kernel
>> 
>
> You may actually have broken something with your patches in this case.

Results is for net-next without my patches.

>
> Lucas - does this test pass on latest net-next?
>
> cheers,
> jamal
>
> PS:- any reason for the big Cc? I have trimmed it down.

This Cc was generated by gen_maintainer.



Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-15 Thread Lucas Bates
On Tue, May 15, 2018 at 6:03 PM, Lucas Bates  wrote:
> On Tue, May 15, 2018 at 5:49 PM, Jamal Hadi Salim  wrote:
>>> Test 7d50: Add skbmod action to set destination mac
>>> exit: 255 0
>>> dst MAC address <11:22:33:44:55:66>
>>> RTNETLINK answers: No such file or directory
>>> We have an error talking to the kernel
>>>
>>
>> You may actually have broken something with your patches in this case.
>>
>> Lucas - does this test pass on latest net-next?
>
> Yes, 7d50 has been passing on our builds for at least the last month.

Also, Vlad, you can look at the JSON to see the test case data, or run
tdc.py -s | less and search for the ID to see the commands being run.
I'm here if you need help using tdc.


Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-15 Thread Lucas Bates
On Tue, May 15, 2018 at 5:49 PM, Jamal Hadi Salim  wrote:
>> Test 7d50: Add skbmod action to set destination mac
>> exit: 255 0
>> dst MAC address <11:22:33:44:55:66>
>> RTNETLINK answers: No such file or directory
>> We have an error talking to the kernel
>>
>
> You may actually have broken something with your patches in this case.
>
> Lucas - does this test pass on latest net-next?

Yes, 7d50 has been passing on our builds for at least the last month.

- Lucas


Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-15 Thread Jamal Hadi Salim

On 15/05/18 05:21 PM, Vlad Buslov wrote:


On Tue 15 May 2018 at 18:25, Jamal Hadi Salim  wrote:

On 14/05/18 04:46 PM, Vlad Buslov wrote:


On Mon 14 May 2018 at 18:03, Jamal Hadi Salim  wrote:

On 14/05/18 10:27 AM, Vlad Buslov wrote:




Hello Jamal,

I'm trying to run tdc, but keep getting following error even on clean
branch without my patches:


Vlad, not sure if you saw my email:
Apply Roman's patch and try again

https://marc.info/?l=linux-netdev=152639369112020=2

cheers,
jamal


With patch applied I get following error:

Test 7d50: Add skbmod action to set destination mac
exit: 255 0
dst MAC address <11:22:33:44:55:66>
RTNETLINK answers: No such file or directory
We have an error talking to the kernel



You may actually have broken something with your patches in this case.

Lucas - does this test pass on latest net-next?

cheers,
jamal

PS:- any reason for the big Cc? I have trimmed it down.


Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-15 Thread Vlad Buslov

On Tue 15 May 2018 at 18:25, Jamal Hadi Salim  wrote:
> On 14/05/18 04:46 PM, Vlad Buslov wrote:
>> 
>> On Mon 14 May 2018 at 18:03, Jamal Hadi Salim  wrote:
>>> On 14/05/18 10:27 AM, Vlad Buslov wrote:
>
>
>> Hello Jamal,
>> 
>> I'm trying to run tdc, but keep getting following error even on clean
>> branch without my patches:
>
> Vlad, not sure if you saw my email:
> Apply Roman's patch and try again
>
> https://marc.info/?l=linux-netdev=152639369112020=2
>
> cheers,
> jamal

With patch applied I get following error:

Test 7d50: Add skbmod action to set destination mac
exit: 255 0
dst MAC address <11:22:33:44:55:66>
RTNETLINK answers: No such file or directory
We have an error talking to the kernel


-> teardown stage *** Could not execute: "$TC actions flush action skbmod"

-> teardown stage *** Error message: "RTNETLINK answers: Invalid argument
We have an error flushing
"

-> teardown stage *** Aborting test run.


<_io.BufferedReader name=3> *** stdout ***


<_io.BufferedReader name=5> *** stderr ***
"-> teardown stage" did not complete successfully
Exception  ('teardown', 'dst MAC address 
<11:22:33:44:55:66>\nRTNETLINK answers: No such file or directory\nWe have an 
error talking to the kernel\n', '"-> teardown stage" did not complete 
successful
ly') (caught in test_runner, running test 87 7d50 Add skbmod action to set 
destination mac stage teardown)
---
traceback
  File "./tdc.py", line 293, in test_runner
tap += run_one_test(pm, args, index, tidx)
  File "./tdc.py", line 229, in run_one_test
prepare_env(args, pm, 'teardown', '-> teardown stage', 
tidx['teardown'], procout)
  File "./tdc.py", line 177, in prepare_env
'"{}" did not complete successfully'.format(prefix))
---
accumulated output for this test:
dst MAC address <11:22:33:44:55:66>
RTNETLINK answers: No such file or directory
We have an error talking to the kernel

---


Regards,
Vlad



Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-15 Thread Jamal Hadi Salim

On 14/05/18 04:46 PM, Vlad Buslov wrote:


On Mon 14 May 2018 at 18:03, Jamal Hadi Salim  wrote:

On 14/05/18 10:27 AM, Vlad Buslov wrote:




Hello Jamal,

I'm trying to run tdc, but keep getting following error even on clean
branch without my patches:


Vlad, not sure if you saw my email:
Apply Roman's patch and try again

https://marc.info/?l=linux-netdev=152639369112020=2

cheers,
jamal


Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-15 Thread Jiri Pirko
Mon, May 14, 2018 at 08:03:20PM CEST, j...@mojatatu.com wrote:
>On 14/05/18 10:27 AM, Vlad Buslov wrote:
>> Currently, all netlink protocol handlers for updating rules, actions and
>> qdiscs are protected with single global rtnl lock which removes any
>> possibility for parallelism. This patch set is a first step to remove
>> rtnl lock dependency from TC rules update path. It updates act API to
>> use atomic operations, rcu and spinlocks for fine-grained locking. It
>> also extend API with functions that are needed to update existing
>> actions for parallel execution.
>> 
>> Outline of changes:
>> - Change tc action to use atomic reference and bind counters, rcu
>>mechanism for cookie update.
>> - Extend action ops API with 'delete' function and 'unlocked' flag.
>> - Change action API to work with actions in lockless manner based on
>>primitives implemented in previous patches.
>> - Extend action API with new functions necessary to implement unlocked
>>actions.
>
>Please run all the tdc tests with these changes. This area has almost
>good test coverage at this point. If you need help just ping me.

Oh, that reminds me. Vlad, please run also:
tools/testing/selftests/net/forwarding/tc_*

Thanks!


Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-14 Thread Vlad Buslov

On Mon 14 May 2018 at 18:03, Jamal Hadi Salim  wrote:
> On 14/05/18 10:27 AM, Vlad Buslov wrote:
>> Currently, all netlink protocol handlers for updating rules, actions and
>> qdiscs are protected with single global rtnl lock which removes any
>> possibility for parallelism. This patch set is a first step to remove
>> rtnl lock dependency from TC rules update path. It updates act API to
>> use atomic operations, rcu and spinlocks for fine-grained locking. It
>> also extend API with functions that are needed to update existing
>> actions for parallel execution.
>> 
>> Outline of changes:
>> - Change tc action to use atomic reference and bind counters, rcu
>>mechanism for cookie update.
>> - Extend action ops API with 'delete' function and 'unlocked' flag.
>> - Change action API to work with actions in lockless manner based on
>>primitives implemented in previous patches.
>> - Extend action API with new functions necessary to implement unlocked
>>actions.
>
> Please run all the tdc tests with these changes. This area has almost
> good test coverage at this point. If you need help just ping me.
>
> cheers,
> jamal


Hello Jamal,

I'm trying to run tdc, but keep getting following error even on clean
branch without my patches:

Test d190: Add police action with maximum index

-> teardown stage *** Could not execute: "$TC actions flush action mirred"

-> teardown stage *** Error message: "RTNETLINK answers: Invalid argument
We have an error flushing
"

-> teardown stage *** Aborting test run.


<_io.BufferedReader name=3> *** stdout ***


<_io.BufferedReader name=5> *** stderr ***
"-> teardown stage" did not complete successfully
Exception  ('teardown', 'RTNETLINK answers: 
Invalid argument\nWe have an error talking to the kernel\nCommand "action" is 
unknown, try "tc actions help".\n', '"-> teardown stage" did not complete 
suc
cessfully') (caught in test_runner, running test 54 d190 Add police action with 
maximum index stage teardown)
---
traceback
  File "./tdc.py", line 293, in test_runner
tap += run_one_test(pm, args, index, tidx)
  File "./tdc.py", line 229, in run_one_test
prepare_env(args, pm, 'teardown', '-> teardown stage', 
tidx['teardown'], procout)
  File "./tdc.py", line 177, in prepare_env
'"{}" did not complete successfully'.format(prefix))
---
accumulated output for this test:
RTNETLINK answers: Invalid argument
We have an error talking to the kernel
Command "action" is unknown, try "tc actions help".

---


I've updated both iproute2 and kernel to latest master and net-next
respectively, but error persists. Am I missing something? Maybe I should
you some specific "blessed" version of TC?

Thanks,
Vlad


Re: [PATCH 00/14] Modify action API for implementing lockless actions

2018-05-14 Thread Jamal Hadi Salim

On 14/05/18 10:27 AM, Vlad Buslov wrote:

Currently, all netlink protocol handlers for updating rules, actions and
qdiscs are protected with single global rtnl lock which removes any
possibility for parallelism. This patch set is a first step to remove
rtnl lock dependency from TC rules update path. It updates act API to
use atomic operations, rcu and spinlocks for fine-grained locking. It
also extend API with functions that are needed to update existing
actions for parallel execution.

Outline of changes:
- Change tc action to use atomic reference and bind counters, rcu
   mechanism for cookie update.
- Extend action ops API with 'delete' function and 'unlocked' flag.
- Change action API to work with actions in lockless manner based on
   primitives implemented in previous patches.
- Extend action API with new functions necessary to implement unlocked
   actions.


Please run all the tdc tests with these changes. This area has almost
good test coverage at this point. If you need help just ping me.

cheers,
jamal