[PATCH iproute2 1/1] man page: add page for skbmod action

2017-02-10 Thread Lucas Bates
Signed-off-by: Lucas Bates <luc...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Roman Mashak <m...@mojatatu.com> --- man/man8/Makefile| 2 +- man/man8/tc-skbmod.8 | 137 +++ 2 files chang

[PATCH iproute2 1/1] Add new man page for tc actions.

2017-07-04 Thread Lucas Bates
This page is to highlight all operations and options that are applicable to all tc actions. Signed-off-by: Lucas Bates <luc...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- man/man8/tc-actions.8 | 221 ++ 1 file

[PATCH net-next 1/1] selftests: Introduce tc testsuite

2017-06-16 Thread Lucas Bates
welcome; see the creating-testcases subdirectory for help in creating them. Signed-off-by: Lucas Bates <luc...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- tools/testing/selftests/tc-testing/.gitignore |1 + tools/testing/selftests/tc-te

[PATCH net-next 0/1] Introduction of the tc tests

2017-06-16 Thread Lucas Bates
Apologies for sending this as one big patch. I've been sitting on this a little too long, but it's ready and I wanted to get it out. There are a limited number of tests to start - I plan to add more on a regular basis. Lucas Bates (1): selftests: Introduce tc testsuite tools/testing

Re: [patch net v2 3/4] selftests: Introduce a new script to generate tc batch file

2017-10-16 Thread Lucas Bates
hw > -s, --share_actionall filters share the same action > -p, --prioall filters have different prio > > Signed-off-by: Chris Mi <chr...@mellanox.com> > Acked-by: Jamal Hadi Salim <j...@mojatatu.com> Acked-by: Lucas Bates <luc..

Re: [patch net v2 4/4] selftests: Introduce a new test case to tc testsuite

2017-10-16 Thread Lucas Bates
un. Even the namespace creation I put in to the original version is too specific and limiting. There are some upcoming changes to tdc to help address these particular issues. I'll ack this for now, thanks. Acked-by: Lucas Bates <luc...@mojatatu.com> > --- > .../tc-testing/tc-tests/filters/te

[PATCH net-next v2 3/4] tc-testing: Add test cases for police and skbmod

2017-10-13 Thread Lucas Bates
Add basic unit tests for police and skbmod actions in tc. Signed-off-by: Lucas Bates <luc...@mojatatu.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> --- .../tc-testing/tc-tests/actions/police.json| 527 + .../tc-testing/tc-tests/actions/skbmod.json

[PATCH net-next v2 0/4] tc-testing: Test suite updates

2017-10-13 Thread Lucas Bates
argument v2: fix the lack of final newlines in two new files (thanks David) Lucas Bates (4): tc-testing: Add test cases for flushing actions tc-testing: Split test case files into smaller chunks tc-testing: Add test cases for police and skbmod tc-testing: fix the -l argument bug in tdc.py

[PATCH net-next v2 4/4] tc-testing: fix the -l argument bug in tdc.py

2017-10-13 Thread Lucas Bates
This patch fixes a bug in the tdc script, where executing tdc with the -l argument would cause the tests to start running as opposed to listing all the known test cases. Signed-off-by: Lucas Bates <luc...@mojatatu.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> --- tools/testing/

[PATCH net-next v2 2/4] tc-testing: Split test case files into smaller chunks

2017-10-13 Thread Lucas Bates
The original submission had the test cases stored in one monolithic file. This can be unwieldy to edit, especially as more test cases are added. This patch removes the original tests.json file in favour of individual ones broken down by category. Signed-off-by: Lucas Bates <luc...@mojatatu.

[PATCH net-next v2 1/4] tc-testing: Add test cases for flushing actions

2017-10-13 Thread Lucas Bates
Tests for flushing gact and mirred were missing. This patch adds test cases to explicitly test the flush of any installed gact/mirred actions. Signed-off-by: Lucas Bates <luc...@mojatatu.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> --- .../tc-testing/tc-tests/action

[PATCH net-next 3/4] tc-testing: Add test cases for police and skbmod

2017-10-11 Thread Lucas Bates
Add basic unit tests for police and skbmod actions in tc. Signed-off-by: Lucas Bates <luc...@mojatatu.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> --- .../tc-testing/tc-tests/actions/police.json| 527 + .../tc-testing/tc-tests/actions/skbmod.json

