[ovs-dev] [PATCH v4] dpif-netdev-unixctl.man: document bond-show command

2020-07-06 Thread Adrian Moreno
Document recently added ovs-appctl command Fixes: 9df65060cf4c ("userspace: Avoid dp_hash recirculation for balance-tcp bond mode.") Cc: vishal.deep.ajm...@ericsson.com Signed-off-by: Adrian Moreno --- lib/dpif-netdev-unixctl.man | 9 + 1 file changed, 9 insertions(+) diff -

Re: [ovs-dev] [PATCH v3] dpif-netdev-unixctl.man: document bond-show command

2020-07-06 Thread Adrian Moreno
Please ignore this patch On 7/6/20 11:25 AM, Adrian Moreno wrote: > Document recently added ovs-appctl command > > Fixes: ac1d2685ebcd ("dpif-netdev-unixctl.man: document bond-show command") > Cc: amore...@redhat.com > Signed-off-by: Adrian Moreno > --- >

Re: [ovs-dev] [PATCH v2] dpif-netdev-unixctl.man: document bond-show command

2020-07-06 Thread Adrian Moreno
On 7/3/20 7:29 PM, Flavio Leitner wrote: > On Fri, Jul 03, 2020 at 06:57:11PM +0200, Adrian Moreno wrote: >> Document recently added ovs-appctl command >> >> Fixes: 9df65060cf4c (userspace: Avoid dp_hash recirculation for balance-tcp >> bond mode.) >> Cc:

[ovs-dev] [PATCH v3] dpif-netdev-unixctl.man: document bond-show command

2020-07-06 Thread Adrian Moreno
Document recently added ovs-appctl command Fixes: ac1d2685ebcd ("dpif-netdev-unixctl.man: document bond-show command") Cc: amore...@redhat.com Signed-off-by: Adrian Moreno --- lib/dpif-netdev-unixctl.man | 9 + 1 file changed, 9 insertions(+) diff --git a/lib/dpif-netdev-uni

[ovs-dev] [PATCH v2] dpif-netdev-unixctl.man: document bond-show command

2020-07-03 Thread Adrian Moreno
Document recently added ovs-appctl command Fixes: 9df65060cf4c (userspace: Avoid dp_hash recirculation for balance-tcp bond mode.) Cc: Vishal Deep Ajmera Signed-off-by: Adrian Moreno --- lib/dpif-netdev-unixctl.man | 9 + 1 file changed, 9 insertions(+) diff --git a/lib/dpif-netdev

Re: [ovs-dev] [PATCH] dpif-netdev-unixctl.man: document bond-show command

2020-07-03 Thread Adrian Moreno
On 7/2/20 10:37 PM, Flavio Leitner wrote: > On Fri, Jun 26, 2020 at 03:56:31PM +0200, Adrian Moreno wrote: >> Document recently added ovs-appctl command > > Could you add a Fixes tag to indicate the commit? Sure, will do > Thanks > fbl > >> >> Cc: Vishal D

[ovs-dev] [PATCH v2] ofproto: delete buckets when lb_output is false

2020-07-07 Thread Adrian Moreno
Cc: vishal.deep.ajm...@ericsson.com Signed-off-by: Adrian Moreno --- ofproto/bond.c| 3 +++ tests/ofproto-dpif.at | 4 2 files changed, 7 insertions(+) diff --git a/ofproto/bond.c b/ofproto/bond.c index 9947e7531..2466c4d02 100644 --- a/ofproto/bond.c +++ b/ofproto/bond.c @@ -490,6 +490,9

[ovs-dev] [PATCH] ofproto: delete buckets when lb_output is false

2020-06-26 Thread Adrian Moreno
When lb-output-action is toggled back to "false" buckets are not being deleted. Delete them as they will no longer be used. Add unit test to verify buckets are correctly deleted. Cc: Vishal Deep Ajmera Signed-off-by: Adrian Moreno --- ofproto/bond.c| 3 +++ tests/ofproto-d

[ovs-dev] [PATCH] dpif-netdev-unixctl.man: document bond-show command

2020-06-26 Thread Adrian Moreno
Document recently added ovs-appctl command Cc: Vishal Deep Ajmera Signed-off-by: Adrian Moreno --- lib/dpif-netdev-unixctl.man | 9 + 1 file changed, 9 insertions(+) diff --git a/lib/dpif-netdev-unixctl.man b/lib/dpif-netdev-unixctl.man index 6c54f6f9c..d1cf7c669 100644 --- a/lib/dpif

Re: [ovs-dev] [PATCH v3] odp-util: Fix clearing match mask if set action is partially unnecessary.

2020-07-29 Thread Adrian Moreno
Verified that v3 also solves the issue reported. Tested-by: Adrián Moreno On 7/29/20 12:37 PM, Eli Britstein wrote: > Thanks! > > Acked-by: Eli Britstein > > On 7/29/2020 12:13 PM, Ilya Maximets wrote: >> While committing set() actions, commit() could wildcard all the fields >> that are same

Re: [ovs-dev] [PATCH] odp-util: Fix clearing match mask if set action is partially unnecessary.

2020-07-27 Thread Adrian Moreno
Hi, I can confirm that this patch fixes the issue described in https://bugzilla.redhat.com/show_bug.cgi?id=1854376 Thanks On 7/27/20 6:01 PM, Ilya Maximets wrote: > While committing set() actions, commit() could wildcard all the fields > that are same in match key and in the set action. This

