Re: [ovs-dev] [PATCH 5/5] ovsdb: raft: Fix inability to join after leadership change round trip.

2024-03-25 Thread Han Zhou
On Fri, Mar 15, 2024 at 1:15 PM Ilya Maximets wrote: > > Consider the following sequence of events: > > 1. Cluster with 2 nodes - A and B. A is a leader. > 2. C connects to A and sends a join request. > 3. A sends an append request to C. C is in CATCHUP phase for A. > 4. A looses leadership

Re: [ovs-dev] [PATCH 4/5] ovsdb: raft: Fix assertion when 1-node cluster looses leadership.

2024-03-25 Thread Han Zhou
On Fri, Mar 15, 2024 at 1:15 PM Ilya Maximets wrote: > > Some of the failure tests can make a single-node cluster to > loose leadership. In this case the next raft_run() will > trigger election with a pre-vore enabled. This is causing s/pre-vore/pre-vote > an assertion when this server

Re: [ovs-dev] [PATCH 3/5] ovsdb: raft: Fix permanent joining state on a cluster member.

2024-03-25 Thread Han Zhou
On Fri, Mar 15, 2024 at 1:15 PM Ilya Maximets wrote: > > Consider the following chain of events: > > 1. Have a cluster with 2 members - A and B. A is a leader. > 2. C connects to A, sends a request to join the cluster. > 3. A catches up C, creates an update for the 'servers' list and sends >

Re: [ovs-dev] [PATCH 2/5] ovsdb: raft: Fix time intervals for multitasking while joining.

2024-03-25 Thread Han Zhou
On Fri, Mar 15, 2024 at 1:15 PM Ilya Maximets wrote: > > While joining, ovsdb-server may not wake up for a duration of a join > timer, which is 1 second and is by default 3x larger than a heartbeat > timer. This is causing unnecessary warnings from the cooperative > multitasking module that

Re: [ovs-dev] [PATCH v29 8/8] system-offloads-traffic.at: Add sFlow offload test cases.

2024-03-25 Thread 0-day Robot
Bleep bloop. Greetings Chris Mi, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. checkpatch: WARNING: Line is 111 characters long (recommended limit is 79) #39 FILE:

[ovs-dev] [PATCH v29 8/8] system-offloads-traffic.at: Add sFlow offload test cases.

2024-03-25 Thread Chris Mi via dev
Add three sFlow offload test cases: 3: offloads - sflow with sampling=1 - offloads enabled ok 4: offloads - sflow with sampling=2 - offloads enabled ok 5: offloads - ping over vxlan tunnel with sflow - offloads enabled ok Signed-off-by: Chris Mi Reviewed-by: Roi Dayan Acked-by: Eelco

[ovs-dev] [PATCH v29 7/8] netdev-offload-tc: Add offload support for sFlow.

2024-03-25 Thread Chris Mi via dev
Create a unique group ID to map the sFlow info when offloading sample action to TC. When showing the offloaded datapath flows, translate the group ID from TC sample action to sFlow info using the mapping. Signed-off-by: Chris Mi Reviewed-by: Roi Dayan --- NEWS| 2 +

[ovs-dev] [PATCH v29 6/8] dpif-netlink: Add netdev offload recv in normal recv upcalls.

2024-03-25 Thread Chris Mi via dev
In thread handler 0, add netdev offload recv in normal recv upcalls. To avoid starvation, introduce a flag to alternate the order of receiving normal upcalls and offload upcalls based on that flag. Add similar change for recv_wait. Signed-off-by: Chris Mi Reviewed-by: Roi Dayan ---

[ovs-dev] [PATCH v29 4/8] netdev-offload-tc: Add sample offload API for TC.

2024-03-25 Thread Chris Mi via dev
Initialize psample socket. Add sample recv API to receive sampled packets from psample socket. Add sample recv wait API to add psample socket fd to poll list. Signed-off-by: Chris Mi Reviewed-by: Roi Dayan --- lib/dpif.h| 6 +- lib/flow.h| 2 +-

[ovs-dev] [PATCH v29 5/8] netdev-offload: Add netdev offload recv and recv_wait APIs.

2024-03-25 Thread Chris Mi via dev
Iterate each registered offload API. It's not a problem for today since we only have one implementation. Signed-off-by: Chris Mi Reviewed-by: Roi Dayan --- lib/netdev-offload.c | 38 ++ lib/netdev-offload.h | 5 + 2 files changed, 43 insertions(+) diff

[ovs-dev] [PATCH v29 3/8] netdev-offload-tc: Introduce group ID management API.