[PATCH net-next 0/4] tc-testing: Test suite updates

2017-10-11 Thread Lucas Bates
argument Lucas Bates (4): tc-testing: Add test cases for flushing actions tc-testing: Split test case files into smaller chunks tc-testing: Add test cases for police and skbmod tc-testing: fix the -l argument bug in tdc.py script .../tc-testing/tc-tests/actions/gact.json | 469

[PATCH net-next 1/4] tc-testing: Add test cases for flushing actions

2017-10-11 Thread Lucas Bates
Tests for flushing gact and mirred were missing. This patch adds test cases to explicitly test the flush of any installed gact/mirred actions. Signed-off-by: Lucas Bates <luc...@mojatatu.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> --- .../tc-testing/tc-tests/action

[PATCH net-next 2/4] tc-testing: Split test case files into smaller chunks

2017-10-11 Thread Lucas Bates
The original submission had the test cases stored in one monolithic file. This can be unwieldy to edit, especially as more test cases are added. This patch removes the original tests.json file in favour of individual ones broken down by category. Signed-off-by: Lucas Bates <luc...@mojatatu.

[PATCH net-next 4/4] tc-testing: fix the -l argument bug in tdc.py script

2017-10-11 Thread Lucas Bates
This patch fixes a bug in the tdc script, where executing tdc with the -l argument would cause the tests to start running as opposed to listing all the known test cases. Signed-off-by: Lucas Bates <luc...@mojatatu.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> --- tools/testing/

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-11-01 Thread Lucas Bates
On Tue, Oct 31, 2017 at 7:02 PM, Cong Wang wrote: > On Tue, Oct 31, 2017 at 3:09 PM, Cong Wang wrote: >> >> This almost rules out the guilty of this patchset. >> >> I will provide a patch for you to test, since I can't reproduce it here. >> > >

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-30 Thread Lucas Bates
e.On Thu, Oct 26, 2017 at 9:24 PM, Cong Wang wrote: > Recently, the RCU callbacks used in TC filters and TC actions keep > drawing my attention, they introduce at least 4 race condition bugs: > As suggested by Paul, we could defer the work to a workqueue and > gain the

Re: [PATCH net-next] tc-testing: very simple example test cases

2017-10-31 Thread Lucas Bates
f simple test, no need for verify > ok 3 3f simple test, no need for setup or teardown (or verify) > > $ > > Signed-off-by: Brenda J. Butler <b...@mojatatu.com> Acked-by: Lucas Bates <luc...@mojatatu.com>

Re: [PATCH net-next] tc-testing: "show" action shows all selected tests

2017-10-31 Thread Lucas Bates
; arguments. > > It is still possible to output a single test, by using the -e > option, but now more than one test can be displayed with > one command. > > Signed-off-by: Brenda J. Butler <b...@mojatatu.com> Acked-by: Lucas Bates <luc...@mojatatu.com>

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-31 Thread Lucas Bates
On Tue, Oct 31, 2017 at 7:00 AM, Jamal Hadi Salim wrote: > On 17-10-31 01:44 AM, Cong Wang wrote: >> >> Can you try this patch? From your stack trace it is not clear where >> the cause is, but we know that the crash is in __tcf_idr_release(), >> this is how I came up with the

Re: [PATCH net-next] tc-testing: correction to docstring in get_unique_item

2017-10-31 Thread Lucas Bates
egorized_testlist(alltests, ucat): > > > def get_unique_item(lst): > -""" For a list, return a set of the unique items in the list. """ > +""" For a list, return a list of the unique items in the list. """ > return list(set(lst)) > > > -- > 2.15.0.rc0 > Acked-by: Lucas Bates <luc...@mojatatu.com>

Re: [PATCH net-next] tc-testing: split config file

2017-10-31 Thread Lucas Bates
gned-off-by: Brenda J. Butler <b...@mojatatu.com> Acked-by: Lucas Bates <luc...@mojatatu.com>

Re: [PATCH net-next] tc-testing: better check if thing is list

2017-10-31 Thread Lucas Bates
lements list, instead of being an actual list. In that > case, this code will not have to change. > > Signed-off-by: Brenda J. Butler <b...@mojatatu.com> Acked-by: Lucas Bates <luc...@mojatatu.com>

