[ovs-dev] [PATCH AUTOSEL 6.6 09/12] selftests: openvswitch: Set value to nla flags.

2024-06-30 Thread Sasha Levin
From: Adrian Moreno [ Upstream commit a876349d21b570b26160d0a5e0a2ee529d22 ] Netlink flags, although they don't have payload at the netlink level, are represented as having "True" as value in pyroute2. Without it, trying to add a flow with a flag-type action (e.g: pop_vlan) fails with the f

[ovs-dev] [PATCH AUTOSEL 6.9 13/20] selftests: openvswitch: Set value to nla flags.

2024-06-30 Thread Sasha Levin
From: Adrian Moreno [ Upstream commit a876349d21b570b26160d0a5e0a2ee529d22 ] Netlink flags, although they don't have payload at the netlink level, are represented as having "True" as value in pyroute2. Without it, trying to add a flow with a flag-type action (e.g: pop_vlan) fails with the f

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

2024-06-30 Thread Adrian Moreno
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. Signed-off-by: Adrian Moreno --- .../selftests/net/openvswitch/openvswitch.sh | 115 +- .../selftests

[ovs-dev] [PATCH net-next v7 09/10] selftests: openvswitch: parse trunc action

2024-06-30 Thread Adrian Moreno
The trunc action was supported decode-able but not parse-able. Add support for parsing the action string. Reviewed-by: Aaron Conole Signed-off-by: Adrian Moreno --- .../testing/selftests/net/openvswitch/ovs-dpctl.py | 13 + 1 file changed, 13 insertions(+) diff --git a/tools/testi

[ovs-dev] [PATCH net-next v7 08/10] selftests: openvswitch: add userspace parsing

2024-06-30 Thread Adrian Moreno
The userspace action lacks parsing support plus it contains a bug in the name of one of its attributes. This patch makes userspace action work. Reviewed-by: Aaron Conole Signed-off-by: Adrian Moreno --- .../selftests/net/openvswitch/ovs-dpctl.py| 24 +-- 1 file changed, 22

[ovs-dev] [PATCH net-next v7 07/10] selftests: openvswitch: add psample action

2024-06-30 Thread Adrian Moreno
Add sample and psample 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 a/tools

[ovs-dev] [PATCH net-next v7 06/10] net: openvswitch: store sampling probability in cb.

2024-06-30 Thread Adrian Moreno
When a packet sample is observed, the sampling rate that was used is important to estimate the real frequency of such event. Store the probability of the parent sample action in the skb's cb area and use it in psample action to pass it down to psample module. Acked-by: Eelco Chaudron Reviewed-by

[ovs-dev] [PATCH net-next v7 05/10] net: openvswitch: add psample action

2024-06-30 Thread Adrian Moreno
Add support for a new action: psample. 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. The maximum length of the user-defined cookie is set to 16, same as tc_cookie, to discourage using cookies th

[ovs-dev] [PATCH net-next v7 04/10] net: psample: allow using rate as probability

2024-06-30 Thread Adrian Moreno
Although not explicitly documented in the psample module itself, the definition of PSAMPLE_ATTR_SAMPLE_RATE seems inherited from act_sample. Quoting tc-sample(8): "RATE of 100 will lead to an average of one sampled packet out of every 100 observed." With this semantics, the rates that we can expr

[ovs-dev] [PATCH net-next v7 03/10] net: psample: skip packet copy if no listeners

2024-06-30 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. Acked-by: Eelco Chaudron Reviewed-by: Ido Schimmel Reviewed-by: Simon Horman Signed-off-by: Adrian Moreno --- net/psample/psample.

[ovs-dev] [PATCH net-next v7 02/10] net: sched: act_sample: add action cookie to sample

2024-06-30 Thread Adrian Moreno
If the action has a user_cookie, pass it along to the sample so it can be easily identified. Acked-by: Eelco Chaudron Reviewed-by: Ido Schimmel 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

[ovs-dev] [PATCH net-next v7 01/10] net: psample: add user cookie

2024-06-30 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. Acked-by: Eelco Chaudron Reviewed-by: Simon Horman Reviewed-by: Ido Schimmel Signed-off-by: Adrian

[ovs-dev] [PATCH net-next v7 00/10] net: openvswitch: Add sample multicasting.

2024-06-30 Thread Adrian Moreno
** Background ** Currently, OVS supports several packet sampling mechanisms (sFlow, per-bridge IPFIX, per-flow IPFIX). These end up being translated into a userspace action that needs to be handled by ovs-vswitchd's handler threads only to be forwarded to some third party application that will some

[ovs-dev] [PATCH v4 ovn] northd: Add bfd, static_routes and route_policies I-P nodes.

2024-06-30 Thread Lorenzo Bianconi
Introduce bfd, static_routes and route_policies nodes to northd I-P engine to track bfd connections and northd static_route/policy_route changes. Reported-at: https://issues.redhat.com/browse/FDP-600 Signed-off-by: Lorenzo Bianconi --- Changes since v3: - fix bfd_northd_change_handler logic - fix