All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC net-next 1/1] tdc.py: Introduce required plugins
@ 2019-04-09 21:44 Lucas Bates
  2019-04-10 14:33 ` Nicolas Dichtel
  0 siblings, 1 reply; 9+ messages in thread
From: Lucas Bates @ 2019-04-09 21:44 UTC (permalink / raw)
  To: netdev
  Cc: davem, jhs, xiyou.wangcong, jiri, mleitner, vladbu, dcaratti,
	nicolas.dichtel, kernel, Lucas Bates

Some of the testcases (for example, all of the fw tests) in tdc
require activating the nsplugin. This RFC introduces a feature which
tags one such test with the keyword "requires". Anyone running a test
that requires nsplugin will now get a warning if they are missing
the plugin.

After compiling the list of test cases to execute, tdc will
gather all of the required plugins for that run, and validate
that they have been enabled with a symlink in the plugins/
directory. If required plugins are missing, tdc will create the
symlink for the user and then terminate. (This is because plugin-
specific options may exist and need to be parsed at startup)

Please provide feedback.  If this is amenable to all, I will proceed
to submit for the rest.

Signed-off-by: Lucas Bates <lucasb@mojatatu.com>
---
 tools/testing/selftests/tc-testing/README          | 28 ++++++++++-----
 .../selftests/tc-testing/tc-tests/filters/fw.json  |  1 +
 tools/testing/selftests/tc-testing/tdc.py          | 41 ++++++++++++++++++++++
 3 files changed, 62 insertions(+), 8 deletions(-)

diff --git a/tools/testing/selftests/tc-testing/README b/tools/testing/selftests/tc-testing/README
index f9281e8..b91ce8b 100644
--- a/tools/testing/selftests/tc-testing/README
+++ b/tools/testing/selftests/tc-testing/README
@@ -36,14 +36,20 @@ REQUIREMENTS
 BEFORE YOU RUN
 --------------

-The path to the tc executable that will be most commonly tested can be defined
-in the tdc_config.py file. Find the 'TC' entry in the NAMES dictionary and
-define the path.

-If you need to test a different tc executable on the fly, you can do so by
-using the -p option when running tdc:
+*  The path to the tc executable that will be most commonly tested can be
+   defined in the tdc_config.py file. Find the 'TC' entry in the NAMES
+   dictionary and define the path.
+
+   If you need to test a different tc executable on the fly, you can do so by
+   using the -p option when running tdc:
 	./tdc.py -p /path/to/tc

+*  Tests may be executed in a network namespace with a port that is created
+   automatically. To use this feature, create a symlink in the plugins/
+   directory to plugin-lib/nsPlugin.py and use the '-n' option when
+   executing tdc. If this is not done, you MUST have a port with the same
+   name as the value of DEV1 in tdc_config.py before running tdc.

 RUNNING TDC
 -----------
@@ -53,9 +59,6 @@ commands being tested must be run as root.  The code that enforces
 execution by root uid has been moved into a plugin (see PLUGIN
 ARCHITECTURE, below).

-If nsPlugin is linked, all tests are executed inside a network
-namespace to prevent conflicts within the host.
-
 Running tdc without any arguments will run all tests. Refer to the section
 on command line arguments for more information, or run:
 	./tdc.py -h
@@ -235,6 +238,15 @@ directory:
   - buildebpfPlugin.py:
       builds all programs in $EBPFDIR.

+If a plugin is required for a test case to succeed, it can be defined in
+the test case definition as follows:
+	"requires": ["nsPlugin", "fooPlugin"]
+
+This will cause tdc to verify that these plugins are present before
+starting test execution. If they aren't, the symlinks will be created
+for you and tdc will terminate to be restarted. This is done as some
+plugins may have command line options that are needed for a successful run.
+

 ACKNOWLEDGEMENTS
 ----------------
diff --git a/tools/testing/selftests/tc-testing/tc-tests/filters/fw.json b/tools/testing/selftests/tc-testing/tc-tests/filters/fw.json
index 3b97cfd..dfba083 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/filters/fw.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/filters/fw.json
@@ -6,6 +6,7 @@
             "filter",
             "fw"
         ],
+	"requires": ["nsPlugin"],
         "setup": [
             "$TC qdisc add dev $DEV1 ingress"
         ],
diff --git a/tools/testing/selftests/tc-testing/tdc.py b/tools/testing/selftests/tc-testing/tdc.py
index 5cee156..aa9a804 100755
--- a/tools/testing/selftests/tc-testing/tdc.py
+++ b/tools/testing/selftests/tc-testing/tdc.py
@@ -550,6 +550,46 @@ def filter_tests_by_category(args, testlist):

     return answer

+def check_required_plugins(pm, testlist):
+    '''
+    Get all required plugins from the list of test cases and ensure
+    they're enabled.
+    '''
+    reqs = []
+    pnf = False
+    plinked = False
+    for t in testlist:
+        try:
+            reqs.extend(t['requires'])
+        except KeyError:
+            continue
+    reqs = get_unique_item(reqs)
+
+    for r in reqs:
+        if r not in pm.plugins:
+            import glob
+            fname = '{}.py'.format(r)
+            source_path = []
+            source_path.extend(glob.glob('plugin-lib/{}'.format(fname)))
+            source_path.extend(glob.glob('plugin-lib-custom/{}'.format(fname)))
+            if len(source_path) == 0:
+                print('ERROR: unable to find required plugin {}'.format(r))
+                pnf = True
+                continue
+            elif len(source_path) > 1:
+                print('WARNING: multiple copies of plugin {} found, using version found')
+                print('at {}'.format(source_path[0]))
+            os.symlink('../{}'.format(source_path[0]), 'plugins/{}'.format(fname))
+            os.chown('plugins/{}'.format(fname), uid=int(os.getenv('SUDO_UID')),
+                        gid=int(os.getenv('SUDO_GID')))
+            plinked = True
+    if pnf:
+        print('Plugins that are required could not be found. Please refer to the README.')
+    if plinked:
+        print('Required plugins have been linked in. Please re-run tdc to enable their options.')
+    if pnf or plinked:
+        exit(1)
+
 def get_test_cases(args):
     """
     If a test case file is specified, retrieve tests from that file.
@@ -649,6 +689,7 @@ def set_operation_mode(pm, args):
             exit(0)

     if len(alltests):
+        check_required_plugins(pm, alltests)
         catresults = test_runner(pm, args, alltests)
         if args.format == 'none':
             print('Test results output suppression requested\n')
--
2.7.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [RFC net-next 1/1] tdc.py: Introduce required plugins
  2019-04-09 21:44 [RFC net-next 1/1] tdc.py: Introduce required plugins Lucas Bates
@ 2019-04-10 14:33 ` Nicolas Dichtel
  2019-04-11 20:54   ` Lucas Bates
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Dichtel @ 2019-04-10 14:33 UTC (permalink / raw)
  To: Lucas Bates, netdev
  Cc: davem, jhs, xiyou.wangcong, jiri, mleitner, vladbu, dcaratti, kernel

Le 09/04/2019 à 23:44, Lucas Bates a écrit :
> Some of the testcases (for example, all of the fw tests) in tdc
> require activating the nsplugin. This RFC introduces a feature which
> tags one such test with the keyword "requires". Anyone running a test
> that requires nsplugin will now get a warning if they are missing
> the plugin.
> 
> After compiling the list of test cases to execute, tdc will
> gather all of the required plugins for that run, and validate
> that they have been enabled with a symlink in the plugins/
> directory. If required plugins are missing, tdc will create the
> symlink for the user and then terminate. (This is because plugin-
> specific options may exist and need to be parsed at startup)
I still don't understand the goal of this plugin. Why not simply include it in
the core code (like it was some times ago)?

> 
> Please provide feedback.  If this is amenable to all, I will proceed
> to submit for the rest.
After your patch, I got the following error:
$ ./tdc.py
Traceback (most recent call last):
  File "./tdc.py", line 740, in <module>
    main()
  File "./tdc.py", line 734, in main
    set_operation_mode(pm, args)
  File "./tdc.py", line 692, in set_operation_mode
    check_required_plugins(pm, alltests)
  File "./tdc.py", line 583, in check_required_plugins
    os.chown('plugins/{}'.format(fname), uid=int(os.getenv('SUDO_UID')),
TypeError: int() argument must be a string or a number, not 'NoneType'


Regards,
Nicolas

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC net-next 1/1] tdc.py: Introduce required plugins
  2019-04-10 14:33 ` Nicolas Dichtel