Re: [PATCH net-next] tc-testing: gitignore, ignore standard python artifacts

2017-10-31 Thread Lucas Bates
On Tue, Oct 31, 2017 at 2:26 PM, Brenda J. Butler <b...@mojatatu.com> wrote: > Ignore .pyc files, "python compiled" files, that get created > when a python script is run. They should never be committed. > > Signed-off-by: Brenda J. Butler <b...@mojatatu.

Re: [PATCH net-next] tc-testing: better test case file error reporting

2017-10-31 Thread Lucas Bates
and > line number, then that file will be ignored and the rest of the tests > will be processed. > > Signed-off-by: Brenda J. Butler <b...@mojatatu.com> With great pleasure: Acked-by: Lucas Bates <luc...@mojatatu.com>

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-31 Thread Lucas Bates
On Tue, Oct 31, 2017 at 2:55 PM, Lucas Bates <luc...@mojatatu.com> wrote: > On Tue, Oct 31, 2017 at 7:00 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: >> On 17-10-31 01:44 AM, Cong Wang wrote: >>> >>> Can you try this patch? From your stack trace it is n

Re: [Patch net 00/16] net_sched: fix races with RCU callbacks

2017-10-30 Thread Lucas Bates
On Mon, Oct 30, 2017 at 7:12 PM, Cong Wang <xiyou.wangc...@gmail.com> wrote: > On Mon, Oct 30, 2017 at 3:39 PM, Lucas Bates <luc...@mojatatu.com> wrote: >> e.On Thu, Oct 26, 2017 at 9:24 PM, Cong Wang <xiyou.wangc...@gmail.com> >> wrote: >>> Recently, t

Re: [PATCH net-next] tc-testing: correction to docstring in get_unique_item

2017-10-30 Thread Lucas Bates
; > Signed-off-by: Brenda J. Butler <b...@mojatatu.com> Acked-by: Lucas Bates <luc...@mojatatu.com>

Re: [PATCH net] tc-testing: fix tdc tests for 'bpf' action

2018-05-09 Thread Lucas Bates
t;: "$TC action get action bpf index 667", > -"matchPattern": "action order [0-9]*: bpf _b.o:\\[action\\] id > [0-9].*index 667 ref", > +"matchPattern": "action order [0-9]*: bpf _c.o:\\[action\\] id > [0-9].*index 667 ref", > "matchCount": "0", > "teardown": [ > -"$TC action flush action bpf", > +[ > +"$TC action flush action bpf", > +0, > +1, > +255 > +], > "rm -f _c.o" > ] > }, > -- > 2.14.3 > Acked-by: Lucas Bates <luc...@mojatatu.com>

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

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 <luc...@mojatatu.com> wrote: > On Tue, May 15, 2018 at 5:49 PM, Jamal Hadi Salim <j...@mojatatu.com> wrote: >>> Test 7d50: Add skbmod action to set destination mac >>> exit: 255 0 >>> dst MAC address

Re: [PATCH net-next 1/1] tc-testing: initial version of tunnel_key unit tests

2018-06-27 Thread Lucas Bates
On Tue, Jun 26, 2018 at 10:51 AM, Davide Caratti wrote: > On Tue, 2018-06-26 at 09:17 -0400, Keara Leibovitz wrote: >> Create unittests for the tc tunnel_key action. >> >> >> Signed-off-by: Keara Leibovitz >> --- >> .../tc-testing/tc-tests/actions/tunnel_key.json| 676 >>

Re: [PATCH net-next 3/7] tools: tc-testing: Introduce plugin architecture

2018-02-14 Thread Lucas Bates
nd run tdc.py. It will notice the plugins and use them. > > Signed-off-by: Brenda J. Butler <b...@mojatatu.com> Acked-by: Lucas Bates <luc...@mojatatu.com> > --- > tools/testing/selftests/tc-testing/TdcPlugin.py| 74 +++ > .../tc-testing/creating-plugins/AddingPl

Re: [PATCH net-next 4/7] tools: tc-testing: rootPlugin

2018-02-14 Thread Lucas Bates
On Wed, Feb 14, 2018 at 2:09 PM, Brenda J. Butler <b...@mojatatu.com> wrote: > Move the functionality that checks for root permissions into a plugin. > > Signed-off-by: Brenda J. Butler <b...@mojatatu.com> Acked-by: Lucas Bates <luc...@mojatatu.com> > --- > ..

