[ovs-dev] [PATCH] python: ovs: flow: Fix nested check_pkt_len acts.

2024-06-06 Thread Adrian Moreno
Add check_pkt_len action to the decoder list that it, itself, uses. This makes nested check_pkt_len (i.e:a check_pkt_len inside another) work. Signed-off-by: Adrian Moreno --- python/ovs/flow/odp.py | 43 ++-- python/ovs/tests/test_odp.py | 29

[ovs-dev] [RFC v2 9/9] tests: Test local sampling.

2024-06-05 Thread Adrian Moreno
Test simultaneous IPFIX and local sampling including slow-path. Signed-off-by: Adrian Moreno --- tests/system-common-macros.at | 4 ++ tests/system-traffic.at | 105 ++ 2 files changed, 109 insertions(+) diff --git a/tests/system-common-macros.at b/tests

[ovs-dev] [RFC v2 8/9] tests: Add test-psample testing utility.

2024-06-05 Thread Adrian Moreno
This simple program reads from psample and prints the packets to stdout. Signed-off-by: Adrian Moreno --- include/linux/automake.mk | 1 + include/linux/psample.h | 68 + tests/automake.mk | 3 +- tests/test-psample.c | 282 ++ 4

[ovs-dev] [RFC v2 7/9] ofproto-dpif-lsample: Show stats via unixctl.

2024-06-05 Thread Adrian Moreno
Add a command to dump statistics per exporter. Signed-off-by: Adrian Moreno --- NEWS | 2 + ofproto/ofproto-dpif-lsample.c | 113 + ofproto/ofproto-dpif-lsample.h | 1 + ofproto/ofproto-dpif.c | 1 + 4 files changed, 117

[ovs-dev] [RFC v2 5/9] ofproto-dpif-xlate: Use emit_sample for local sample.

2024-06-05 Thread Adrian Moreno
Use the newly added emit_sample to implement OpenFlow sample() actions with local sampling configuration. Signed-off-by: Adrian Moreno --- ofproto/ofproto-dpif-lsample.c | 17 ofproto/ofproto-dpif-lsample.h | 6 ++ ofproto/ofproto-dpif-xlate.c | 163

[ovs-dev] [RFC v2 4/9] vswitchd: Add local sampling to vswitchd schema.

2024-06-05 Thread Adrian Moreno
Add as new column in the Flow_Sample_Collector_Set table named "local_sample_group" which enables this feature. Signed-off-by: Adrian Moreno --- NEWS | 4 ++ vswitchd/bridge.c | 78 +++--- vswitchd/vswitch.ovss

[ovs-dev] [RFC v2 6/9] ofproto-dpif-xlate-cache: Add lsample to xcache.

2024-06-05 Thread Adrian Moreno
Add a cache entry type for local sample objects. Store both the dpif_lsample reference and the collector_set_id so we can quickly find the particular exporter. Using this mechanism, account for packet and byte statistics. Signed-off-by: Adrian Moreno --- ofproto/ofproto-dpif-lsample.c | 18

[ovs-dev] [RFC v2 3/9] ofproto: Add ofproto-dpif-lsample.

2024-06-05 Thread Adrian Moreno
Add a new resource in ofproto-dpif and the corresponding API in ofproto_provider.h to represent and local sampling configuration. Signed-off-by: Adrian Moreno --- ofproto/automake.mk| 2 + ofproto/ofproto-dpif-lsample.c | 185 + ofproto/ofproto-dpif

[ovs-dev] [RFC v2 2/9] ofproto_dpif: Check for emit_sample support.

2024-06-05 Thread Adrian Moreno
Only kernel datapath supports this action so add a function in dpif.c that checks for that. Signed-off-by: Adrian Moreno --- lib/dpif.c | 7 +++ lib/dpif.h | 1 + ofproto/ofproto-dpif.c | 45 ++ ofproto/ofproto-dpif.h | 6

[ovs-dev] [RFC v2 1/9] odp-util: Add support OVS_ACTION_ATTR_EMIT_SAMPLE.

2024-06-05 Thread Adrian Moreno
" by the kernel. Signed-off-by: Adrian Moreno --- include/linux/openvswitch.h | 25 + lib/dpif-netdev.c| 1 + lib/dpif.c | 1 + lib/odp-execute.c| 25 - lib/odp-util.c | 103 +++

[ovs-dev] [RFC v2 0/9] Introduce local sampling with NXAST_SAMPLE action

2024-06-05 Thread Adrian Moreno
n this series as existing sample or userspace actions are not currently offloadable. Also some improvements need to be implemented in tc for it to be feasible. [1] https://patchwork.kernel.org/project/netdevbpf/cover/20240603185647.2310748-1-amore...@redhat.com/ Adrian Moreno (9): odp-uti

[ovs-dev] [PATCH v2] checkpatch: Don't warn on pointer to pointer.

2024-06-05 Thread Adrian Moreno
the regexp to allow more than one consecutive "+" characters. Signed-off-by: Adrian Moreno --- tests/checkpatch.at | 25 + utilities/checkpatch.py | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/tests/checkpatch.at b/tests/checkpatch

[ovs-dev] [PATCH] checkpatch: Don't warn on pointer to pointer.

2024-06-05 Thread Adrian Moreno
Current regexp used to check whitespaces around operators does not consider that there can be more than one "*" together to express pointer to pointer. As a result, false positive warnings are raised [1]. Fix the regexp to allow more than one consecutive "+" characters. S