[ovs-dev] [PATCH v3] ofp_actions: fix set_mpls_tc formatting

2021-05-18 Thread Adrian Moreno
Apart from a cut-and-paste typo, the man page claims that mpls_labels can be provided in hexadecimal format but that's currently not the case. Fix mpls ofp-action formatting, add size checks on ofp-action parsing and add some unit tests. Signed-off-by: Adrian Moreno --- lib/ofp-actions.c

[ovs-dev] [PATCH v3] ofp_actions: fix set_mpls_tc formatting

2021-05-18 Thread Adrian Moreno
Apart from a cut-and-paste typo, the man page claims that mpls_labels can be provided in hexadecimal format but that's currently not the case. Fix mpls ofp-action formatting, add size checks on ofp-action parsing and add some unit tests. Signed-off-by: Adrian Moreno --- lib/ofp-actions.c

[ovs-dev] [PATCH v2] ofp_actions: fix set_mpls_tc formatting

2021-05-07 Thread Adrian Moreno
Apart from a cut-and-paste typo, the man page claims that mpls_labels can be provided in hexadecimal format but that's currently not the case. Fix ofctl formatting as well as a few missing spaces in the manpage Signed-off-by: Adrian Moreno --- lib/ofp-actions.c | 10 -- tests/ovs

Re: [ovs-dev] [PATCH] ofp_actions: fix typo in set_mpls_tc formatting

2021-05-07 Thread Adrian Moreno
On 4/27/21 1:33 PM, Ilya Maximets wrote: > On 4/27/21 1:00 PM, Adrian Moreno wrote: >> I guess this was a cut-and-paste error from set_mpls_ttl >> >> Signed-off-by: Adrian Moreno >> --- >> lib/ofp-actions.c | 2 +- >> 1 file changed, 1 insertion(+), 1

Re: [ovs-dev] [PATCH v2] ofp_actions: fix set_mpls_tc formatting

2021-05-07 Thread Adrian Moreno
On 5/7/21 3:02 PM, Adrian Moreno wrote: > Apart from a cut-and-paste typo, the man page claims that mpls_labels > can be provided in hexadecimal format but that's currently not the case. > > Fix ofctl formatting as well as a few missing spaces in the manpage > > Signed-off

Re: [ovs-dev] [PATCH v2] ofp_actions: fix set_mpls_tc formatting

2021-05-17 Thread Adrian Moreno
On 5/17/21 1:42 PM, Ilya Maximets wrote: > On 5/17/21 1:28 PM, Adrian Moreno wrote: >> >> >> On 5/14/21 6:50 PM, Ilya Maximets wrote: >>> On 5/14/21 5:14 PM, Adrian Moreno wrote: >>>> >>>> >>>> On 5/14/21 4:34 PM, Ilya Maximets

Re: [ovs-dev] [PATCH v2] ofp_actions: fix set_mpls_tc formatting

2021-05-17 Thread Adrian Moreno
On 5/14/21 6:50 PM, Ilya Maximets wrote: > On 5/14/21 5:14 PM, Adrian Moreno wrote: >> >> >> On 5/14/21 4:34 PM, Ilya Maximets wrote: >>> On 5/7/21 3:02 PM, Adrian Moreno wrote: >>>> Apart from a cut-and-paste typo, the man page claims that mpls_labels

Re: [ovs-dev] [PATCH v2] ofp_actions: fix set_mpls_tc formatting

2021-05-14 Thread Adrian Moreno
On 5/14/21 4:34 PM, Ilya Maximets wrote: > On 5/7/21 3:02 PM, Adrian Moreno wrote: >> Apart from a cut-and-paste typo, the man page claims that mpls_labels >> can be provided in hexadecimal format but that's currently not the case. >> >> Fix ofctl formatting as w

Re: [ovs-dev] [PATCH 1/1] match: do not print "igmp" match keyword

2021-07-06 Thread Adrian Moreno
On 7/6/21 2:50 PM, Flavio Leitner wrote: > On Tue, Jul 06, 2021 at 08:25:59AM +0200, Adrian Moreno wrote: >> >> >> On 7/5/21 4:15 PM, Flavio Leitner wrote: >>> >>> Hi, >>> >>> On Wed, Jun 30, 2021 at 05:43:54PM +0200, Adrian Moreno wro

Re: [ovs-dev] [PATCH 1/1] match: do not print "igmp" match keyword

2021-07-08 Thread Adrian Moreno
On 7/7/21 8:41 PM, Ilya Maximets wrote: > On 7/6/21 3:36 PM, Flavio Leitner wrote: >> On Tue, Jul 06, 2021 at 03:27:41PM +0200, Adrian Moreno wrote: >>> >>> >>> On 7/6/21 2:50 PM, Flavio Leitner wrote: >>>> On Tue, Jul 06, 2021 at 08:25:59AM +020

[ovs-dev] [PATCH 0/1] flow dumps containing igmp match cannot be restored

2021-06-30 Thread Adrian Moreno
uot; work would be to use "sed" to rewrite the match, but that would still expose the failure to any user not using that script. Sending the patch to gather feedback on this topic [1] https://patchwork.ozlabs.org/project/openvswitch/patch/20201102232805.1960103-1-...@ovn.org/ Adrian Moreno

[ovs-dev] [PATCH 1/1] match: do not print "igmp" match keyword