@ 2019-04-11 20:54   ` Lucas Bates
  2019-04-12  8:31     ` Nicolas Dichtel
  0 siblings, 1 reply; 9+ messages in thread
From: Lucas Bates @ 2019-04-11 20:54 UTC (permalink / raw)
  To: Nicolas Dichtel
  Cc: Linux Kernel Network Developers, David Miller, Jamal Hadi Salim,
	Cong Wang, Jiri Pirko, Marcelo Ricardo Leitner, Vlad Buslov,
	Davide Caratti, kernel

On Wed, Apr 10, 2019 at 10:33 AM Nicolas Dichtel
<nicolas.dichtel@6wind.com> wrote:
>
> Le 09/04/2019 à 23:44, Lucas Bates a écrit :
> > Some of the testcases (for example, all of the fw tests) in tdc
> > require activating the nsplugin. This RFC introduces a feature which
> > tags one such test with the keyword "requires". Anyone running a test
> > that requires nsplugin will now get a warning if they are missing
> > the plugin.
> >
> > After compiling the list of test cases to execute, tdc will
> > gather all of the required plugins for that run, and validate
> > that they have been enabled with a symlink in the plugins/
> > directory. If required plugins are missing, tdc will create the
> > symlink for the user and then terminate. (This is because plugin-
> > specific options may exist and need to be parsed at startup)
> I still don't understand the goal of this plugin. Why not simply include it in
> the core code (like it was some times ago)?