[ovs-dev] [PATCH net-next v2 7/9] net: openvswitch: do not notify drops inside sample

2024-06-03 Thread Adrian Moreno
Signed-off-by: Adrian Moreno --- net/openvswitch/actions.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index 33f6d93ba5e4..54fc1abcff95 100644 --- a/net/openvswitch/actions.c +++ b/net/openvswitch

[ovs-dev] [PATCH net-next v2 9/9] selftests: openvswitch: add emit_sample test

2024-06-03 Thread Adrian Moreno
for "userspace" and "trunc" actions. Signed-off-by: Adrian Moreno --- .../selftests/net/openvswitch/openvswitch.sh | 99 +++- .../selftests/net/openvswitch/ovs-dpctl.py| 112 +- 2 files changed, 204 insertions(+), 7 deletions(-) diff --git a/tools/t

[ovs-dev] [PATCH net-next v2 8/9] selftests: openvswitch: add emit_sample action

2024-06-03 Thread Adrian Moreno
Add sample and emit_sample action support to ovs-dpctl.py. Refactor common attribute parsing logic into an external function. Signed-off-by: Adrian Moreno --- .../selftests/net/openvswitch/ovs-dpctl.py| 162 +- 1 file changed, 161 insertions(+), 1 deletion(-) diff --git

[ovs-dev] [PATCH net-next v2 6/9] net: openvswitch: store sampling probability in cb.

2024-06-03 Thread Adrian Moreno
The behavior of actions might not be the exact same if they are being executed inside a nested sample action. Store the probability of the parent sample action in the skb's cb area. Use the probability in emit_sample to pass it down to psample. Signed-off-by: Adrian Moreno --- include/uapi

[ovs-dev] [PATCH net-next v2 4/9] net: psample: allow using rate as probability

2024-06-03 Thread Adrian Moreno
ling a decent amount of packets, this sampling rate semantics is not very useful. Add a new flag to the uAPI that indicates that the sampling rate is expressed in scaled probability, this is: - 0 is 0% probability, no packets get sampled. - U32_MAX is 100% probability, all packets get sampled. Signed-o

[ovs-dev] [PATCH net-next v2 5/9] net: openvswitch: add emit_sample action

2024-06-03 Thread Adrian Moreno
cookies that will not be offloadable. Signed-off-by: Adrian Moreno --- Documentation/netlink/specs/ovs_flow.yaml | 17 include/uapi/linux/openvswitch.h | 25 net/openvswitch/actions.c | 50 +++ net/openvswitch/flow_netlink.c

[ovs-dev] [PATCH net-next v2 3/9] net: psample: skip packet copy if no listeners

2024-06-03 Thread Adrian Moreno
If nobody is listening on the multicast group, generating the sample, which involves copying packet data, seems completely unnecessary. Return fast in this case. Signed-off-by: Adrian Moreno --- net/psample/psample.c | 4 1 file changed, 4 insertions(+) diff --git a/net/psample/psample.c

[ovs-dev] [PATCH net-next v2 2/9] net: sched: act_sample: add action cookie to sample

2024-06-03 Thread Adrian Moreno
If the action has a user_cookie, pass it along to the sample so it can be easily identified. Signed-off-by: Adrian Moreno --- net/sched/act_sample.c | 12 1 file changed, 12 insertions(+) diff --git a/net/sched/act_sample.c b/net/sched/act_sample.c index a69b53d54039..5c3f86ec964a

[ovs-dev] [PATCH net-next v2 1/9] net: psample: add user cookie

2024-06-03 Thread Adrian Moreno
Add a user cookie to the sample metadata so that sample emitters can provide more contextual information to samples. If present, send the user cookie in a new attribute: PSAMPLE_ATTR_USER_COOKIE. Signed-off-by: Adrian Moreno --- include/net/psample.h| 2 ++ include/uapi/linux/psample.h

[ovs-dev] [PATCH net-next v2 0/9] net: openvswitch: Add sample multicasting.

2024-06-03 Thread Adrian Moreno
a new OVS-only multicast group. - Extend psample and tc with a user-defined cookie. Adrian Moreno (9): net: psample: add user cookie net: sched: act_sample: add action cookie to sample net: psample: skip packet copy if no listeners net: psample: allow using rate as probability net: openv

[ovs-dev] [PATCH net-next 2/2] selftests: openvswitch: set value to nla flags

2024-06-03 Thread Adrian Moreno
^^ File "[...]/pyroute2/netlink/__init__.py", line 1560, in encode_nlas nla_instance.setvalue(cell[1]) File "[...]/pyroute2/netlink/__init__.py", line 1265, in setvalue nlv.setvalue(nla_tuple[1]) ~^^^ IndexError: list index out of range

[ovs-dev] [PATCH net-next 1/2] selftests: openvswitch: fix action formatting

2024-06-03 Thread Adrian Moreno
In the action formatting function ("dpstr"), the iteration is made over the nla_map, so if there are more than one attribute from the same type we only print the first one. Fix this by iterating over the actual attributes. Signed-off-by: Adrian Moreno --- .../selftests/net/openv

Re: [ovs-dev] [RFC 00/11] Add psample support to NXAST_SAMPLE action.