2021-06-30 Thread Adrian Moreno
The match keyword "igmp" is not supported in ofp-parse, which means that flow dumps cannot be restored. This patch prints the igmp match in the accepted format (ip,nw_proto=2) and adds a test. Signed-off-by: Adrian Moreno --- lib/match.c| 2 -- tests/ovs-ofctl.at | 2 ++ 2 fil

Re: [ovs-dev] [PATCH 1/1] match: do not print "igmp" match keyword

2021-07-06 Thread Adrian Moreno
On 7/5/21 4:15 PM, Flavio Leitner wrote: > > Hi, > > On Wed, Jun 30, 2021 at 05:43:54PM +0200, Adrian Moreno wrote: >> The match keyword "igmp" is not supported in ofp-parse, which means >> that flow dumps cannot be restored. This patch prints the igmp m

[ovs-dev] [PATCH] ofp_actions: fix typo in set_mpls_tc formatting

2021-04-27 Thread Adrian Moreno
I guess this was a cut-and-paste error from set_mpls_ttl Signed-off-by: Adrian Moreno --- lib/ofp-actions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c index 0342a228b..91d810860 100644 --- a/lib/ofp-actions.c +++ b/lib/ofp-actions.c

[ovs-dev] [RFC 01/11] python: add generic Key-Value parser

2021-09-01 Thread Adrian Moreno
* KVDecoders holds a number of decoders that KVParser can use to decode key-value pairs. It accepts a dictionary of keys and callables to allow users to specify what decoder (i.e: callable) to use for each key Signed-off-by: Adrian Moreno --- python/automake.mk | 6 +- python/ovs

[ovs-dev] [RFC 11/11] python: add ofparse utility

2021-09-01 Thread Adrian Moreno
e utitily as a way to demonstrate the use of the ovs.flows library Original Idea for the "logic" representation of datapath and openflow flows comes from Flavio Leitner . Signed-off-by: Adrian Moreno --- python/automake.mk | 12 +- python/ovs/ofparse/__init__.py | 1 +

[ovs-dev] [RFC 07/11] python: introduce OpenFlow Flow parsing

2021-09-01 Thread Adrian Moreno
-off-by: Adrian Moreno --- python/automake.mk | 3 +- python/ovs/flows/decoders.py | 89 ++ python/ovs/flows/ofp.py | 575 +++ 3 files changed, 666 insertions(+), 1 deletion(-) create mode 100644 python/ovs/flows/ofp.py diff --git a/python

[ovs-dev] [RFC 10/11] python: add a json encoder to flow fields

2021-09-01 Thread Adrian Moreno
The json encoder can be used to convert Flows to json Signed-off-by: Adrian Moreno --- python/ovs/flows/decoders.py | 36 ++-- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/python/ovs/flows/decoders.py b/python/ovs/flows/decoders.py index

[ovs-dev] [RFC 09/11] python: add flow filtering syntax

2021-09-01 Thread Adrian Moreno
Based on pyparsing, create a very simple filtering syntax It supports basic logic statements (and, &, or, ||, not, !), numerical operations (<, >), equality (=) and masking (~=). The latter is only supported in certain fields (IntMask, EthMask, IPMask). Signed-off-by: Adrian Moreno -

[ovs-dev] [RFC 08/11] python: add ovs datapath flow parsing

2021-09-01 Thread Adrian Moreno
Signed-off-by: Adrian Moreno --- python/automake.mk | 3 +- python/ovs/flows/odp.py | 698 2 files changed, 700 insertions(+), 1 deletion(-) create mode 100644 python/ovs/flows/odp.py diff --git a/python/automake.mk b/python/automake.mk index

[ovs-dev] [RFC 04/11] build-aux: split extract-ofp-fields

2021-09-01 Thread Adrian Moreno
In order to be able to reuse the core extaction logic, split the command in two parts. The core extraction logic is moved to python/build while the command that writes the different files out of the extracted field info is kept in build-aux Signed-off-by: Adrian Moreno --- build-aux/extract-ofp

[ovs-dev] [RFC 03/11] python: add list parser

2021-09-01 Thread Adrian Moreno
eating a ListDecoders instance such as: ListDecoders([ ("port", decode_default), ("table", decode_int), ("ct", decode_flag), ]) Naturally, the order of the decoders must be kept. Signed-off-by: Adrian More

[ovs-dev] [RFC 00/11] python: introduce flow parsing library

2021-09-01 Thread Adrian Moreno
part of the decoding logic that can be automatically generated from ovs headers to improve maintainability? - Is there interest in adding specific utilities (such as ofparse) to the ovs tree? - While writing the library, I've written some unit tests. What do you think about adding python unit-test

[ovs-dev] [RFC 05/11] build-aux: generate ofp field decoders

2021-09-01 Thread Adrian Moreno
Based on meta-field information extracted by extract_ofp_fields, autogenerate the right decoder to be used Signed-off-by: Adrian Moreno --- build-aux/automake.mk| 3 +- build-aux/gen_ofp_field_decoders | 73 python/.gitignore| 1

[ovs-dev] [RFC 06/11] python: add flow base class

2021-09-01 Thread Adrian Moreno
It simplifies the implementation of different types of flows by creating the concept of Section (e.g: match, action) and automatic accessors for all the provided Sections Signed-off-by: Adrian Moreno --- python/automake.mk | 3 +- python/ovs/flows/flow.py | 81

[ovs-dev] [RFC 02/11] python: add mask, ip and eth decoders