Re: [PATCH net-next 2/7] tools: tc-testing: Refactor test-runner

2018-02-14 Thread Lucas Bates
p going (and flush a bunch > of tap results for the skipped tests). > > Signed-off-by: Brenda J. Butler <b...@mojatatu.com> Acked-by: Lucas Bates <luc...@mojatatu.com> > --- > tools/testing/selftests/tc-testing/tdc.py | 81 > --- &

Re: [PATCH net-next 1/7] tools: tc-testing: Command line parms

2018-02-14 Thread Lucas Bates
s another > selection mechanism. We can accumulate a number of tests by directory, > file, category, or even by test id, instead of being constrained to > run all tests in one collection or just one test. > > Signed-off-by: Brenda J. Butler <b...@mojatatu.com> Acked-by: Lucas Bates

Re: [PATCH net-next 7/7] tools: tc-testing: Update README and TODO

2018-02-14 Thread Lucas Bates
On Wed, Feb 14, 2018 at 2:09 PM, Brenda J. Butler <b...@mojatatu.com> wrote: > Signed-off-by: Brenda J. Butler <b...@mojatatu.com> Acked-by: Lucas Bates <luc...@mojatatu.com> > --- > tools/testing/selftests/tc-testing/README | 173 > +---

Re: [PATCH net-next 6/7] tools: tc-testing: valgrindPlugin

2018-02-14 Thread Lucas Bates
On Wed, Feb 14, 2018 at 2:09 PM, Brenda J. Butler <b...@mojatatu.com> wrote: > Run the command under test under valgrind. Produce an extra set of > tap output for the memory check on each test. > > Signed-off-by: Brenda J. Butler <b...@mojatatu.com> Acked-by: Lucas Ba

Re: [PATCH net-next 5/7] tools: tc-testing: nsPlugin

2018-02-14 Thread Lucas Bates
On Wed, Feb 14, 2018 at 2:09 PM, Brenda J. Butler <b...@mojatatu.com> wrote: > Move the functionality of creating a namespace before the test suite > and destroying it afterwards to a plugin. > > Signed-off-by: Brenda J. Butler <b...@mojatatu.com> Acked-by: Lucas Ba

Re: [PATCH net-next] tc-testing: add geneve options in tunnel_key unit tests

2018-07-11 Thread Lucas Bates
> > Signed-off-by: Pieter Jansen van Vuuren Acked-by: Lucas Bates

Kernel bug from adding bpf actions in tc

2018-04-05 Thread Lucas Bates
Hi Davide, Our overnight tc test runs of net-next revealed a kernel bug on one of the BPF tests you submitted, d959. The add action completes successfully, but the bug occurs on the verify when tdc does a get of the action that was just added. Here's the text of the dump: [ 61.973632] BUG:

Re: [PATCH net] net/sched: fix NULL dereference in the error path of tcf_bpf_init()

2018-04-06 Thread Lucas Bates
a5 > 8b 61 00 0f 1f 44 00 00 0f 1f 44 00 00 41 54 55 48 89 fd 53 <48> 8b 47 20 f0 > ff 08 74 05 5b 5d 41 5c c3 41 89 f4 0f 1f 44 00 > RIP: __bpf_prog_put+0xc/0xc0 RSP: 9594003ef728 > CR2: 0020 > > Fix it in tcf_bpf_cfg_cleanup(), ensuring that bpf_prog_{put,destroy}

[PATCH net-next] tc-testing: Add newline when writing test case files

2018-03-29 Thread Lucas Bates
When using the -i feature to generate random ID numbers for test cases in tdc, the function that writes the JSON to file doesn't add a newline character to the end of the file, so we have to add our own. Signed-off-by: Lucas Bates <luc...@mojatatu.com> --- tools/testing/selftests/tc-t

[PATCH net-next 1/1] tc-testing: Correct compound statements for namespace execution

2018-03-26 Thread Lucas Bates
execution. Enclosing these compound statements inside a bash invocation with proper escape characters resolves the problem by creating a subshell inside the namespace. Signed-off-by: Lucas Bates <luc...@mojatatu.com> --- tools/testing/selftests/tc-testing/tc-tests/actions/gact.json | 1