2024-05-16 Thread Adrian Moreno
On 4/24/24 9:53 PM, Adrian Moreno wrote: This is the userspace counterpart of the work being done in the kernel [1]. Sending it as RFC to get some early feedback on the overall solution. ** Problem description ** Currently, OVS supports several observability features, such as per-bridge

Re: [ovs-dev] [RFC 01/11] odp-util: Add support to new psample uAPI.

2024-05-14 Thread Adrian Moreno
On 5/14/24 1:27 PM, Eelco Chaudron wrote: On 14 May 2024, at 13:05, Ilya Maximets wrote: On 5/14/24 12:14, Adrian Moreno wrote: On 5/14/24 11:09 AM, Ilya Maximets wrote: On 5/14/24 09:39, Adrian Moreno wrote: On 5/10/24 12:45 PM, Adrian Moreno wrote: On 5/10/24 12:06 PM, Eelco

Re: [ovs-dev] [RFC 01/11] odp-util: Add support to new psample uAPI.

2024-05-14 Thread Adrian Moreno
On 5/14/24 11:09 AM, Ilya Maximets wrote: On 5/14/24 09:39, Adrian Moreno wrote: On 5/10/24 12:45 PM, Adrian Moreno wrote: On 5/10/24 12:06 PM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: The new odp sample attributes allow userspace to specify a group_id

Re: [ovs-dev] [RFC 00/11] Add psample support to NXAST_SAMPLE action.

2024-05-14 Thread Adrian Moreno
On 5/10/24 12:14 PM, Eelco Chaudron wrote: On 10 May 2024, at 10:23, Adrian Moreno wrote: On 5/10/24 9:14 AM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: This is the userspace counterpart of the work being done in the kernel [1]. Sending it as RFC to get some

Re: [ovs-dev] [RFC 01/11] odp-util: Add support to new psample uAPI.

2024-05-14 Thread Adrian Moreno
On 5/10/24 12:45 PM, Adrian Moreno wrote: On 5/10/24 12:06 PM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: The new odp sample attributes allow userspace to specify a group_id and user-defined cookie to be passed down to psample. Add support for parsing

Re: [ovs-dev] [RFC 08/11] netdev-offload-tc: Add sample support.

2024-05-13 Thread Adrian Moreno
On 5/13/24 2:38 PM, Adrian Moreno wrote: On 5/13/24 1:32 PM, Eelco Chaudron wrote: On 13 May 2024, at 10:44, Adrian Moreno wrote: On 5/10/24 12:06 PM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: Offload the sample action if it contains psample information

Re: [ovs-dev] [RFC 01/11] odp-util: Add support to new psample uAPI.

2024-05-13 Thread Adrian Moreno
On 5/10/24 3:06 PM, Ilya Maximets wrote: On 5/10/24 14:01, Eelco Chaudron wrote: On 10 May 2024, at 12:45, Adrian Moreno wrote: On 5/10/24 12:06 PM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: The new odp sample attributes allow userspace to specify a group_id

Re: [ovs-dev] [RFC 05/11] ofproto_dpif_xlate: Use psample for OFP samples.