2021-09-01 Thread Adrian Moreno
Add more decoders that can be used by KVParser. For IPv4 and IPv6 addresses, create a new class that wraps netaddr.IPAddress. For Ethernet addresses, create a new class that wraps netaddr.EUI. For Integers, create a new class that performs basic bitwise mask comparisons Signed-off-by: Adrian

Re: [ovs-dev] [PATCH] Documentation: Cleanup PMD information.

2021-08-05 Thread Adrian Moreno
md-auto-lb is set to true AND cycle or group based assignment is enabled > +then auto load balancing of PMDs is enabled provided there are 2 or more > +non-isolated PMDs and at least one of these PMDs is polling more than one RX > +queue. So, following conditions need to be met to have Auto Load balancing > +enabled: > > 1. cycle based assignment of RX queues to PMD is enabled. > Should "group" assignment be added here as well? ^ Overall, this change makes the doc much easier to understand for someone new to the topic (such as myself). Apart from the two small comments: Acked-by: Adrian Moreno Thanks -- Adrián Moreno ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

[ovs-dev] [PATCH ovn v1 2/5] ovn-detrace: use configurable printer object

2021-10-21 Thread Adrian Moreno
-by: Adrian Moreno --- utilities/ovn-detrace.in | 177 +-- 1 file changed, 95 insertions(+), 82 deletions(-) diff --git a/utilities/ovn-detrace.in b/utilities/ovn-detrace.in index 1e4f76dd7..d26efbd16 100755 --- a/utilities/ovn-detrace.in +++ b/utilities/ovn-detrace.in

[ovs-dev] [PATCH ovn v1 5/5] ovn_detrace.py: add helper to create CookieHandlers

2021-10-21 Thread Adrian Moreno
That way external programs can use such handlers to create all the supported handlers. Signed-off-by: Adrian Moreno --- utilities/ovn_detrace.py.in | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/utilities/ovn_detrace.py.in b/utilities

[ovs-dev] [PATCH ovn v1 0/5] Facilitate external use of ovn-detrace

2021-10-21 Thread Adrian Moreno
mport ovn_detrace", and make use of ovn-detrace's logic with, say, individual openflow cookies instead of ofproto/trace outputs. rfc->v1: - Fix typos and comments from Timothy Redaelli - Add ovn_detrace.py to .gitignore Adrian Moreno (5): manpages.mk: fix dependencies path ovn

[ovs-dev] [PATCH ovn v1 1/5] manpages.mk: fix dependencies path

2021-10-21 Thread Adrian Moreno
rebuild the manpage target. Instead, those dependencies live in $ovs_src. Modify sodepends.py to generate a makefile that contains the variable names that point the right paths. Signed-off-by: Adrian Moreno --- Makefile.am| 2 +- build-a

[ovs-dev] [PATCH ovn v1 4/5] ovn-detrace: expose version as global variable

2021-10-21 Thread Adrian Moreno
That way importers can check it to determine whether a particular feature exists or not. Signed-off-by: Adrian Moreno --- utilities/ovn_detrace.py.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utilities/ovn_detrace.py.in b/utilities/ovn_detrace.py.in index d26efbd16

[ovs-dev] [PATCH ovn v1 3/5] ovn-detrace: rename ovn-detrace to ovn_detrace.py

2021-10-21 Thread Adrian Moreno
For external python programs to be able to load ovn-detrace as a python module easily, it should end in .py and should have underscores. Move ovn-detrace to ovn_detrace.py and create a symlink with the old name for backwards compatibility. Signed-off-by: Adrian Moreno --- debian/ovn

Re: [ovs-dev] [RFC ovn 0/5] Facilitate external use of ovn-detrace

2021-10-18 Thread Adrian Moreno
On 10/18/21 14:51, Dumitru Ceara wrote: On 10/14/21 6:41 PM, Adrian Moreno wrote: ovn-detrace is a very useful tool for debugging OVN issues. It's core logic (mapping openflow cookies / ports with OVN objects) can be used for a variety of troubleshooting tools. Therefore, it would

Re: [ovs-dev] [RFC ovn 3/5] ovn-detrace: rename ovn-detrace to ovn_detrace.py

2021-10-18 Thread Adrian Moreno
On 10/18/21 18:48, Timothy Redaelli wrote: On Thu, 14 Oct 2021 18:41:28 +0200 Adrian Moreno wrote: For external python programs to be able to load ovn-detrace as a python module easily, it should end in .py and should have underscores. Move ovn-detrace to ovn-detrac.py and create a symlink

Re: [ovs-dev] [RFC ovn 0/5] Facilitate external use of ovn-detrace

2021-10-18 Thread Adrian Moreno
On 10/18/21 18:50, Timothy Redaelli wrote: On Mon, 18 Oct 2021 18:18:07 +0200 Adrian Moreno wrote: On 10/18/21 14:51, Dumitru Ceara wrote: On 10/14/21 6:41 PM, Adrian Moreno wrote: ovn-detrace is a very useful tool for debugging OVN issues. It's core logic (mapping openflow cookies

[ovs-dev] [RFC ovn 3/5] ovn-detrace: rename ovn-detrace to ovn_detrace.py

2021-10-14 Thread Adrian Moreno
For external python programs to be able to load ovn-detrace as a python module easily, it should end in .py and should have underscores. Move ovn-detrace to ovn-detrac.py and create a symlink with the old name for backwards compatibility. Signed-off-by: Adrian Moreno --- debian/ovn

[ovs-dev] [RFC ovn 5/5] ovn_detrace.py: add helper to create CookieHandlers