Because the use of namespaces and the veth pair are specific to some
test cases. We're also making it possible to create complex test cases
which will require more than one namespace.  The starting point was to
isolate the namespace into its own plugin.  We had a discussion today
in our tri-weekly tc test meeting and the general consensus to address
what you brought up is leaning towards the following:

- adding a symlink to nsPlugin
- Changing default behaviour so that unless an option is explicitly
specified, all the tests will be run under a namespace with automatic
creation of the ports
- If the user chooses /not/ to use namespaces, it will still create
the veth pair to use.

I'll send the patch tomorrow as another RFC.

What do you think of this?

> > Please provide feedback.  If this is amenable to all, I will proceed
> > to submit for the rest.
> After your patch, I got the following error:
> $ ./tdc.py
> Traceback (most recent call last):
>   File "./tdc.py", line 740, in <module>
>     main()
>   File "./tdc.py", line 734, in main
>     set_operation_mode(pm, args)
>   File "./tdc.py", line 692, in set_operation_mode
>     check_required_plugins(pm, alltests)
>   File "./tdc.py", line 583, in check_required_plugins
>     os.chown('plugins/{}'.format(fname), uid=int(os.getenv('SUDO_UID')),
> TypeError: int() argument must be a string or a number, not 'NoneType'

That would be expected if you aren't running tdc with sudo or as root
or as a user with network admin capability.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC net-next 1/1] tdc.py: Introduce required plugins
  2019-04-11 20:54   ` Lucas Bates
@ 2019-04-12  8:31     ` Nicolas Dichtel
  2019-04-12 15:21       ` Lucas Bates
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Dichtel @ 2019-04-12  8:31 UTC (permalink / raw)
  To: Lucas Bates
  Cc: Linux Kernel Network Developers, David Miller, Jamal Hadi Salim,
	Cong Wang, Jiri Pirko, Marcelo Ricardo Leitner, Vlad Buslov,
	Davide Caratti, kernel

Le 11/04/2019 à 22:54, Lucas Bates a écrit :
> On Wed, Apr 10, 2019 at 10:33 AM Nicolas Dichtel
> <nicolas.dichtel@6wind.com> wrote:
>>
>> Le 09/04/2019 à 23:44, Lucas Bates a écrit :
>>> Some of the testcases (for example, all of the fw tests) in tdc
>>> require activating the nsplugin. This RFC introduces a feature which
>>> tags one such test with the keyword "requires". Anyone running a test
>>> that requires nsplugin will now get a warning if they are missing
>>> the plugin.
>>>
>>> After compiling the list of test cases to execute, tdc will
>>> gather all of the required plugins for that run, and validate
>>> that they have been enabled with a symlink in the plugins/
>>> directory. If required plugins are missing, tdc will create the
>>> symlink for the user and then terminate. (This is because plugin-
>>> specific options may exist and need to be parsed at startup)
>> I still don't understand the goal of this plugin. Why not simply include it in
>> the core code (like it was some times ago)?
> 
> Because the use of namespaces and the veth pair are specific to some
> test cases. We're also making it possible to create complex test cases
> which will require more than one namespace.  The starting point was to
> isolate the namespace into its own plugin.  We had a discussion today
Isolating a part of the code in a plugin is not the problem. The problem is that
this code is not available by default.

> in our tri-weekly tc test meeting and the general consensus to address
> what you brought up is leaning towards the following:
> 
> - adding a symlink to nsPlugin
I don't understand why a symlink is needed. Just load it by default and use it
when needed. A property can be added to each test to tell which plugin (in fact,
which topology) is needed to run it.
Thus, if a new complex test is added, it can define another topology.

> - Changing default behaviour so that unless an option is explicitly
> specified, all the tests will be run under a namespace with automatic
> creation of the ports
Yes.

> - If the user chooses /not/ to use namespaces, it will still create
> the veth pair to use.
In fact, I would say an option so that the user can choose another topology.

> 
> I'll send the patch tomorrow as another RFC.
> 
> What do you think of this?
> 
>>> Please provide feedback.  If this is amenable to all, I will proceed
>>> to submit for the rest.
>> After your patch, I got the following error:
>> $ ./tdc.py
>> Traceback (most recent call last):
>>   File "./tdc.py", line 740, in <module>
>>     main()
>>   File "./tdc.py", line 734, in main
>>     set_operation_mode(pm, args)
>>   File "./tdc.py", line 692, in set_operation_mode
>>     check_required_plugins(pm, alltests)
>>   File "./tdc.py", line 583, in check_required_plugins
>>     os.chown('plugins/{}'.format(fname), uid=int(os.getenv('SUDO_UID')),
>> TypeError: int() argument must be a string or a number, not 'NoneType'
> 
> That would be expected if you aren't running tdc with sudo or as root
> or as a user with network admin capability.
I was root for the test.


Regards,
Nicolas

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC net-next 1/1] tdc.py: Introduce required plugins
  2019-04-12  8:31     ` Nicolas Dichtel