2024-05-13 Thread Adrian Moreno
On 5/13/24 12:32 PM, Eelco Chaudron wrote: On 10 May 2024, at 13:15, Adrian Moreno wrote: On 5/10/24 12:06 PM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: When a OFP_SAMPLE action is xlated and a dpif_psample object has been configured (via

Re: [ovs-dev] [RFC 06/11] utilities: Add ovs-psample.

2024-05-13 Thread Adrian Moreno
On 5/13/24 2:48 PM, Ilya Maximets wrote: On 5/13/24 13:10, Adrian Moreno wrote: On 5/13/24 12:44 PM, Eelco Chaudron wrote: On 13 May 2024, at 9:01, Adrian Moreno wrote: On 5/10/24 12:06 PM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: This simple program

Re: [ovs-dev] [RFC 02/11] ofproto_dpif: Check for psample support.

2024-05-13 Thread Adrian Moreno
On 5/10/24 1:49 PM, Ilya Maximets wrote: On 5/10/24 13:03, Adrian Moreno wrote: On 5/10/24 12:06 PM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: Only kernel datapath supports psample so check that the datapath is not userspace and that it accepts the new

Re: [ovs-dev] [RFC 01/11] odp-util: Add support to new psample uAPI.

2024-05-13 Thread Adrian Moreno
On 5/13/24 2:38 PM, Ilya Maximets wrote: On 5/13/24 09:17, Eelco Chaudron wrote: On 10 May 2024, at 15:06, Ilya Maximets wrote: On 5/10/24 14:01, Eelco Chaudron wrote: On 10 May 2024, at 12:45, Adrian Moreno wrote: On 5/10/24 12:06 PM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53

Re: [ovs-dev] [RFC 08/11] netdev-offload-tc: Add sample support.

2024-05-13 Thread Adrian Moreno
On 5/13/24 1:32 PM, Eelco Chaudron wrote: On 13 May 2024, at 10:44, Adrian Moreno wrote: On 5/10/24 12:06 PM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: Offload the sample action if it contains psample information by creating a tc "sample" action wit

Re: [ovs-dev] [RFC 06/11] utilities: Add ovs-psample.

2024-05-13 Thread Adrian Moreno
On 5/13/24 12:44 PM, Eelco Chaudron wrote: On 13 May 2024, at 9:01, Adrian Moreno wrote: On 5/10/24 12:06 PM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: This simple program reads from psample and prints the packets to stdout. It's useful for quickly collecting

Re: [ovs-dev] [RFC 11/11] tests: Add test for sample offloading.

2024-05-13 Thread Adrian Moreno
On 5/10/24 12:06 PM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: Signed-off-by: Adrian Moreno --- tests/system-common-macros.at| 4 +++ tests/system-offloads-traffic.at | 53 2 files changed, 57 insertions(+) diff --git

Re: [ovs-dev] [RFC 10/11] ofproto-dpif-psample: Add command to show stats.

2024-05-13 Thread Adrian Moreno
On 5/10/24 12:06 PM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: Maybe add a small description to this patch. Signed-off-by: Adrian Moreno --- ofproto/ofproto-dpif-psample.c | 59 ++ ofproto/ofproto-dpif-psample.h | 1

Re: [ovs-dev] [RFC 08/11] netdev-offload-tc: Add sample support.

2024-05-13 Thread Adrian Moreno
On 5/10/24 12:06 PM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: Offload the sample action if it contains psample information by creating a tc "sample" action with the user cookie inside the action's cookie. Avoid using the "sample" acti

Re: [ovs-dev] [RFC 07/11] netlink-offload-tc: Rename act_cookie->flow_cookie.

2024-05-13 Thread Adrian Moreno
On 5/10/24 12:06 PM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: In preparation to allowing certain actions to have a cookie that does not represent the entire flow, rename flower->act_cookie to flower->flow_cookie. This patch does not introduce any beha

Re: [ovs-dev] [RFC 06/11] utilities: Add ovs-psample.

2024-05-13 Thread Adrian Moreno
On 5/10/24 12:06 PM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: This simple program reads from psample and prints the packets to stdout. It's useful for quickly collecting sampled packets. See some comments below, did not review the actual sample application

Re: [ovs-dev] [RFC 03/11] ofproto: Add ofproto-dpif-psample.

2024-05-13 Thread Adrian Moreno
On 5/10/24 12:06 PM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: Add a new resource in ofproto-dpif and the corresponding API in ofproto_provider.h to represent and change psample configuration. See comments below. //Eelco Signed-off-by: Adrian Moreno

Re: [ovs-dev] [RFC 04/11] vswitchd: Add psample to schema and configure it.

2024-05-13 Thread Adrian Moreno
On 5/10/24 12:06 PM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: Add a psample_group field to the Flow Sample Collector Set table and use it to configure the psample ofproto layer. See comments below, Eelco Signed-off-by: Adrian Moreno --- vswitchd/bridge.c

Re: [ovs-dev] [RFC 05/11] ofproto_dpif_xlate: Use psample for OFP samples.

2024-05-10 Thread Adrian Moreno
On 5/10/24 12:06 PM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: When a OFP_SAMPLE action is xlated and a dpif_psample object has been configured (via Flow_Sample_Collector_Set table) with the same collector_set_id, add psample information to the odp sample action

Re: [ovs-dev] [RFC 02/11] ofproto_dpif: Check for psample support.

2024-05-10 Thread Adrian Moreno
On 5/10/24 12:06 PM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: Only kernel datapath supports psample so check that the datapath is not userspace and that it accepts the new attributes. Signed-off-by: Adrian Moreno --- ofproto/ofproto-dpif.c | 59

Re: [ovs-dev] [RFC 01/11] odp-util: Add support to new psample uAPI.

2024-05-10 Thread Adrian Moreno
On 5/10/24 12:06 PM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: The new odp sample attributes allow userspace to specify a group_id and user-defined cookie to be passed down to psample. Add support for parsing and formatting such action. Signed-off-by: Adrian

Re: [ovs-dev] [RFC 00/11] Add psample support to NXAST_SAMPLE action.

2024-05-10 Thread Adrian Moreno
On 5/10/24 9:14 AM, Eelco Chaudron wrote: On 24 Apr 2024, at 21:53, Adrian Moreno wrote: This is the userspace counterpart of the work being done in the kernel [1]. Sending it as RFC to get some early feedback on the overall solution. ** Problem description ** Currently, OVS supports

[ovs-dev] [PATCH v4 12/12] documentation: Document ovs-flowviz.

2024-05-07 Thread Adrian Moreno
Add a man page for ovs-flowviz as well as a topic page with some more detailed examples. Signed-off-by: Adrian Moreno --- Documentation/automake.mk | 4 +- Documentation/conf.py | 2 + Documentation/ref/index.rst | 1 + Documentation

[ovs-dev] [PATCH v4 11/12] python: ovs: flowviz: Support html dark style.

2024-05-07 Thread Adrian Moreno
In order to support dark style in html outputs, allow the config file to express the background color and set it in a top style object. Acked-by: Eelco Chaudron Signed-off-by: Adrian Moreno --- python/ovs/flowviz/html_format.py | 4 +++- python/ovs/flowviz/odp/html.py | 30

[ovs-dev] [PATCH v4 09/12] python: ovs: flowviz: Add datapath html format.

2024-05-07 Thread Adrian Moreno
ovs-flowviz -f "output.port=3" datapath html > /tmp/flows.html Acked-by: Eelco Chaudron Signed-off-by: Adrian Moreno --- python/automake.mk | 1 + python/ovs/flowviz/odp/cli.py | 10 ++ python/ovs/flowviz/odp/html.py | 259 + 3 fi

[ovs-dev] [PATCH v4 10/12] python: ovs: flowviz: Add datapath graph format.

2024-05-07 Thread Adrian Moreno
with both the html flows and the graph (in svg) that enables navegation. Examples: $ ovs-appctl dpctl/dump-flows -m | ovs-flowviz datapath graph | dot -Tpng -o graph.png $ ovs-appctl dpctl/dump-flows -m | ovs-flowviz datapath graph --html > flows.html Acked-by: Eelco Chaudron Signed-off-by: Adr

[ovs-dev] [PATCH v4 03/12] python: ovs: flowviz: Add console formatting.

2024-05-07 Thread Adrian Moreno
apath console - Quickly detect where most packets are going using heatmap and paginated output: $ ovs-ofctl dump-flows br-int | ovs-flowviz openflow console -h [1] https://rich.readthedocs.io/en/stable/introduction.html Signed-off-by: Adrian Moreno --- python/automake.mk| 2

[ovs-dev] [PATCH v4 07/12] python: ovs: flowviz: Add OpenFlow logical view.

2024-05-07 Thread Adrian Moreno
ow logic $ ovs-ofctl dump-flows br-int | ovs-flowviz openflow logic -s -h $ export OVN_NB_DB=... $ export OVN_SB_DB=... $ ovs-ofctl dump-flows br-int | ovs-flowviz openflow logic -d $ ovs-ofctl dump-flows br-int | ovs-flowviz openflow logic -d --ovn-filter="acl.*icmp4" Acked-by: Eelco C

[ovs-dev] [PATCH v4 06/12] python: ovs: flowviz: Add datapath tree format.

2024-05-07 Thread Adrian Moreno
low the sequence of related actions. - full-tree filtering: if a user specifies a filter, an entire subtree is filtered out if none of its branches satisfy it. Acked-by: Eelco Chaudron Signed-off-by: Adrian Moreno --- python/automake.mk | 1 + python/ovs/flowviz/console.py | 21

[ovs-dev] [PATCH v4 08/12] python: ovs: flowviz: Add Openflow cookie format.

2024-05-07 Thread Adrian Moreno
=... $ ovs-vsctl dump-flows br-int | ovs-flowviz openflow cookie --ovn-filter="acl.*icmp4" $ ovs-vsctl dump-flows br-int | ovs-flowviz openflow cookie --ovn-detrace Acked-by: Eelco Chaudron Signed-off-by: Adrian Moreno --- python/ovs/flowviz/ofp/cli.py | 57 +-

[ovs-dev] [PATCH v4 02/12] python: ovs: flowviz: Add file processing infra.

2024-05-07 Thread Adrian Moreno
$ ovs-ofctl dump-flows br-int > flows.txt && ovs-flowviz -i flows.txt openflow json $ ovs-ofctl appctl dpctl/dump-flows | ovs-flowviz -f 'ct' datapath json $ ovs-ofctl appctl dpctl/dump-flows > flows.txt && ovs-flowviz -i flows.txt -f 'drop' datapath json Signed-off-by

[ovs-dev] [PATCH v4 04/12] python: ovs: flowviz: Add default config file.

2024-05-07 Thread Adrian Moreno
It has two basic styles defined: "dark" and "light" intended for dark and light terminals. Examples: $ ovs-flowviz -i /tmp/dpflows --style=dark datapath console $ ovs-flowviz -i /tmp/ofpflows --style=light openflow console Acked-by: Eelco Chaudron Signed-off-by: Adrian

[ovs-dev] [PATCH v4 05/12] python: ovs: flowviz: Add html formatting.

2024-05-07 Thread Adrian Moreno
tml Acked-by: Eelco Chaudron Signed-off-by: Adrian Moreno --- python/automake.mk | 3 +- python/ovs/flowviz/html_format.py | 136 python/ovs/flowviz/ofp/cli.py | 10 ++ python/ovs/flowviz/ofp/html.py | 80 python/ovs/f

[ovs-dev] [PATCH v4 01/12] python: ovs: Add flowviz scheleton.

2024-05-07 Thread Adrian Moreno
Signed-off-by: Adrian Moreno --- python/automake.mk | 14 --- python/ovs/flowviz/__init__.py | 0 python/ovs/flowviz/main.py | 40 ++ python/ovs/flowviz/odp/__init__.py | 0 python/ovs/flowviz/ofp/__init__.py | 0 python/ovs/flowviz/o

[ovs-dev] [PATCH v4 00/12] Add flow visualization utility.

2024-05-07 Thread Adrian Moreno
RFC -> V1: - Addressed Eelco's comments - Added a documentation page - Added support for dark style HTML pages - Patch 3. Small fix in the way a style is looked up. Use the key in the KV instead of the metadata string. This helps with "free" values such as "output". Adrian M

Re: [ovs-dev] [PATCH net-next 6/8] net:openvswitch: add psample support

2024-05-07 Thread Adrian Moreno
On 5/3/24 11:43 AM, Eelco Chaudron wrote: On 24 Apr 2024, at 15:50, Adrian Moreno wrote: Add support for psample sampling via two new attributes to the OVS_ACTION_ATTR_SAMPLE action. OVS_SAMPLE_ATTR_PSAMPLE_GROUP used to pass an integer psample group_id. OVS_SAMPLE_ATTR_PSAMPLE_COOKIE

Re: [ovs-dev] [PATCH] utilities: Correct deletion reason in flow_reval_monitor.py.

2024-05-03 Thread Adrian Moreno
quot;, -"Too expensive to revalidate", "Purged with user action", +"Too expensive to revalidate", "Flow state inconsistent after updates", "Flow translation error", ] Reviewed-by: Adrian Moreno