2021-10-14 Thread Adrian Moreno
That way external programs can use such handlers to create all the supported handlers. Signed-off-by: Adrian Moreno --- utilities/ovn_detrace.py.in | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/utilities/ovn_detrace.py.in b/utilities

[ovs-dev] [RFC ovn 2/5] ovn-detrace: use configurable printer object

2021-10-14 Thread Adrian Moreno
-by: Adrian Moreno --- utilities/ovn-detrace.in | 177 +-- 1 file changed, 95 insertions(+), 82 deletions(-) diff --git a/utilities/ovn-detrace.in b/utilities/ovn-detrace.in index 1e4f76dd7..d26efbd16 100755 --- a/utilities/ovn-detrace.in +++ b/utilities/ovn-detrace.in

[ovs-dev] [RFC ovn 1/5] manpages.mk: fix dependencies path

2021-10-14 Thread Adrian Moreno
rebuild the manpage target. Instead, those dependencies live in $ovs_src. Modify sodepends.py to generate a makefile that contains the variable names that point the right paths. Signed-off-by: Adrian Moreno --- Makefile.am| 2 +- build-a

[ovs-dev] [RFC ovn 0/5] Facilitate external use of ovn-detrace

2021-10-14 Thread Adrian Moreno
ing around with ovn-detrace - I have not tested the debian package thoroughly Adrian Moreno (5): manpages.mk: fix dependencies path ovn-detrace: use configurable printer object ovn-detrace: rename ovn-detrace to ovn_detrace.py ovn-detrace: expose version as global variable ovn_detrace.py:

[ovs-dev] [RFC ovn 4/5] ovn-detrace: expose version as global variable

2021-10-14 Thread Adrian Moreno
That way importers can check it to determine whether a particular feature exists or not. Signed-off-by: Adrian Moreno --- utilities/ovn_detrace.py.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utilities/ovn_detrace.py.in b/utilities/ovn_detrace.py.in index d26efbd16

Re: [ovs-dev] [PATCH v1 02/18] python: add mask, ip and eth decoders

2021-12-20 Thread Adrian Moreno
On 12/17/21 14:10, Eelco Chaudron wrote: See comments inline below. On 22 Nov 2021, at 12:22, Adrian Moreno wrote: Add more decoders that can be used by KVParser. For IPv4 and IPv6 addresses, create a new class that wraps netaddr.IPAddress. For Ethernet addresses, create a new class

Re: [ovs-dev] [PATCH v1 07/18] python: introduce OpenFlow Flow parsing

2021-12-20 Thread Adrian Moreno
On 12/17/21 18:19, Eelco Chaudron wrote: On 22 Nov 2021, at 12:22, Adrian Moreno wrote: Introduce OFPFlow class and all its decoders. Most of the decoders are generic (from decoders.py). Some have special syntax and need a specific implementation. Decoders for nat are moved to the common

Re: [ovs-dev] [PATCH v1 01/18] python: add generic Key-Value parser

2021-12-20 Thread Adrian Moreno
On 12/10/21 16:58, Eelco Chaudron wrote: On 22 Nov 2021, at 12:22, Adrian Moreno wrote: Most of ofproto and dpif flows are based on key-value pairs. These key-value pairs can be represented in several ways, eg: key:value, key=value, key(value). Add the following classes that allow parsing

Re: [ovs-dev] [PATCH v1 02/18] python: add mask, ip and eth decoders

2021-12-20 Thread Adrian Moreno
On 11/22/21 14:07, Timothy Redaelli wrote: On Mon, 22 Nov 2021 12:22:40 +0100 Adrian Moreno wrote: Add more decoders that can be used by KVParser. For IPv4 and IPv6 addresses, create a new class that wraps netaddr.IPAddress. For Ethernet addresses, create a new class that wraps netaddr.EUI

Re: [ovs-dev] [PATCH] ofp-flow: skip flow reply if it exceeds the maximum message size

2021-12-20 Thread Adrian Moreno
v Reviewed and manually tested this patch. Verified excessively big flows are skipped while the rest are sent properly. Although it's not ideal to skip a flow, I don't see any better way to respond to this corner-case. Acked-by: Adrian Moreno -- Adrián Moreno ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

[ovs-dev] [PATCH v1 08/18] python: add ovs datapath flow parsing

2021-11-22 Thread Adrian Moreno
concatenated lists of options nat: we reuse the decoder used for openflow actions Signed-off-by: Adrian Moreno --- python/automake.mk | 3 +- python/ovs/flows/odp.py | 723 2 files changed, 725 insertions(+), 1 deletion(-) create mode 100644 python

[ovs-dev] [PATCH v1 07/18] python: introduce OpenFlow Flow parsing

2021-11-22 Thread Adrian Moreno
-off-by: Adrian Moreno --- python/automake.mk | 4 +- python/ovs/flows/decoders.py | 93 python/ovs/flows/ofp.py | 400 +++ python/ovs/flows/ofp_act.py | 233 4 files changed, 729 insertions(+), 1 deletion(-) create

[ovs-dev] [PATCH v1 10/18] python: add a json encoder to flow fields

2021-11-22 Thread Adrian Moreno
The json encoder can be used to convert Flows to json Signed-off-by: Adrian Moreno --- python/ovs/flows/decoders.py | 15 +++ 1 file changed, 15 insertions(+) diff --git a/python/ovs/flows/decoders.py b/python/ovs/flows/decoders.py index 3def9f279..96bb56c06 100644 --- a/python/ovs