@ 2019-04-12 15:21       ` Lucas Bates
  2019-04-12 15:42         ` Nicolas Dichtel
  0 siblings, 1 reply; 9+ messages in thread
From: Lucas Bates @ 2019-04-12 15:21 UTC (permalink / raw)
  To: Nicolas Dichtel
  Cc: Linux Kernel Network Developers, David Miller, Jamal Hadi Salim,
	Cong Wang, Jiri Pirko, Marcelo Ricardo Leitner, Vlad Buslov,
	Davide Caratti, kernel

On Fri, Apr 12, 2019 at 4:31 AM Nicolas Dichtel
<nicolas.dichtel@6wind.com> wrote:
> > in our tri-weekly tc test meeting and the general consensus to address
> > what you brought up is leaning towards the following:
> >
> > - adding a symlink to nsPlugin
> I don't understand why a symlink is needed. Just load it by default and use it
> when needed. A property can be added to each test to tell which plugin (in fact,
> which topology) is needed to run it.
> Thus, if a new complex test is added, it can define another topology.

I'm loathe to hard-code it into the script, but we can avoid the
symlink if we specify some default plugins to load in the
tdc_config.py file.

> > - Changing default behaviour so that unless an option is explicitly
> > specified, all the tests will be run under a namespace with automatic
> > creation of the ports
> Yes.
>
> > - If the user chooses /not/ to use namespaces, it will still create
> > the veth pair to use.
> In fact, I would say an option so that the user can choose another topology.