Re: [ovs-dev] [PATCH] ofproto-dpif-trace: Fix access to an out-of-scope stack memory.

2024-05-03 Thread Adrian Moreno
t| 22 ++ 3 files changed, 25 insertions(+), 2 deletions(-) Reviewed-by: Adrian Moreno diff --git a/ofproto/ofproto-dpif-trace.c b/ofproto/ofproto-dpif-trace.c index 87506aa78..e43d9f88c 100644 --- a/ofproto/ofproto-dpif-trace.c +++ b/ofproto/ofproto-dpif-trace.c @@

[ovs-dev] [RFC 11/11] tests: Add test for sample offloading.

2024-04-24 Thread Adrian Moreno
Signed-off-by: Adrian Moreno --- tests/system-common-macros.at| 4 +++ tests/system-offloads-traffic.at | 53 2 files changed, 57 insertions(+) diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at index 2a68cd664..860d6a8c9 100644

[ovs-dev] [RFC 08/11] netdev-offload-tc: Add sample support.

2024-04-24 Thread Adrian Moreno
Offload the sample action if it contains psample information by creating a tc "sample" action with the user cookie inside the action's cookie. Avoid using the "sample" action's cookie to store the ufid. Signed-off-by: Adrian Moreno --- include/linux/automake.mk|