[ovs-dev] [PATCH v1 09/18] python: add flow filtering syntax

2021-11-22 Thread Adrian Moreno
mantically equivalent to "includes", therefore: ip_src ~= 192.168.1.1 means that ip_src field is either a host IP address equal to 192.168.1.1 or an IPMask that includes it (e.g: 192.168.1.1/24) Signed-off-by: Adrian Moreno --- python/automake.mk | 3 +- python/ovs/f

[ovs-dev] [PATCH v1 11/18] tests: wrap ovs-ofctl calls to test python parser

2021-11-22 Thread Adrian Moreno
also parse the flows. Signed-off-by: Adrian Moreno --- tests/automake.mk | 4 +- tests/ofp-actions.at | 46 - tests/ovs-test-ofparse.py | 103 ++ 3 files changed, 129 insertions(+), 24 deletions(-) create mode 100755 tests/ovs

[ovs-dev] [PATCH v1 14/18] python: introduce unit tests

2021-11-22 Thread Adrian Moreno
Use pytest to run unit tests Signed-off-by: Adrian Moreno --- .ci/linux-prepare.sh| 2 +- .gitignore | 1 + Documentation/intro/install/general.rst | 2 + Vagrantfile | 2 +- configure.ac

[ovs-dev] [PATCH v1 05/18] build-aux: generate ofp field decoders

2021-11-22 Thread Adrian Moreno
Based on meta-field information extracted by extract_ofp_fields, autogenerate the right decoder to be used Signed-off-by: Adrian Moreno --- build-aux/automake.mk| 3 +- build-aux/gen_ofp_field_decoders | 73 python/.gitignore| 1

[ovs-dev] [PATCH v1 06/18] python: add flow base class

2021-11-22 Thread Adrian Moreno
It simplifies the implementation of different types of flows by creating the concept of Section (e.g: match, action) and automatic accessors for all the provided Sections Signed-off-by: Adrian Moreno --- python/automake.mk | 3 +- python/ovs/flows/flow.py | 94

[ovs-dev] [PATCH v1 13/18] python: detect changes in flow formatting code

2021-11-22 Thread Adrian Moreno
hopefully it will not cause too much trouble for a developer that has modifed the file without changing the flow string format. Signed-off-by: Adrian Moreno --- .gitignore | 1 + python/automake.mk | 13 +++- python/build/flow-parse-deps.py | 101

[ovs-dev] [PATCH v1 12/18] tests: Wrap test-odp to also run python parsers

2021-11-22 Thread Adrian Moreno
test-odp is used to parse datapath flow actions and matches within the odp tests. Wrap calls to this tool in a python script that also parses them using the python flow parsing library. Signed-off-by: Adrian Moreno --- tests/automake.mk | 3 +- tests/odp.at | 36

[ovs-dev] [PATCH v1 17/18] python: add unit tests to datapath parsing

2021-11-22 Thread Adrian Moreno
Signed-off-by: Adrian Moreno --- python/automake.mk | 3 +- python/ovs/tests/test_odp.py | 527 +++ 2 files changed, 529 insertions(+), 1 deletion(-) create mode 100644 python/ovs/tests/test_odp.py diff --git a/python/automake.mk b/python/automake.mk

[ovs-dev] [PATCH v1 18/18] python: add unit tests for filtering engine

2021-11-22 Thread Adrian Moreno
Signed-off-by: Adrian Moreno --- python/automake.mk | 3 +- python/ovs/tests/test_filter.py | 225 2 files changed, 227 insertions(+), 1 deletion(-) create mode 100644 python/ovs/tests/test_filter.py diff --git a/python/automake.mk b/python

[ovs-dev] [PATCH v1 16/18] python: add unit tests for openflow parsing

2021-11-22 Thread Adrian Moreno
Signed-off-by: Adrian Moreno --- python/automake.mk | 3 +- python/ovs/tests/test_ofp.py | 524 +++ 2 files changed, 526 insertions(+), 1 deletion(-) create mode 100644 python/ovs/tests/test_ofp.py diff --git a/python/automake.mk b/python/automake.mk

[ovs-dev] [PATCH v1 15/18] python: add unit tests for list

2021-11-22 Thread Adrian Moreno
Signed-off-by: Adrian Moreno --- python/automake.mk| 4 ++- python/ovs/tests/test_list.py | 67 +++ 2 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 python/ovs/tests/test_list.py diff --git a/python/automake.mk b/python

[ovs-dev] [PATCH v1 02/18] python: add mask, ip and eth decoders

2021-11-22 Thread Adrian Moreno
Add more decoders that can be used by KVParser. For IPv4 and IPv6 addresses, create a new class that wraps netaddr.IPAddress. For Ethernet addresses, create a new class that wraps netaddr.EUI. For Integers, create a new class that performs basic bitwise mask comparisons Signed-off-by: Adrian

[ovs-dev] [PATCH v1 01/18] python: add generic Key-Value parser

2021-11-22 Thread Adrian Moreno
ffset : index + offset]" which is PEP8 compliant. So, ignore this error. Signed-off-by: Adrian Moreno --- Makefile.am | 3 +- python/automake.mk | 6 +- python/ovs/flows/__init__.py | 0 python/ovs/flows/decoders.py | 19 +++ python/ovs/flows/kv.py

[ovs-dev] [PATCH v1 04/18] build-aux: split extract-ofp-fields