2024-03-25 Thread Chris Mi via dev
When offloading sample action to TC, userspace creates a unique ID to map sample action and tunnel info and passes this ID to kernel instead of the sample info. Kernel will send this ID and sampled packet to userspace. Using the ID, userspace can recover the sample info and send sampled packet to

[ovs-dev] [PATCH v29 1/8] compat: Add psample and tc sample action defines for older kernels.

2024-03-25 Thread Chris Mi via dev
Update kernel UAPI to support psample and the tc sample action. Signed-off-by: Chris Mi Reviewed-by: Roi Dayan Acked-by: Eelco Chaudron --- include/linux/automake.mk| 10 +++--- include/linux/psample.h | 62 include/linux/tc_act/tc_sample.h |

[ovs-dev] [PATCH v29 2/8] ovs-kmod-ctl: Load kernel module psample.

2024-03-25 Thread Chris Mi via dev
Load kernel module psample to receive sampled packets from TC. Before removing kernel module psample, remove act_sample first. Signed-off-by: Chris Mi Reviewed-by: Roi Dayan Acked-by: Eelco Chaudron --- utilities/ovs-kmod-ctl.in | 14 ++ 1 file changed, 14 insertions(+) diff

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

2024-03-25 Thread Chris Mi via dev
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 action and tunnel info and passes this ID to

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

2024-03-25 Thread Chris Mi via dev
On 6/24/2023 4:18 AM, Ilya Maximets wrote: On 6/19/23 07:05, Chris Mi 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,

Re: [ovs-dev] [PATCH v28 8/8] system-offloads-traffic.at: Add sFlow offload test cases

2024-03-25 Thread Chris Mi via dev
On 6/24/2023 4:18 AM, Ilya Maximets wrote: On 6/19/23 07:05, Chris Mi wrote: Add three sFlow offload test cases: 3: offloads - sflow with sampling=1 - offloads enabled ok 4: offloads - sflow with sampling=2 - offloads enabled ok 5: offloads - ping over vxlan tunnel with sflow -

Re: [ovs-dev] [PATCH v28 6/8] dpif-netlink: Add netdev offload recv in normal recv upcalls

2024-03-25 Thread Chris Mi via dev
On 6/24/2023 4:18 AM, Ilya Maximets wrote: On 6/19/23 07:05, Chris Mi wrote: In thread handler 0, add netdev offload recv in normal recv upcalls. To avoid starvation, introduce a flag to alternate the order of receiving normal upcalls and offload upcalls based on that flag. Add similar change

Re: [ovs-dev] [PATCH v28 7/8] netdev-offload-tc: Add offload support for sFlow

2024-03-25 Thread Chris Mi via dev
On 6/24/2023 4:18 AM, Ilya Maximets wrote: On 6/19/23 07:05, Chris Mi wrote: Create a unique group ID to map the sFlow info when offloading sample action to TC. When showing the offloaded datapath flows, translate the group ID from TC sample action to sFlow info using the mapping.

Re: [ovs-dev] [PATCH v28 5/8] netdev-offload: Add netdev offload recv and recv_wait APIs

2024-03-25 Thread Chris Mi via dev
On 6/24/2023 4:18 AM, Ilya Maximets wrote: On 6/19/23 07:05, Chris Mi wrote: Iterate each registered offload API. It's not a problem for today since we only have one implementation. Signed-off-by: Chris Mi Reviewed-by: Roi Dayan --- lib/netdev-offload.c | 38

Re: [ovs-dev] [PATCH v28 4/8] netdev-offload-tc: Add sample offload API for TC

2024-03-25 Thread Chris Mi via dev
On 6/24/2023 4:17 AM, Ilya Maximets wrote: On 6/19/23 07:05, Chris Mi wrote: Initialize psample socket. Add sample recv API to receive sampled packets from psample socket. Add sample recv wait API to add psample socket fd to poll list. Signed-off-by: Chris Mi Reviewed-by: Roi Dayan ---

Re: [ovs-dev] [PATCH v28 3/8] netdev-offload-tc: Introduce group ID management API

2024-03-25 Thread Chris Mi via dev
On 6/24/2023 4:17 AM, Ilya Maximets wrote: On 6/19/23 07:05, Chris Mi wrote: When offloading sample action to TC, userspace creates a unique ID to map sample action and tunnel info and passes this ID to kernel instead of the sample info. Kernel will send this ID and sampled packet to userspace.

Re: [ovs-dev] [PATCH] ofproto-dpif-upcall: Don't mirror packets that aren't modified.

2024-03-25 Thread Zhangweiwei
The ethernet addresses of two ICMP request packets are indeed different . One is original packet and the other is modified. It is an expected behavior according to the code. Actually, when a packet sent by port A is changed by flow table and then is sent to itself, we expect to capture this