[ovs-dev] [RFC 10/11] ofproto-dpif-psample: Add command to show stats.

2024-04-24 Thread Adrian Moreno
Signed-off-by: Adrian Moreno --- ofproto/ofproto-dpif-psample.c | 59 ++ ofproto/ofproto-dpif-psample.h | 1 + ofproto/ofproto-dpif.c | 1 + 3 files changed, 61 insertions(+) diff --git a/ofproto/ofproto-dpif-psample.c b/ofproto/ofproto-dpif-psample.c

[ovs-dev] [RFC 06/11] utilities: Add ovs-psample.

2024-04-24 Thread Adrian Moreno
This simple program reads from psample and prints the packets to stdout. It's useful for quickly collecting sampled packets. Signed-off-by: Adrian Moreno --- Documentation/automake.mk | 1 + Documentation/conf.py | 2 + Documentation/ref/index.rst | 1

[ovs-dev] [RFC 09/11] ofproto-dpif-xlate-cache: Add psample to xcache.

2024-04-24 Thread Adrian Moreno
Add a cache entry type for psample objects. Store both the dpif_psample reference and the collector_set_id so we can quickly find the particular exporter. Using that mechanism, account for packet and byte statistics. Signed-off-by: Adrian Moreno --- ofproto/ofproto-dpif-psample.c | 20

[ovs-dev] [RFC 03/11] ofproto: Add ofproto-dpif-psample.

2024-04-24 Thread Adrian Moreno
Add a new resource in ofproto-dpif and the corresponding API in ofproto_provider.h to represent and change psample configuration. Signed-off-by: Adrian Moreno --- ofproto/automake.mk| 2 + ofproto/ofproto-dpif-psample.c | 167 + ofproto/ofproto-dpif

[ovs-dev] [RFC 05/11] ofproto_dpif_xlate: Use psample for OFP samples.

2024-04-24 Thread Adrian Moreno
When a OFP_SAMPLE action is xlated and a dpif_psample object has been configured (via Flow_Sample_Collector_Set table) with the same collector_set_id, add psample information to the odp sample action. Signed-off-by: Adrian Moreno --- ofproto/ofproto-dpif-psample.c | 20 + ofproto/ofproto

[ovs-dev] [RFC 07/11] netlink-offload-tc: Rename act_cookie->flow_cookie.

2024-04-24 Thread Adrian Moreno
In preparation to allowing certain actions to have a cookie that does not represent the entire flow, rename flower->act_cookie to flower->flow_cookie. This patch does not introduce any behavioral change, it's just a variable renaming. Signed-off-by: Adrian Moreno --- lib/netdev-offloa

[ovs-dev] [RFC 01/11] odp-util: Add support to new psample uAPI.

2024-04-24 Thread Adrian Moreno
The new odp sample attributes allow userspace to specify a group_id and user-defined cookie to be passed down to psample. Add support for parsing and formatting such action. Signed-off-by: Adrian Moreno --- include/linux/openvswitch.h | 49 +--- lib/odp-execute.c| 3

[ovs-dev] [RFC 04/11] vswitchd: Add psample to schema and configure it.

2024-04-24 Thread Adrian Moreno
Add a psample_group field to the Flow Sample Collector Set table and use it to configure the psample ofproto layer. Signed-off-by: Adrian Moreno --- vswitchd/bridge.c | 54 ++ vswitchd/vswitch.ovsschema | 7 - vswitchd/vswitch.xml | 32

[ovs-dev] [RFC 00/11] Add psample support to NXAST_SAMPLE action.

2024-04-24 Thread Adrian Moreno
patchwork.kernel.org/project/netdevbpf/list/?series=847473 Adrian Moreno (11): odp-util: Add support to new psample uAPI. ofproto_dpif: Check for psample support. ofproto: Add ofproto-dpif-psample. vswitchd: Add psample to schema and configure it. ofproto_dpif_xlate: Use psample for OFP sampl

