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

2024-06-17 Thread Adrián Moreno
On Fri, Jun 14, 2024 at 01:07:33PM GMT, Aaron Conole wrote: > Adrian Moreno writes: > > > Add a test to verify sampling packets via psample works. > > > > In order to do that, create a subcommand in ovs-dpctl.py to listen to > > on the psample multicast group and print samples. > > > > In order to

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

2024-06-17 Thread Adrián Moreno
On Fri, Jun 14, 2024 at 12:55:59PM GMT, Aaron Conole wrote: > Adrian Moreno writes: > > > 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. > > What does that

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

2024-06-16 Thread Adrián Moreno
On Fri, Jun 14, 2024 at 05:11:30PM GMT, Simon Horman wrote: > On Mon, Jun 03, 2024 at 08:56:38PM +0200, Adrian Moreno wrote: > > Although not explicitly documented in the psample module itself, the > > definition of PSAMPLE_ATTR_SAMPLE_RATE seems inherited from act_sample. > > > > Quoting tc-sample

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

2024-06-11 Thread Adrián Moreno
On Tue, Jun 11, 2024 at 09:54:49AM GMT, Aaron Conole wrote: > Adrián Moreno writes: > > > On Mon, Jun 10, 2024 at 11:46:14AM GMT, Aaron Conole wrote: > >> Adrian Moreno writes: > >> > >> > Add support for a new action: emit_sample. > >> > &g

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

2024-06-11 Thread Adrián Moreno
On Mon, Jun 03, 2024 at 03:02:46PM GMT, Aaron Conole wrote: > Adrian Moreno writes: > > > Netlink flags, although they don't have payload at the netlink level, > > are represented as having a "True" value in pyroute2. > > > > Without it, trying to add a flow with a flag-type action (e.g: pop_vlan)

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

2024-06-11 Thread Adrián Moreno
On Mon, Jun 10, 2024 at 11:46:14AM GMT, Aaron Conole wrote: > Adrian Moreno writes: > > > Add support for a new action: emit_sample. > > > > This action accepts a u32 group id and a variable-length cookie and uses > > the psample multicast group to make the packet available for > > observability.

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

2024-06-10 Thread Adrián Moreno
On Wed, Jun 05, 2024 at 08:43:14PM GMT, Simon Horman wrote: > On Mon, Jun 03, 2024 at 08:56:43PM +0200, Adrian Moreno wrote: > > Add a test to verify sampling packets via psample works. > > > > In order to do that, create a subcommand in ovs-dpctl.py to listen to > > on the psample multicast group

Re: [ovs-dev] [BUG][revalidator] ovs crash and could NOT fix again after set request_mtu

2024-06-10 Thread Adrián Moreno
On Mon, Jun 03, 2024 at 10:18:05AM GMT, Simon Jones wrote: > In ovs code, bridge_reconfigure function should ONLY be called in > ovs-vswitchd thread. > > But how about this case: > - ovs-vswitchd is starting, the ovs-vswitch thread calls bridge_reconfigure > function. > - at the same time, ovs-vsct

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

2024-06-07 Thread Adrián Moreno
On Fri, Jun 07, 2024 at 08:57:11AM GMT, Eelco Chaudron wrote: > > > On 5 Jun 2024, at 15:51, Adrian Moreno wrote: > > > 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

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

2024-06-06 Thread Adrián Moreno
On Thu, Jun 06, 2024 at 06:00:26PM GMT, Ilya Maximets wrote: > On 6/6/24 17:15, Adrian Moreno wrote: > > 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 >

Re: [ovs-dev] [PATCH ovn v4] Text respresntations for drop sampling.

2024-06-06 Thread Adrián Moreno
On Mon, Jun 03, 2024 at 03:47:25PM GMT, Jacob Tanenbaum wrote: > Created a new column in the southbound database to hardcode a human readable > description for flows. This first use is describing why the flow is dropping > packets. > The new column is called flow_desc and will create southbound da

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

2024-06-06 Thread Adrián Moreno
On Mon, Jun 03, 2024 at 03:00:03PM GMT, Aaron Conole wrote: > Adrian Moreno writes: > > > 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 iterati

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

2024-06-06 Thread Adrián Moreno
On Wed, Jun 05, 2024 at 10:23:32PM GMT, Adrian Moreno wrote: > Add as new column in the Flow_Sample_Collector_Set table named > "local_sample_group" which enables this feature. > > Signed-off-by: Adrian Moreno Ugh...It seems a merge conflict with the NEWS file is breaking robot builds. > --- >

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