Quite possibly, but for traffic generation (upcoming using scapy)
we're just reusing the simple topology right now.

> >> After your patch, I got the following error:
> >> $ ./tdc.py
> >> Traceback (most recent call last):
> >>   File "./tdc.py", line 740, in <module>
> >>     main()
> >>   File "./tdc.py", line 734, in main
> >>     set_operation_mode(pm, args)
> >>   File "./tdc.py", line 692, in set_operation_mode
> >>     check_required_plugins(pm, alltests)
> >>   File "./tdc.py", line 583, in check_required_plugins
> >>     os.chown('plugins/{}'.format(fname), uid=int(os.getenv('SUDO_UID')),
> >> TypeError: int() argument must be a string or a number, not 'NoneType'
> >
> > That would be expected if you aren't running tdc with sudo or as root
> > or as a user with network admin capability.
> I was root for the test.

Ah. That environment variable is probably not present on your system.
Out of curiosity, what shell/distribution are you using?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC net-next 1/1] tdc.py: Introduce required plugins
  2019-04-12 15:21       ` Lucas Bates
@ 2019-04-12 15:42         ` Nicolas Dichtel
  2019-04-12 16:07           ` Lucas Bates
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Dichtel @ 2019-04-12 15:42 UTC (permalink / raw)
  To: Lucas Bates
  Cc: Linux Kernel Network Developers, David Miller, Jamal Hadi Salim,
	Cong Wang, Jiri Pirko, Marcelo Ricardo Leitner, Vlad Buslov,
	Davide Caratti, kernel

Le 12/04/2019 à 17:21, Lucas Bates a écrit :
> On Fri, Apr 12, 2019 at 4:31 AM Nicolas Dichtel
> <nicolas.dichtel@6wind.com> wrote:
>>> in our tri-weekly tc test meeting and the general consensus to address
>>> what you brought up is leaning towards the following:
>>>
>>> - adding a symlink to nsPlugin
>> I don't understand why a symlink is needed. Just load it by default and use it
>> when needed. A property can be added to each test to tell which plugin (in fact,
>> which topology) is needed to run it.
>> Thus, if a new complex test is added, it can define another topology.
> 
> I'm loathe to hard-code it into the script, but we can avoid the
> symlink if we specify some default plugins to load in the
> tdc_config.py file.
Why is it a problem to specify the plugin in the test description? The fw tests
depend on a specific topology, thus it's better explicitly state that.

> 
>>> - Changing default behaviour so that unless an option is explicitly
>>> specified, all the tests will be run under a namespace with automatic
>>> creation of the ports
>> Yes.
>>
>>> - If the user chooses /not/ to use namespaces, it will still create
>>> the veth pair to use.
>> In fact, I would say an option so that the user can choose another topology.
> 
> Quite possibly, but for traffic generation (upcoming using scapy)
> we're just reusing the simple topology right now.
I was thinking you were arguing for this option. If nobody need it, let's just
remove it.

> 
>>>> After your patch, I got the following error:
>>>> $ ./tdc.py
>>>> Traceback (most recent call last):
>>>>   File "./tdc.py", line 740, in <module>
>>>>     main()
>>>>   File "./tdc.py", line 734, in main
>>>>     set_operation_mode(pm, args)
>>>>   File "./tdc.py", line 692, in set_operation_mode
>>>>     check_required_plugins(pm, alltests)
>>>>   File "./tdc.py", line 583, in check_required_plugins
>>>>     os.chown('plugins/{}'.format(fname), uid=int(os.getenv('SUDO_UID')),
>>>> TypeError: int() argument must be a string or a number, not 'NoneType'
>>>
>>> That would be expected if you aren't running tdc with sudo or as root
>>> or as a user with network admin capability.
>> I was root for the test.
> 
> Ah. That environment variable is probably not present on your system.
> Out of curiosity, what shell/distribution are you using?
> 
It was on a debian 8.11 / bash.


Regards,
Nicolas

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC net-next 1/1] tdc.py: Introduce required plugins
  2019-04-12 15:42         ` Nicolas Dichtel