2021-11-22 Thread Adrian Moreno
In order to be able to reuse the core extaction logic, split the command in two parts. The core extraction logic is moved to python/build while the command that writes the different files out of the extracted field info is kept in build-aux Signed-off-by: Adrian Moreno --- build-aux/extract-ofp

[ovs-dev] [PATCH v1 00/18] python: add flow parsing library

2021-11-22 Thread Adrian Moreno
lake8 requirements - Split ofp actions in ofp_act.py - drop ofparse utility (will send a RFC to the mail list soon) - Moved the initialization of the decoders objects to a factory so they are cached. This significantly decreases parsing time of large dumps. Adrian Moreno (18): python: add generic Key-

[ovs-dev] [PATCH v1 03/18] python: add list parser

2021-11-22 Thread Adrian Moreno
eating a ListDecoders instance such as: ListDecoders([ ("port", decode_default), ("table", decode_int), ("ct", decode_flag), ]) Naturally, the order of the decoders must be kept. Signed-off-by: Adrian More

[ovs-dev] [RFC PATCH 03/10] python/ovs-ofparse: add formatting framework

2021-11-22 Thread Adrian Moreno
-by: Adrian Moreno --- python/automake.mk | 4 +- python/ovs/ovs_ofparse/format.py | 325 +++ python/ovs/ovs_ofparse/main.py | 22 ++- 3 files changed, 349 insertions(+), 2 deletions(-) create mode 100644 python/ovs/ovs_ofparse/format.py diff --git a/python

[ovs-dev] [RFC PATCH 04/10] python/ovs-ofparse: add json format

2021-11-22 Thread Adrian Moreno
Add a FlowProcessor that is able to return the flows in json format and a subcommand to both "datapath" and "openflow" to print flows in that format Signed-off-by: Adrian Moreno --- python/ovs/ovs_ofparse/datapath.py | 17 +- python/ovs/ovs_ofpa

[ovs-dev] [RFC PATCH 02/10] python/ovs-ofparse: Create basic flow processing

2021-11-22 Thread Adrian Moreno
be filtered by adding a "--filter" option to the main command line. Filtering at this stage can be disabled since some formats might want to perform other kind of filtering. Signed-off-by: Adrian Moreno --- python/automake.mk| 3 +- python/ovs/ovs_ofparse/main.p

[ovs-dev] [RFC PATCH 01/10] python: introduce scheleton of ovs_ofparse utility

2021-11-22 Thread Adrian Moreno
general options that apply to any protocol or format [openflow | datapath] defines the flow protocol to parse FORMAT: specifies the format to print the output in [FORMAT OPTIONS] are optional format-specific options A generic configuration file called ovs-ofparse.conf is supported Signed-off-by: Adrian

[ovs-dev] [RFC PATCH 05/10] python/ovs-ofparse: Add rich console formatting

2021-11-22 Thread Adrian Moreno
ng the configuration file Auxiliary functions - heat_map: allow calculating the relative value of a field and selecting its color based on a heat-map pallete - hash-pallete: calculate the color based on a pseudo-hash of a value. That way, we can print same values with the same color Signed-o

[ovs-dev] [RFC PATCH 00/10] Introduce ovs-ofparse utility

2021-11-22 Thread Adrian Moreno
e tool is based on two main dependencies: - 'click' for command line management - 'rich' for rich console output Testing notes - (optionally create a venv) $ cd python; pip install . $ ovs-ofparse --help [1] https://patchwork.ozlabs.org/project/openvswitch/list/?series=273222

[ovs-dev] [RFC PATCH 09/10] python/ovs-ofparse: add openflow html format

2021-11-22 Thread Adrian Moreno
Create a flow table that uses a hyperlink from resubmit() to the target table Signed-off-by: Adrian Moreno --- python/ovs/ovs_ofparse/openflow.py | 70 ++ 1 file changed, 70 insertions(+) diff --git a/python/ovs/ovs_ofparse/openflow.py b/python/ovs/ovs_ofparse

[ovs-dev] [RFC PATCH 06/10] python/ovs-ofparse: add openflow logic processing

2021-11-22 Thread Adrian Moreno
values do matter - Same cookie if "--cookie | -c" option is provided All flows that have the same "logical" representation are squashed together. Optionally, if "--show-flows | -s" is given, the flows that comprise the logical flow are also printed. Signed-off-by: A

[ovs-dev] [RFC PATCH 07/10] python/ovs-ofparse: add datapath logic processing

2021-11-22 Thread Adrian Moreno
the tree is built in order to include all the subtrees that has a subflow that matches the filter Signed-off-by: Adrian Moreno --- python/automake.mk | 4 +- python/ovs/ovs_ofparse/datapath.py | 132 - python/ovs/ovs_ofparse/dp_tree.py | 128

[ovs-dev] [RFC PATCH 08/10] python/ovs-ofparse: add html formatter

2021-11-22 Thread Adrian Moreno
Add a HTML formatting system. The HTMLStyle includes a color and a anchor generator so links can be added to each key and value. Styles are extracted from the configuration file Signed-off-by: Adrian Moreno --- python/automake.mk | 3 +- python/ovs/ovs_ofparse/etc

[ovs-dev] [RFC PATCH 10/10] python:ovs-ofparse: add datapath html format

2021-11-22 Thread Adrian Moreno
Create a collapsable and selectable flow tree html table based on the datapath tree. Signed-off-by: Adrian Moreno --- python/ovs/ovs_ofparse/datapath.py | 247 + 1 file changed, 247 insertions(+) diff --git a/python/ovs/ovs_ofparse/datapath.py b/python/ovs