[ovs-dev] [RFC 02/11] ofproto_dpif: Check for psample support.

2024-04-24 Thread Adrian Moreno
Only kernel datapath supports psample so check that the datapath is not userspace and that it accepts the new attributes. Signed-off-by: Adrian Moreno --- ofproto/ofproto-dpif.c | 59 ++ ofproto/ofproto-dpif.h | 6 - 2 files changed, 64 insertions

[ovs-dev] [PATCH net-next 8/8] selftests: openvswitch: add psample test

2024-04-24 Thread Adrian Moreno
ction (via refactoring the one in sample). Signed-off-by: Adrian Moreno --- .../selftests/net/openvswitch/openvswitch.sh | 97 +- .../selftests/net/openvswitch/ovs-dpctl.py| 167 ++ 2 files changed, 231 insertions(+), 33 deletions(-) diff --git a/tools/testing/sel

[ovs-dev] [PATCH net-next 6/8] net:openvswitch: add psample support

2024-04-24 Thread Adrian Moreno
. The presence of a group_id mandates that the action shall called the psample module to multicast the packet with such group_id and the user-provided cookie if present. This behavior is orthonogal to also executing the nested actions if present. Signed-off-by: Adrian Moreno --- Documentation/netlink

[ovs-dev] [PATCH net-next 7/8] selftests: openvswitch: add sample action.

2024-04-24 Thread Adrian Moreno
Add sample action support to ovs-dpctl.py. Signed-off-by: Adrian Moreno --- .../selftests/net/openvswitch/ovs-dpctl.py| 96 ++- 1 file changed, 95 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py b/tools/testing/selftests/net

[ovs-dev] [PATCH net-next 0/8] net: openvswitch: Add sample multicasting.

2024-04-24 Thread Adrian Moreno
ple arguments. - Extend psample and tc with a user-defined cookie. - Add a tracepoint to psample to facilitate troubleshooting. rfc_v1 -> rfc_v2: - Use psample instead of a new OVS-only multicast group. - Extend psample and tc with a user-defined cookie. Adrian Moreno (8): net: netlink: expor

[ovs-dev] [PATCH net-next] selftests: openvswitch: Fix escape chars in regexp.

2024-04-16 Thread Adrian Moreno
de characters. An example of these warnings: tools/testing/selftests/net/openvswitch/ovs-dpctl.py:505: SyntaxWarning: invalid escape sequence '\d' Fix all the warnings by flagging literals as raw strings. Signed-off-by: Adrian Moreno --- .../selftests/net/openvswitch/ovs-dpctl.

Re: [ovs-dev] [PATCH v3 12/12] documentation: Document ovs-flowviz.

2024-04-14 Thread Adrian Moreno
On 4/12/24 11:10, Eelco Chaudron wrote: On 9 Apr 2024, at 9:06, Adrian Moreno wrote: Add a man page for ovs-flowviz as well as a topic page with some more detailed examples. Signed-off-by: Adrian Moreno In addition to Ilya’s comments, find 3 small comments below. The rest looks good

Re: [ovs-dev] [PATCH v29 0/8] Add offload support for sFlow

2024-04-09 Thread Adrian Moreno
On 3/26/24 03:30, Chris Mi via dev wrote: This patch set adds offload support for sFlow. Psample is a genetlink channel for packet sampling. TC action act_sample uses psample to send sampled packets to userspace. When offloading sample action to TC, userspace creates a unique ID to map sFlow

[ovs-dev] [PATCH] checkpatch: Allow rST manpages to be added.