2024-06-06 Thread Adrián Moreno
On Wed, Jun 05, 2024 at 08:51:17PM GMT, Simon Horman wrote: > On Mon, Jun 03, 2024 at 08:56:39PM +0200, Adrian Moreno wrote: > > Add support for a new action: emit_sample. > > > > This action accepts a u32 group id and a variable-length cookie and uses > > the psample multicast group to make the pa

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

2024-06-05 Thread Adrián Moreno
On Tue, Jun 04, 2024 at 04:49:39PM GMT, kernel test robot wrote: > Hi Adrian, > > kernel test robot noticed the following build errors: > > [auto build test ERROR on net-next/main] > > url: > https://github.com/intel-lab-lkp/linux/commits/Adrian-Moreno/net-psample-add-user-cookie/20240604-03005

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

2024-06-05 Thread Adrián Moreno
On Wed, Jun 05, 2024 at 08:29:22AM GMT, kernel test robot wrote: > Hi Adrian, > > kernel test robot noticed the following build errors: > > [auto build test ERROR on net-next/main] > > url: > https://github.com/intel-lab-lkp/linux/commits/Adrian-Moreno/net-psample-add-user-cookie/20240604-03005

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

2024-06-05 Thread Adrián Moreno
On Wed, Jun 05, 2024 at 12:25:21PM GMT, Ilya Maximets wrote: > On 6/5/24 10:18, Adrian Moreno wrote: > > 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 warnin

Re: [ovs-dev] [PATCH] ofproto: Add upcall/dump-ufid-rules command to map UFIDs to OpenFlow.

2024-06-04 Thread Adrián Moreno
On Tue, Jun 04, 2024 at 12:05:20AM GMT, Dumitru Ceara wrote: > It improves the debugging experience if we can easily get a list of > OpenFlow rules and groups that contribute to the creation of a datapath > flow. > > The suggested workflow is: > a. dump datapath flows (along with UUIDs), this also

Re: [ovs-dev] [BUG] [ovs-2.17.1] [ovs-vswitchd] Miss setting port number in openflow while delete port and add port