Re: [ovs-dev] [RFC 00/11] python: introduce flow parsing library

2021-10-27 Thread Adrian Moreno
Thanks for you comments Eelco. On 10/21/21 11:52, Eelco Chaudron wrote: On 1 Sep 2021, at 12:00, Adrian Moreno wrote: While troubleshooting or developing new features in OVS, a considerable amount of time is spent analyzing flows (whether that's Openflow flows or datapath flows). Currently

Re: [ovs-dev] [PATCH ovn v1 1/5] manpages.mk: fix dependencies path

2021-11-08 Thread Adrian Moreno
On 11/5/21 17:12, Dumitru Ceara wrote: On 10/21/21 11:10 AM, Adrian Moreno wrote: Currently, if "make" is run after the project is built, the root manpage (ovn-detrace.1) is rebuilt unnecessarily. The reason is that its dependencies are wrong: files such as lib/common.man or lib/o

Re: [ovs-dev] [PATCH v1 04/18] build-aux: split extract-ofp-fields

2022-01-12 Thread Adrian Moreno
On 12/17/21 14:53, Eelco Chaudron wrote: On 22 Nov 2021, at 12:22, Adrian Moreno wrote: In order to be able to reuse the core extaction logic, split the command extaction -> extraction in two parts. The core extraction logic is moved to python/build while the command that wri

Re: [ovs-dev] [PATCH v1 03/18] python: add list parser

2022-01-12 Thread Adrian Moreno
On 12/17/21 14:41, Eelco Chaudron wrote: See some minor comment below. //Eelco On 22 Nov 2021, at 12:22, Adrian Moreno wrote: Some openflow or dpif flows encode their arguments in lists, eg: "some_action(arg1,arg2,arg3)". In order to decode this in a way that can be t

Re: [ovs-dev] [PATCH v1 05/18] build-aux: generate ofp field decoders

2022-01-12 Thread Adrian Moreno
On 12/17/21 15:37, Eelco Chaudron wrote: On 22 Nov 2021, at 12:22, Adrian Moreno wrote: Based on meta-field information extracted by extract_ofp_fields, autogenerate the right decoder to be used . Signed-off-by: Adrian Moreno --- build-aux/automake.mk| 3 +- build-aux

Re: [ovs-dev] [PATCH v1 09/18] python: add flow filtering syntax

2022-01-13 Thread Adrian Moreno
On 12/23/21 14:46, Eelco Chaudron wrote: Just some small comments below, and the request to fix up the comments. I did not go too deep on the pyparser part but at a glance, it looks ok. //Eelco On 22 Nov 2021, at 12:22, Adrian Moreno wrote: Based on pyparsing, create a very simple

Re: [ovs-dev] [PATCH v1 11/18] tests: wrap ovs-ofctl calls to test python parser

2022-01-13 Thread Adrian Moreno
On 12/23/21 15:01, Eelco Chaudron wrote: Some small remarks. On 22 Nov 2021, at 12:22, Adrian Moreno wrote: Some ovs-ofctl commands are used to parse or dump openflow flows, specially in ofp-actions.at Use a wrapper around ovs-ofctl, called ovs-test-ofparse.py that, apart from calling ovs

Re: [ovs-dev] [PATCH v1 12/18] tests: Wrap test-odp to also run python parsers

2022-01-13 Thread Adrian Moreno
On 12/23/21 15:43, Eelco Chaudron wrote: Some small remarks. On 22 Nov 2021, at 12:22, Adrian Moreno wrote: test-odp is used to parse datapath flow actions and matches within the odp tests. Wrap calls to this tool in a python script that also parses them using the python flow parsing

Re: [ovs-dev] [PATCH v1 08/18] python: add ovs datapath flow parsing

2022-01-13 Thread Adrian Moreno
On 12/23/21 14:08, Eelco Chaudron wrote: Just some small comments below, and the request to fix up the comments. Thanks. Trying to understand why you have a special ODPFlowFactory class to return an ODPFLow() object from a string? Can you not just add a static method to the ODPFlow

Re: [ovs-dev] [PATCH v1 13/18] python: detect changes in flow formatting code

2022-01-13 Thread Adrian Moreno
On 12/23/21 17:06, Eelco Chaudron wrote: On 22 Nov 2021, at 12:22, Adrian Moreno wrote: In order to minimize the risk of having the python flow parsing code and the C flow formatting code divert, add a target that checks if the formatting code has been changed since the last revision

Re: [ovs-dev] [PATCH v1 14/18] python: introduce unit tests

2022-01-13 Thread Adrian Moreno
On 12/24/21 14:01, Eelco Chaudron wrote: On 22 Nov 2021, at 12:22, Adrian Moreno wrote: Use pytest to run unit tests Signed-off-by: Adrian Moreno --- .ci/linux-prepare.sh| 2 +- .gitignore | 1 + Documentation/intro/install

Re: [ovs-dev] [PATCH v1 16/18] python: add unit tests for openflow parsing

2022-01-13 Thread Adrian Moreno
On 12/24/21 14:14, Eelco Chaudron wrote: Other than ending comments with a dot and an extra newline, it looks fine. Acked-by: Eelco Chaudron On 22 Nov 2021, at 12:22, Adrian Moreno wrote: Signed-off-by: Adrian Moreno --- python/automake.mk | 3 +- python/ovs/tests

  1   2   3   4   5   6   7   8   9   >