Re: [PATCH net-next 1/1] tc-testing: Correct compound statements for namespace execution

2018-03-22 Thread Lucas Bates
On Thu, Mar 22, 2018 at 2:48 PM, David Miller <da...@davemloft.net> wrote: > From: Lucas Bates <luc...@mojatatu.com> > Date: Wed, 21 Mar 2018 11:49:40 -0400 > >> } >> -] >> \ No newline at end of file >> +] >> -- >> 2.7.4 > >

[PATCH net-next 1/1] tc-testing: Correct compound statements for namespace execution

2018-03-21 Thread Lucas Bates
execution. Enclosing these compound statements inside a bash invocation with proper escape characters resolves the problem by creating a subshell inside the namespace. Signed-off-by: Lucas Bates <luc...@mojatatu.com> --- tools/testing/selftests/tc-testing/tc-tests/actions/gact.json | 1

Re: Some suggestions for tc-tests

2018-10-22 Thread Lucas Bates
Hi Cong, > > 1. Create veth pair devices by its own. The most important thing for > tc-tests is to automate everything, it is not friendly for users to > create their own veth pair named v0p0 to just run the tests. tc-tests > should be able to create a veth pair with random names and clean up >

[PATCH net 1/2] tc-testing: tdc.py: ignore errors when decoding stdout/stderr

2018-11-16 Thread Lucas Bates
Prevent exceptions from being raised while decoding output from an executed command. There is no impact on tdc's execution and the verify command phase would fail the pattern match. Signed-off-by: Lucas Bates --- tools/testing/selftests/tc-testing/tdc.py | 4 ++-- 1 file changed, 2 insertions

[PATCH net 0/2] Prevent uncaught exceptions in tdc

2018-11-16 Thread Lucas Bates
in executed command Lucas Bates (1): tc-testing: tdc.py: ignore errors when decoding stdout/stderr tools/testing/selftests/tc-testing/tdc.py | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) -- 2.7.4

[PATCH net 2/2] tc-testing: tdc.py: Guard against lack of returncode in executed command

2018-11-16 Thread Lucas Bates
From: "Brenda J. Butler" Add some defensive coding in case one of the subprocesses created by tdc returns nothing. If no object is returned from exec_cmd, then tdc will halt with an unhandled exception. Signed-off-by: Brenda J. Butler Signed-off-by: Lucas Bates --- tools/testing/se

[PATCH net-next 4/4] tc-testing: gitignore, ignore generated test results

2018-12-06 Thread Lucas Bates
Ignore any .tap or .xml test result files generated by tdc. Additionally, ignore plugin symlinks. Signed-off-by: Lucas Bates --- tools/testing/selftests/tc-testing/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/tc-testing/.gitignore b/tools/testing

[PATCH net-next 2/4] tc-testing: Add new TdcResults module

2018-12-06 Thread Lucas Bates
This module includes new classes for tdc to use in keeping track of test case results, instead of generating and tracking a lengthy string. The new module can be extended to support multiple formal test result formats to be friendlier to automation. Signed-off-by: Lucas Bates --- tools/testing

[PATCH net-next 0/4] tc-testing: implement command timeouts and better results tracking

2018-12-06 Thread Lucas Bates
Patch 1 adds a timeout feature for any command tdc launches in a subshell. This prevents tdc from hanging indefinitely. Patches 2-4 introduce a new method for tracking and generating test case results, and implements it across the core script and all applicable plugins. Lucas Bates (4): tc

[PATCH net-next 1/4] tc-testing: Add command timeout feature to tdc

2018-12-06 Thread Lucas Bates
Using an attribute set in the tdc_config.py file, limit the amount of time tdc will wait for an executed command to complete and prevent the script from hanging entirely. This timeout will be applied to all executed commands. Signed-off-by: Lucas Bates --- tools/testing/selftests/tc-testing

[PATCH net-next 3/4] tc-testing: Implement the TdcResults module in tdc

2018-12-06 Thread Lucas Bates
In tdc and the valgrind plugin, begin using the TdcResults module to track executed test cases. Signed-off-by: Lucas Bates --- tools/testing/selftests/tc-testing/TdcPlugin.py| 3 +- .../tc-testing/plugin-lib/valgrindPlugin.py| 22 +++- tools/testing/selftests/tc-testing/tdc.py