Re: [ovs-dev] [PATCH net-next v2 3/3] genetlink: remove linux/genetlink.h

2024-03-25 Thread Jakub Kicinski
On Mon, 25 Mar 2024 19:45:05 +0200 Andy Shevchenko wrote: > > +/* Non-parallel generic netlink requests are serialized by a global lock. > > */ > > While at it, maybe drop extra space? (I noticed it was originally like this. Fair, I'll post v3. > > +#define MODULE_ALIAS_GENL_FAMILY(family)

Re: [ovs-dev] [PATCH net-next v2 3/3] genetlink: remove linux/genetlink.h

2024-03-25 Thread Andy Shevchenko
On Mon, Mar 25, 2024 at 10:37:16AM -0700, Jakub Kicinski wrote: > genetlink.h is a shell of what used to be a combined uAPI > and kernel header over a decade ago. It has fewer than > 10 lines of code. Merge it into net/genetlink.h. > In some ways it'd be better to keep the combined header > under

[ovs-dev] [PATCH ovn v2] acl-log: Properly log the "pass" verdict.

2024-03-25 Thread Mark Michelson
The "pass" verdict was not explicitly defined in the list of verdicts for ACL logging. This resulted in logs saying "Syntax error at `pass' unknown verdict." This change adds the "pass" verdict explicitly so that it shows up as a proper log in ovn-controller. Reported-at:

[ovs-dev] [PATCH net-next v2 2/3] net: openvswitch: remove unnecessary linux/genetlink.h include

2024-03-25 Thread Jakub Kicinski
The only legit reason I could think of for net/genetlink.h and linux/genetlink.h to be separate would be if one was included by other headers and we wanted to keep it lightweight. That is not the case, net/openvswitch/meter.h includes linux/genetlink.h but for no apparent reason (for struct

[ovs-dev] [PATCH net-next v2 3/3] genetlink: remove linux/genetlink.h

2024-03-25 Thread Jakub Kicinski
genetlink.h is a shell of what used to be a combined uAPI and kernel header over a decade ago. It has fewer than 10 lines of code. Merge it into net/genetlink.h. In some ways it'd be better to keep the combined header under linux/ but it would make looking through git history harder. Acked-by:

Re: [ovs-dev] [PATCH ovn 2/2] missed during test simplification

2024-03-25 Thread 0-day Robot
Bleep bloop. Greetings Jacob Tanenbaum, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. checkpatch: WARNING: The subject summary should start with a capital. WARNING: The subject summary

Re: [ovs-dev] [PATCH ovn 1/2] Merge QoS logical pipelines

2024-03-25 Thread 0-day Robot
Bleep bloop. Greetings Jacob Tanenbaum, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. checkpatch: WARNING: The subject summary should end with a dot. Subject: Merge QoS logical pipelines

[ovs-dev] [PATCH ovn 1/2] Merge QoS logical pipelines

2024-03-25 Thread Jacob Tanenbaum
currently there are 2 QoS pipelines for ingress (ls_in_qos_mark, ls_in_qos_meter) and egress (ls_out_qos_mark, ls_out_qos_meter). This is not necessary as there are no actions across the two pipelines that depend on each other. The two pipelines can be merged.

[ovs-dev] [PATCH ovn 2/2] missed during test simplification

2024-03-25 Thread Jacob Tanenbaum
commit: 1807499 changed the testing to get the table numbers themselves. The table number was left in here. This patch corrects that and removes the table number. Signed-off-by: Jacob Tanenbaum --- tests/ovn.at | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ovn.at

Re: [ovs-dev] [PATCH] ofproto-dpif-upcall: Don't mirror packets that aren't modified.

2024-03-25 Thread Mike Pattrick
On Mon, Mar 25, 2024 at 3:48 AM Zhangweiwei wrote: > > Hi, > I have tried this patch, however, there are still some issues when the > packets contents are changed across recirculation. On the follow example, > packets are modified in recirc_id(0) after mirror, the mirror context reset. >

Re: [ovs-dev] [PATCH net] openvswitch: Set the skbuff pkt_type for proper pmtud support.

2024-03-25 Thread Eelco Chaudron
On 25 Mar 2024, at 13:37, Ilya Maximets wrote: > On 3/25/24 13:22, Aaron Conole wrote: >> Eelco Chaudron writes: >> >>> On 22 Mar 2024, at 20:06, Aaron Conole wrote: >>> Open vSwitch is originally intended to switch at layer 2, only dealing with Ethernet frames. With the

Re: [ovs-dev] [PATCH 1/5] ovsdb: raft: Randomize leadership transfer.

2024-03-25 Thread Ilya Maximets
On 3/25/24 08:19, Han Zhou wrote: > > > On Tue, Mar 19, 2024 at 12:05 AM Felix Huettner via dev > mailto:ovs-dev@openvswitch.org>> wrote: >> >> On Mon, Mar 18, 2024 at 05:52:12PM +0100, Ilya Maximets wrote: >> > On 3/18/24 17:15, Felix Huettner wrote: >> > > On Fri, Mar 15, 2024 at 09:14:49PM

Re: [ovs-dev] [PATCH net] openvswitch: Set the skbuff pkt_type for proper pmtud support.

2024-03-25 Thread Ilya Maximets
On 3/25/24 13:22, Aaron Conole wrote: > Eelco Chaudron writes: > >> On 22 Mar 2024, at 20:06, Aaron Conole wrote: >> >>> Open vSwitch is originally intended to switch at layer 2, only dealing with >>> Ethernet frames. With the introduction of l3 tunnels support, it crossed >>> into the realm of

Re: [ovs-dev] [PATCH net] openvswitch: Set the skbuff pkt_type for proper pmtud support.

2024-03-25 Thread Aaron Conole
Eelco Chaudron writes: > On 22 Mar 2024, at 20:06, Aaron Conole wrote: > >> Open vSwitch is originally intended to switch at layer 2, only dealing with >> Ethernet frames. With the introduction of l3 tunnels support, it crossed >> into the realm of needing to care a bit about some routing

Re: [ovs-dev] [PATCH v2] ofproto-dpif-xlate: Fix continuations with associated metering.

2024-03-25 Thread Aaron Conole
Ilya Maximets writes: > On 3/22/24 14:40, Aaron Conole wrote: >> Open vSwitch supports the ability to invoke a controller action by way >> of a sample action with a specified meter. In the normal case, this >> sample action is transparently generated during xlate processing. However, >> when

[ovs-dev] [PATCH ovn] ovn-ctl: Use the current user for default file permissions.

2024-03-25 Thread Ales Musil
The ovn-ctl utility was assuming that the user/group is always root, when not specified otherwise by the --ovn-user/--ovn-group options. This has the consequence of trying to change permissions of OVN directories to root:root even though the script might be run as completely different user. Take

Re: [ovs-dev] [PATCH] ofproto-dpif-upcall: Don't mirror packets that aren't modified.

2024-03-25 Thread Zhangweiwei
Hi, I have tried this patch, however, there are still some issues when the packets contents are changed across recirculation. On the follow example, packets are modified in recirc_id(0) after mirror, the mirror context reset. Therefore, there are two ICMP request packets are mirrored on port

Re: [ovs-dev] [PATCH ovn v3 6/8] utilities/docker: Fix up container build.

2024-03-25 Thread Ales Musil
On Mon, Mar 25, 2024 at 9:47 AM Dumitru Ceara wrote: > On 3/22/24 19:34, Mark Michelson wrote: > > On 3/21/24 19:15, Dumitru Ceara wrote: > >> Most of the steps were inaccurate. Instead, use latest Ubuntu, use > >> OVS from the submodule inside the OVN repo. > >> > >> Signed-off-by: Dumitru

Re: [ovs-dev] [PATCH ovn v3 6/8] utilities/docker: Fix up container build.

2024-03-25 Thread Dumitru Ceara
On 3/22/24 19:34, Mark Michelson wrote: > On 3/21/24 19:15, Dumitru Ceara wrote: >> Most of the steps were inaccurate.  Instead, use latest Ubuntu, use >> OVS from the submodule inside the OVN repo. >> >> Signed-off-by: Dumitru Ceara >> --- >>   utilities/docker/Makefile  |  4 ++-- >>  

Re: [ovs-dev] [PATCH net] openvswitch: Set the skbuff pkt_type for proper pmtud support.

2024-03-25 Thread Eelco Chaudron
On 22 Mar 2024, at 20:06, Aaron Conole wrote: > Open vSwitch is originally intended to switch at layer 2, only dealing with > Ethernet frames. With the introduction of l3 tunnels support, it crossed > into the realm of needing to care a bit about some routing details when > making forwarding

Re: [ovs-dev] [PATCH 1/5] ovsdb: raft: Randomize leadership transfer.

2024-03-25 Thread Han Zhou
On Tue, Mar 19, 2024 at 12:05 AM Felix Huettner via dev < ovs-dev@openvswitch.org> wrote: > > On Mon, Mar 18, 2024 at 05:52:12PM +0100, Ilya Maximets wrote: > > On 3/18/24 17:15, Felix Huettner wrote: > > > On Fri, Mar 15, 2024 at 09:14:49PM +0100, Ilya Maximets wrote: > > >> Each cluster member