2024-04-09 Thread Adrian Moreno
-flowviz.8.rst not listed in Documentation/automake.mk """ Fix it by making the {dir}/ part of the docre regexp optional. Signed-off-by: Adrian Moreno --- utilities/checkpatch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/checkpatch.py b/utilities/checkpa

Re: [ovs-dev] [PATCH v3 12/12] documentation: Document ovs-flowviz.

2024-04-09 Thread Adrian Moreno
On 4/9/24 09:06, Adrian Moreno wrote: Add a man page for ovs-flowviz as well as a topic page with some more detailed examples. Signed-off-by: Adrian Moreno --- Documentation/automake.mk | 4 +- Documentation/conf.py | 2 + Documentation/ref

[ovs-dev] [PATCH v3 12/12] documentation: Document ovs-flowviz.

2024-04-09 Thread Adrian Moreno
Add a man page for ovs-flowviz as well as a topic page with some more detailed examples. Signed-off-by: Adrian Moreno --- Documentation/automake.mk | 4 +- Documentation/conf.py | 2 + Documentation/ref/index.rst | 1 + Documentation

[ovs-dev] [PATCH v3 10/12] python: ovs: flowviz: Add datapath graph format.

2024-04-09 Thread Adrian Moreno
with both the html flows and the graph (in svg) that enables navegation. Examples: $ ovs-appctl dpctl/dump-flows -m | ovs-flowviz datapath graph | dot -Tpng -o graph.png $ ovs-appctl dpctl/dump-flows -m | ovs-flowviz datapath graph --html > flows.html Acked-by: Eelco Chaudron Signed-off-by: Adr

[ovs-dev] [PATCH v3 02/12] python: ovs: flowviz: Add file processing infra.

2024-04-09 Thread Adrian Moreno
$ ovs-ofctl dump-flows br-int > flows.txt && ovs-flowviz -i flows.txt openflow json $ ovs-ofctl appctl dpctl/dump-flows | ovs-flowviz -f 'ct' datapath json $ ovs-ofctl appctl dpctl/dump-flows > flows.txt && ovs-flowviz -i flows.txt -f 'drop' datapath json Signed-off-by

[ovs-dev] [PATCH v3 09/12] python: ovs: flowviz: Add datapath html format.

2024-04-09 Thread Adrian Moreno
ovs-flowviz -f "output.port=3" datapath html > /tmp/flows.html Acked-by: Eelco Chaudron Signed-off-by: Adrian Moreno --- python/automake.mk | 1 + python/ovs/flowviz/odp/cli.py | 10 ++ python/ovs/flowviz/odp/html.py | 259 + 3 fi

[ovs-dev] [PATCH v3 11/12] python: ovs: flowviz: Support html dark style.

2024-04-09 Thread Adrian Moreno
In order to support dark style in html outputs, allow the config file to express the background color and set it in a top style object. Acked-by: Eelco Chaudron Signed-off-by: Adrian Moreno --- python/ovs/flowviz/html_format.py | 4 +++- python/ovs/flowviz/odp/html.py | 30

[ovs-dev] [PATCH v3 07/12] python: ovs: flowviz: Add OpenFlow logical view.

2024-04-09 Thread Adrian Moreno
ow logic $ ovs-ofctl dump-flows br-int | ovs-flowviz openflow logic -s -h $ export OVN_NB_DB=... $ export OVN_SB_DB=... $ ovs-ofctl dump-flows br-int | ovs-flowviz openflow logic -d $ ovs-ofctl dump-flows br-int | ovs-flowviz openflow logic -d --ovn-filter="acl.*icmp4" Acked-by: Eelco C

[ovs-dev] [PATCH v3 06/12] python: ovs: flowviz: Add datapath tree format.

2024-04-09 Thread Adrian Moreno
low the sequence of related actions. - full-tree filtering: if a user specifies a filter, an entire subtree is filtered out if none of its branches satisfy it. Acked-by: Eelco Chaudron Signed-off-by: Adrian Moreno --- python/automake.mk | 1 + python/ovs/flowviz/console.py | 21

[ovs-dev] [PATCH v3 08/12] python: ovs: flowviz: Add Openflow cookie format.

2024-04-09 Thread Adrian Moreno
=... $ ovs-vsctl dump-flows br-int | ovs-flowviz openflow cookie --ovn-filter="acl.*icmp4" $ ovs-vsctl dump-flows br-int | ovs-flowviz openflow cookie --ovn-detrace Acked-by: Eelco Chaudron Signed-off-by: Adrian Moreno --- python/ovs/flowviz/ofp/cli.py | 57 +-

[ovs-dev] [PATCH v3 05/12] python: ovs: flowviz: Add html formatting.

2024-04-09 Thread Adrian Moreno
tml Acked-by: Eelco Chaudron Signed-off-by: Adrian Moreno --- python/automake.mk | 3 +- python/ovs/flowviz/html_format.py | 136 python/ovs/flowviz/ofp/cli.py | 10 ++ python/ovs/flowviz/ofp/html.py | 80 python/ovs/f

[ovs-dev] [PATCH v3 04/12] python: ovs: flowviz: Add default config file.

2024-04-09 Thread Adrian Moreno
It has two basic styles defined: "dark" and "light" intended for dark and light terminals. Examples: $ ovs-flowviz -i /tmp/dpflows --style=dark datapath console $ ovs-flowviz -i /tmp/ofpflows --style=light openflow console Acked-by: Eelco Chaudron Signed-off-by: Adrian

[ovs-dev] [PATCH v3 01/12] python: ovs: Add flowviz scheleton.

2024-04-09 Thread Adrian Moreno
Signed-off-by: Adrian Moreno --- python/automake.mk | 14 --- python/ovs/flowviz/__init__.py | 0 python/ovs/flowviz/main.py | 40 ++ python/ovs/flowviz/odp/__init__.py | 0 python/ovs/flowviz/ofp/__init__.py | 0 python/ovs/flowviz/o

[ovs-dev] [PATCH v3 03/12] python: ovs: flowviz: Add console formatting.

2024-04-09 Thread Adrian Moreno
apath console - Quickly detect where most packets are going using heatmap and paginated output: $ ovs-ofctl dump-flows br-int | ovs-flowviz openflow console -h [1] https://rich.readthedocs.io/en/stable/introduction.html Signed-off-by: Adrian Moreno --- python/automake.mk| 2

[ovs-dev] [PATCH v3 00/12] Add flow visualization utility.

2024-04-09 Thread Adrian Moreno
dded support for dark style HTML pages - Patch 3. Small fix in the way a style is looked up. Use the key in the KV instead of the metadata string. This helps with "free" values such as "output". Adrian Moreno (12): python: ovs: Add flowviz scheleton. python: ovs: fl

Re: [ovs-dev] [PATCH v2 03/12] python: ovs: flowviz: Add console formatting.

2024-03-15 Thread Adrian Moreno
On 3/15/24 12:29, Eelco Chaudron wrote: On 13 Mar 2024, at 10:03, Adrian Moreno wrote: Add a flow formatting framework and one implementation for console printing using rich. The flow formatting framework is a simple set of classes that can be used to write different flow formatting

  1   2   3   4   5   6   7   8   9   >