2024-05-27 Thread Adrián Moreno
On Thu, May 23, 2024 at 04:21:48PM GMT, Simon Jones wrote: > Hi all, > > I found a bug in OVS-DPDK(ovs-2.17.1, dpdk-21.11). > Which is Miss setting port number in openflow while delete port and add > port. Hi Simon. See my comments inline. > > 1. The process of problem is: > ``` > add bridge; >

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

2024-05-23 Thread Adrián Moreno
On Wed, May 22, 2024 at 03:26:05PM GMT, Aaron Conole wrote: > Ilya Maximets writes: > > > On 5/16/24 19:03, Adrian Moreno wrote: > >> > >> > >> 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

[ovs-dev] [PATCH v4] ipfix: make template and stats interval configurable

2023-02-24 Thread Adrián Moreno
From: Adrian Moreno Add options to the IPFIX table configure the interval to send statistics and template information. Reviewed-by: Simon Horman Signed-off-by: Adrian Moreno --- - v4: - Bump vswitchd's schema version to 8.4.0. - v3: - Removed unit tests which generate errors in Intel CI

[ovs-dev] [PATCH] ipfix: make template and stats interval configurable

2023-02-24 Thread Adrián Moreno
From: Adrian Moreno Add options to the IPFIX table configure the interval to send statistics and template information. Reviewed-by: Simon Horman Signed-off-by: Adrian Moreno --- - v4: - Bump vswitchd's schema version to 8.4.0. - v3: - Removed unit tests which generate errors in Intel CI

[ovs-dev] [PATCH 0/1] usdt-scripts: use ebpf to track upcall_cost

2023-02-24 Thread Adrián Moreno
I've been recently looking into upcall tracing inside OVS and its current challenges. The current implementation is available in utilities/usdt-scripts/upcall_cost.py. Essentially it collects all the events and collelates them in userspace after the data collection has ended. I have been working

[ovs-dev] [PATCH v3 2/2] ipfix: make template and stats interval configurable

2023-02-10 Thread Adrián Moreno
From: Adrian Moreno Add options to the IPFIX table configure the interval to send statistics and template information. Signed-off-by: Adrian Moreno --- - v3: - Removed unit tests which generate errors in Intel CI. Will submit in independent series. - v2: - Fixed a potential race cond

[ovs-dev] [PATCH v3 1/2] ofproto-ipfix: use per-domain template timeouts

2023-02-10 Thread Adrián Moreno
From: Adrian Moreno IPFIX templates have to be sent for each Observation Domain ID. Currently, a timer is kept at each dpif_ipfix_exporter to send them. This works fine for per-bridge sampling where there is only one Observation Domain ID per exporter. However, this is does not work for per-flow

[ovs-dev] [PATCH v2 1/2] ofproto-ipfix: use per-domain template timeouts

2023-01-24 Thread Adrián Moreno
From: Adrian Moreno IPFIX templates have to be sent for each Observation Domain ID. Currently, a timer is kept at each dpif_ipfix_exporter to send them. This works fine for per-bridge sampling where there is only one Observation Domain ID per exporter. However, this is does not work for per-flow

[ovs-dev] [PATCH v2 2/2] ipfix: make template and stats interval configurable

2023-01-24 Thread Adrián Moreno
From: Adrian Moreno Add options to the IPFIX table configure the interval to send statistics and template information. Signed-off-by: Adrian Moreno --- - v2: - Fixed a potential race condition in unit test. - v1: - Added unit test. --- NEWS | 2 ++ ofproto/ofproto

[ovs-dev] [PATCH ovn v1 2/6] northd: fix unsampled drops and unit test

2023-01-24 Thread Adrián Moreno
From: Adrian Moreno Some drops were left unsampled and a change in IFS made the test fail to detect them. This patch fixes it. Fixes: a42c808f30b4 ("northd: add drop sampling") Acked-by: Mark Michelson Signed-off-by: Adrian Moreno --- northd/northd.c | 17 ++--- tests/ovn.at|

[ovs-dev] [PATCH ovn v1 1/6] controller: fix recompute pflows if sampling changes

2023-01-24 Thread Adrián Moreno
From: Adrian Moreno The engine handler needs to return "false" in order to trigger a full recompute of the physical flows. Fixes: a42c808f30b4 ("northd: add drop sampling") Signed-off-by: Adrian Moreno --- controller/ovn-controller.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) dif

[ovs-dev] [PATCH ovn v1 5/6] controller: only sample flow if Collector Set exists

2023-01-24 Thread Adrián Moreno
From: Adrian Moreno Adding a OFPACT_SAMPLE action to a flow is useless (and even detrimental in terms of performance) if a Flow_Sample_Collector_Set row does not exist with the correspondent id. The sample (i.e: upcall) would take place but ovs-vswitchd would not have a target IPFIX collector to

[ovs-dev] [PATCH ovn v1 3/6] controller: add missing drop to loopback check table

2023-01-24 Thread Adrián Moreno
From: Adrian Moreno The drop was implicit (using empty actions). Make it explicit and sampled. Fixes: a42c808f30b4 ("northd: add drop sampling") Acked-by: Mark Michelson Signed-off-by: Adrian Moreno --- controller/physical.c | 1 + 1 file changed, 1 insertion(+) diff --git a/controller/physi

[ovs-dev] [PATCH ovn v1 0/6] drop sampling: Fixes and optimizations

2023-01-24 Thread Adrián Moreno
While testing, I discovered some problems with drop sampling (first 4 patches). Also, this series introduces an optimization. In order to avoid adding sample actions on Chassis that do not have a Flow_Sample_Collector_Set configured (which would generate a useless upcall), make the controller moni

[ovs-dev] [PATCH ovn v1 6/6] controller: only sample pflow if Collector Set exists

2023-01-24 Thread Adrián Moreno
From: Adrian Moreno Make physical (pflow) engine node also depend on Flow_Sample_Collector_Set table and only enable flow sampling if the right collector set exists. Signed-off-by: Adrian Moreno --- controller/ovn-controller.c | 104 ++-- 1 file changed, 75 inse

[ovs-dev] [PATCH ovn v1 4/6] controller: set sampling port to OFP_NONE for drops

2023-01-24 Thread Adrián Moreno
From: Adrian Moreno The default zero value would likely match an existing openflow port and end up generating a sample with wrong output interface information. Since in this case we're sampling in the middle of the pipeline, the correct value for sampling port is OFP_NONE. Fixes: a42c808f30b4 ("

[ovs-dev] [PATCH v1 1/2] ofproto-ipfix: use per-domain template timeouts

2023-01-16 Thread Adrián Moreno
From: Adrian Moreno IPFIX templates have to be sent for each Observation Domain ID. Currently, a timer is kept at each dpif_ipfix_exporter to send them. This works fine for per-bridge sampling where there is only one Observation Domain ID per exporter. However, this is does not work for per-flow

[ovs-dev] [PATCH v1 2/2] ipfix: make template and stats interval configurable

2023-01-16 Thread Adrián Moreno
From: Adrian Moreno Add options to the IPFIX table configure the interval to send statistics and template information. Signed-off-by: Adrian Moreno --- - v1: - Added unit test. --- NEWS | 2 ++ ofproto/ofproto-dpif-ipfix.c | 38 + ofproto

<    1   2