@ 2019-04-12 16:07           ` Lucas Bates
  2019-04-12 23:37             ` Nicolas Dichtel
  0 siblings, 1 reply; 9+ messages in thread
From: Lucas Bates @ 2019-04-12 16:07 UTC (permalink / raw)
  To: Nicolas Dichtel
  Cc: Linux Kernel Network Developers, David Miller, Jamal Hadi Salim,
	Cong Wang, Jiri Pirko, Marcelo Ricardo Leitner, Vlad Buslov,
	Davide Caratti, kernel

On Fri, Apr 12, 2019 at 11:42 AM Nicolas Dichtel
<nicolas.dichtel@6wind.com> wrote:
>
> Le 12/04/2019 à 17:21, Lucas Bates a écrit :
> > On Fri, Apr 12, 2019 at 4:31 AM Nicolas Dichtel
> > <nicolas.dichtel@6wind.com> wrote:
> >>> in our tri-weekly tc test meeting and the general consensus to address
> >>> what you brought up is leaning towards the following:
> >>>
> >>> - adding a symlink to nsPlugin
> >> I don't understand why a symlink is needed. Just load it by default and use it
> >> when needed. A property can be added to each test to tell which plugin (in fact,
> >> which topology) is needed to run it.
> >> Thus, if a new complex test is added, it can define another topology.
> >
> > I'm loathe to hard-code it into the script, but we can avoid the
> > symlink if we specify some default plugins to load in the
> > tdc_config.py file.
> Why is it a problem to specify the plugin in the test description? The fw tests
> depend on a specific topology, thus it's better explicitly state that.

So something like this?  Note the usage of the keyword "requires",

    {
        "id": "901f",
        "name": "Add fw filter with prio at 32-bit maxixum",
        "category": [
            "filter",
            "fw"
        ],
        "requires": ["nsPlugin"],
        "setup": [
            "$TC qdisc add dev $DEV1 ingress"
        ],
        "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle
1 prio 65535 fw action ok",
        "expExitCode": "0",
        "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1
prio 65535 protocol all fw",
        "matchPattern": "pref 65535 fw.*handle 0x1.*gact action pass",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DEV1 ingress"
        ]
    },


> >
> >>> - Changing default behaviour so that unless an option is explicitly
> >>> specified, all the tests will be run under a namespace with automatic
> >>> creation of the ports
> >> Yes.
> >>
> >>> - If the user chooses /not/ to use namespaces, it will still create
> >>> the veth pair to use.
> >> In fact, I would say an option so that the user can choose another topology.
> >
> > Quite possibly, but for traffic generation (upcoming using scapy)
> > we're just reusing the simple topology right now.
> I was thinking you were arguing for this option. If nobody need it, let's just
> remove it.
>
> >
> >>>> After your patch, I got the following error:
> >>>> $ ./tdc.py
> >>>> Traceback (most recent call last):
> >>>>   File "./tdc.py", line 740, in <module>
> >>>>     main()
> >>>>   File "./tdc.py", line 734, in main
> >>>>     set_operation_mode(pm, args)
> >>>>   File "./tdc.py", line 692, in set_operation_mode
> >>>>     check_required_plugins(pm, alltests)
> >>>>   File "./tdc.py", line 583, in check_required_plugins
> >>>>     os.chown('plugins/{}'.format(fname), uid=int(os.getenv('SUDO_UID')),
> >>>> TypeError: int() argument must be a string or a number, not 'NoneType'
> >>>
> >>> That would be expected if you aren't running tdc with sudo or as root
> >>> or as a user with network admin capability.
> >> I was root for the test.
> >
> > Ah. That environment variable is probably not present on your system.
> > Out of curiosity, what shell/distribution are you using?
> >
> It was on a debian 8.11 / bash.
>

Thanks. I'll look into it later.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC net-next 1/1] tdc.py: Introduce required plugins
  2019-04-12 16:07           ` Lucas Bates
@ 2019-04-12 23:37             ` Nicolas Dichtel
  2019-04-16 15:19               ` Lucas Bates
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Dichtel @ 2019-04-12 23:37 UTC (permalink / raw)
  To: Lucas Bates
  Cc: Linux Kernel Network Developers, David Miller, Jamal Hadi Salim,
	Cong Wang, Jiri Pirko, Marcelo Ricardo Leitner, Vlad Buslov,
	Davide Caratti, kernel

Le 12/04/2019 à 18:07, Lucas Bates a écrit :
[snip]
> So something like this?  Note the usage of the keyword "requires",
> 
>     {
>         "id": "901f",
>         "name": "Add fw filter with prio at 32-bit maxixum",
>         "category": [
>             "filter",
>             "fw"
>         ],
>         "requires": ["nsPlugin"],
Yes.

>         "setup": [
>             "$TC qdisc add dev $DEV1 ingress"
>         ],
>         "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle
> 1 prio 65535 fw action ok",
>         "expExitCode": "0",
>         "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1
> prio 65535 protocol all fw",
>         "matchPattern": "pref 65535 fw.*handle 0x1.*gact action pass",
>         "matchCount": "1",
>         "teardown": [
>             "$TC qdisc del dev $DEV1 ingress"
>         ]
>     },


Regards,
Nicolas

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC net-next 1/1] tdc.py: Introduce required plugins
  2019-04-12 23:37             ` Nicolas Dichtel
@ 2019-04-16 15:19               ` Lucas Bates
  0 siblings, 0 replies; 9+ messages in thread
From: Lucas Bates @ 2019-04-16 15:19 UTC (permalink / raw)
  To: Nicolas Dichtel
  Cc: Linux Kernel Network Developers, David Miller, Jamal Hadi Salim,
	Cong Wang, Jiri Pirko, Marcelo Ricardo Leitner, Vlad Buslov,
	Davide Caratti, kernel

On Fri, Apr 12, 2019 at 7:37 PM Nicolas Dichtel
<nicolas.dichtel@6wind.com> wrote:
>
> Le 12/04/2019 à 18:07, Lucas Bates a écrit :
> [snip]
> > So something like this?  Note the usage of the keyword "requires",
> >
> >     {
> >         "id": "901f",
> >         "name": "Add fw filter with prio at 32-bit maxixum",
> >         "category": [
> >             "filter",
> >             "fw"
> >         ],
> >         "requires": ["nsPlugin"],
> Yes.

OK, thanks.  I'll work on getting that together and have a patch out
this week to resolve it.

I'm still open to feedback on this issue if anyone would like to weigh in.

Thanks,
Lucas

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-04-16 15:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-09 21:44 [RFC net-next 1/1] tdc.py: Introduce required plugins Lucas Bates
2019-04-10 14:33 ` Nicolas Dichtel
2019-04-11 20:54   ` Lucas Bates
2019-04-12  8:31     ` Nicolas Dichtel
2019-04-12 15:21       ` Lucas Bates
2019-04-12 15:42         ` Nicolas Dichtel
2019-04-12 16:07           ` Lucas Bates
2019-04-12 23:37             ` Nicolas Dichtel
2019-04-16 15:19               ` Lucas Bates

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.