Re: [ovs-dev] [PATCH ovn v2] northd, lsp: Add additional arp proxy features

2023-02-28 Thread Ales Musil
Hi, Thank you for working on this, I have a couple of style related comments down below. On Mon, Feb 27, 2023 at 1:46 PM Enrique Llorente wrote: > Configure mac address > The mac address returned by ARP/NDP can be configured similar to LSP > addresses where the mac is the first entry on the

Re: [ovs-dev] Deadlock happen when delete vhostuserclient port while qemu destroy virtio

2023-02-28 Thread David Marchand
Hello, On Fri, Feb 24, 2023 at 2:55 AM Han Ding wrote: > >On 2/23/23 10:35, Han Ding wrote: > >> > >> When use ovs-vsctl to delete vhostuserclient port while qemu destroy > >> virtio, > >> there is a deadlock between OVS main thread and the vhost-events thread. > >> > >> openvswitch is 2.14 and

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

2023-02-28 Thread Chris Mi via dev
On 2/23/2023 9:43 PM, Ilya Maximets wrote: On 2/23/23 12:27, 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 2/2] ci: Run tc offload tests in GitHub Actions.

2023-02-28 Thread Eelco Chaudron
On 17 Feb 2023, at 16:02, Aaron Conole wrote: > Ilya Maximets writes: > >> On 2/14/23 14:54, Eelco Chaudron wrote: >>> Run "make check-offloads" as part of the GitHub actions tests. >>> >>> This test was run 25 times using GitHub actions, and the >>> failing rerun test cases where excluded.

Re: [ovs-dev] [PATCH ovn v2] northd, lsp: Add additional arp proxy features

2023-02-28 Thread Enrique Llorente Pastora
On Tue, Feb 28, 2023 at 10:36 AM Enrique Llorente Pastora < ellor...@redhat.com> wrote: > > > On Tue, Feb 28, 2023 at 10:00 AM Ales Musil wrote: > >> Hi, >> >> Thank you for working on this, >> I have a couple of style related comments down below. >> >> >> On Mon, Feb 27, 2023 at 1:46 PM Enrique

Re: [ovs-dev] [PATCH v2] test: move check for tc ingress pps support to test script

2023-02-28 Thread Simon Horman
On Mon, Feb 27, 2023 at 04:44:02PM +0100, Ilya Maximets wrote: > On 2/24/23 14:01, Simon Horman wrote: > > Move check for tc ingress pps support to from aclocal to test script > > > > This has several problems: > > > > 1. Stderror from failing commands is output when executing > >various

[ovs-dev] [PATCH ovn v3] northd, lsp: Add additional arp proxy features

2023-02-28 Thread Enrique Llorente
Configure mac address The mac address returned by ARP/NDP can be configured similar to LSP addresses where the mac is the first entry on the list IPv6 Support NDP IPv6 protocol Use CIDRs Allow to specify subnets for ipv4 and ipv6, they will match whatever address is received from ARP/NDP

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

2023-02-28 Thread Chris Mi via dev
On 2/24/2023 4:16 AM, Ilya Maximets wrote: On 2/23/23 12:26, Chris Mi wrote: Initialize psample socket. Add sFlow recv API to receive sampled packets from psample socket. Add sFow recv wait API to add psample socket fd to poll list. Signed-off-by: Chris Mi Reviewed-by: Roi Dayan ---

Re: [ovs-dev] [External] Re: Deadlock happen when delete vhostuserclient port while qemu destroy virtio

2023-02-28 Thread Wan Junjie
Hi, On Tue, Feb 28, 2023 at 4:03 PM David Marchand wrote: > > Hello, > > On Fri, Feb 24, 2023 at 2:55 AM Han Ding wrote: > > >On 2/23/23 10:35, Han Ding wrote: > > >> > > >> When use ovs-vsctl to delete vhostuserclient port while qemu destroy > > >> virtio, > > >> there is a deadlock between

Re: [ovs-dev] [PATCH 1/1] tc: Fix cleaning chains

2023-02-28 Thread Simon Horman
On Mon, Feb 27, 2023 at 02:08:25PM +0100, Eelco Chaudron wrote: > > > On 22 Feb 2023, at 13:46, Simon Horman wrote: > > > On Wed, Feb 22, 2023 at 12:30:17PM +0200, Roi Dayan via dev wrote: > >> Sometimes there is a need to clean empty chains as done in > >> delete_chains_from_netdev(). The

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

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

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

2023-02-28 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 --- lib/netdev-offload-tc.c | 267

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

2023-02-28 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 v23 4/8] netdev-offload-tc: Add sFlow offload API for TC

2023-02-28 Thread Chris Mi via dev
Initialize psample socket. Add sFlow recv API to receive sampled packets from psample socket. Add sFow recv wait API to add psample socket fd to poll list. Signed-off-by: Chris Mi Reviewed-by: Roi Dayan --- lib/dpif.h| 2 + lib/netdev-offload-provider.h | 14 +++

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

2023-02-28 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| 4 ++- include/linux/psample.h | 62 include/linux/tc_act/tc_sample.h | 25

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

2023-02-28 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 v23 0/8] Add offload support for sFlow

2023-02-28 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

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

2023-02-28 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 | 35 +++ lib/netdev-offload.h | 5 + 2 files changed, 40 insertions(+) diff

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

2023-02-28 Thread Chris Mi via dev
On 2/24/2023 3:45 AM, Ilya Maximets wrote: On 2/23/23 12:26, Chris Mi wrote: When offloading sample action to TC, userspace creates a unique ID to map sFlow action and tunnel info and passes this ID to kernel instead of the sFlow info. Psample will send this ID and sampled packet to userspace.

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

2023-02-28 Thread Chris Mi via dev
On 2/24/2023 4:19 AM, Ilya Maximets wrote: On 2/23/23 12:27, 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 | 32

Re: [ovs-dev] [PATCH v2] system-traffic.at: Add icmp error tests while dnatting address and port.

2023-02-28 Thread Simon Horman
On Mon, Feb 27, 2023 at 05:51:10PM +0100, Paolo Valerio wrote: > The two tests verify, for both icmp and icmpv6, that the correct port > translation happen in the inner packet in the case an error is > received in the reply direction. > > Signed-off-by: Paolo Valerio > --- > v2: > - added

Re: [ovs-dev] [PATCH ovn] ovn-util: Remove unused ovn_parse_internal_version_minor.

2023-02-28 Thread Simon Horman
On Mon, Feb 27, 2023 at 08:54:23PM +0100, Ilya Maximets wrote: > The only user of this function was removed in a cited commit. And > it is unlikely to be used in the future, since we have feature flags > in the database instead. > > Fixes: 3013c2869696 ("northd: ovn-controller: Use

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

2023-02-28 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: ERROR: Inappropriate bracing around statement #68 FILE: lib/netdev-offload-tc.c:140: if

Re: [ovs-dev] [PATCH ovn v2] northd, lsp: Add additional arp proxy features

2023-02-28 Thread Enrique Llorente Pastora
On Tue, Feb 28, 2023 at 10:00 AM Ales Musil wrote: > Hi, > > Thank you for working on this, > I have a couple of style related comments down below. > > > On Mon, Feb 27, 2023 at 1:46 PM Enrique Llorente > wrote: > >> Configure mac address >> The mac address returned by ARP/NDP can be configured

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

2023-02-28 Thread Chris Mi via dev
On 2/24/2023 4:46 AM, Ilya Maximets wrote: On 2/23/23 12:27, 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.

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

2023-02-28 Thread Chris Mi via dev
Add two sFlow offload test caes: 3: sflow offloads with sampling=1 - ping between two ports - offloads enabled ok 4: sflow offloads with sampling=2 - ping between two ports - offloads enabled ok Signed-off-by: Chris Mi Reviewed-by: Roi Dayan Acked-by: Eelco Chaudron ---

Re: [ovs-dev] [PATCH ovn] controller: Fix hairpin SNAT flow explosion for the same SNAT IPs case.

2023-02-28 Thread Ilya Maximets
On 2/28/23 01:03, Dumitru Ceara wrote: > Hi Ilya, > > Thanks for the patch, you're right the hairpin SNAT IP processing in > ovn-controller is extremely inefficient today. > > I didn't review the code closely but I do have some initial remarks below. > > On 2/20/23 12:42, Ilya Maximets wrote:

Re: [ovs-dev] [PATCH ovn] controller: Fix hairpin SNAT flow explosion for the same SNAT IPs case.

2023-02-28 Thread Dumitru Ceara
On 2/28/23 15:29, Ilya Maximets wrote: > On 2/28/23 01:03, Dumitru Ceara wrote: >> Hi Ilya, >> >> Thanks for the patch, you're right the hairpin SNAT IP processing in >> ovn-controller is extremely inefficient today. >> >> I didn't review the code closely but I do have some initial remarks below.

Re: [ovs-dev] [External] Re: Deadlock happen when delete vhostuserclient port while qemu destroy virtio

2023-02-28 Thread Ilya Maximets
On 2/28/23 16:16, Maxime Coquelin wrote: > Hi, > > On 2/28/23 10:33, Wan Junjie wrote: >> Hi, >> >> On Tue, Feb 28, 2023 at 4:03 PM David Marchand >> wrote: >>> >>> Hello, >>> >>> On Fri, Feb 24, 2023 at 2:55 AM Han Ding wrote: > On 2/23/23 10:35, Han Ding wrote: >> >> When use

[ovs-dev] [PATCH v2 1/2] github: Combine ASAN and UBSAN runs.

2023-02-28 Thread Eelco Chaudron
Combine the ASAN and UBSAN tests into a single sanitizer run. Signed-off-by: Eelco Chaudron --- v2: Newly added .ci/linux-build.sh | 14 +- .github/workflows/build-and-test.yml | 10 +++--- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git

[ovs-dev] [PATCH v2 2/2] ci: Run tc offload tests in GitHub Actions.

2023-02-28 Thread Eelco Chaudron
Run "make check-offloads" as part of the GitHub actions tests. This test was run 25 times using GitHub actions, and the failing rerun test cases where excluded. There are quite some first-run failures, but unfortunately, there is no other more stable kernel available as a GitHub-hosted runner.

Re: [ovs-dev] [PATCH ovn] controller: Fix hairpin SNAT flow explosion for the same SNAT IPs case.

2023-02-28 Thread Ilya Maximets
On 2/28/23 16:14, Dumitru Ceara wrote: > On 2/28/23 15:29, Ilya Maximets wrote: >> On 2/28/23 01:03, Dumitru Ceara wrote: >>> Hi Ilya, >>> >>> Thanks for the patch, you're right the hairpin SNAT IP processing in >>> ovn-controller is extremely inefficient today. >>> >>> I didn't review the code

Re: [ovs-dev] [PATCH ovn] controller: Fix hairpin SNAT flow explosion for the same SNAT IPs case.

2023-02-28 Thread Dumitru Ceara
On 2/28/23 16:22, Ilya Maximets wrote: > On 2/28/23 16:14, Dumitru Ceara wrote: >> On 2/28/23 15:29, Ilya Maximets wrote: >>> On 2/28/23 01:03, Dumitru Ceara wrote: Hi Ilya, Thanks for the patch, you're right the hairpin SNAT IP processing in ovn-controller is extremely

Re: [ovs-dev] [PATCH] classifier: Fix missing masks on a final stage with ports trie.

2023-02-28 Thread Aaron Conole
Aaron Conole writes: > Ilya Maximets writes: > >> Flow lookup doesn't include masks of the final stage in a resulted >> flow wildcards in case that stage had L4 ports match. Only the result >> of ports trie lookup is added to the mask. It might be sufficient in >> many cases, but it's not

Re: [ovs-dev] [PATCH ovn 1/3] treewide: Remove unnecessary strlen() calls.

2023-02-28 Thread Simon Horman
On Mon, Feb 27, 2023 at 09:03:42PM +0100, Ilya Maximets wrote: > In many cases OVN components are using strlen() to check if the string > is not empty. In that case, unnecessary scan of the whole string is > performed and the length is calculated, while it's enough to just check > the first byte.

Re: [ovs-dev] [PATCH ovn 3/3] northd: Don't parse LSP addresses twice.

2023-02-28 Thread Simon Horman
On Mon, Feb 27, 2023 at 09:03:44PM +0100, Ilya Maximets wrote: > At the point of IPAM configuration all the addresses are already parsed. > No need to waste time parsing them again. > > Signed-off-by: Ilya Maximets Reviewed-by: Simon Horman ___ dev

Re: [ovs-dev] [PATCH ovn 2/3] ovn-util: Optimize is_dynamic_lsp_address.

2023-02-28 Thread Simon Horman
On Mon, Feb 27, 2023 at 09:03:43PM +0100, Ilya Maximets wrote: > For non-dynamic address, current version performs 1 strcmp + 4 attempts > for ovs_scan. Updated code perfroms 1 strncmp + 1 ovs_scan. > > Also, for ports with both IPv4 and IPv6 specified, new version doesn't > re-parse IPv4 twice.

Re: [ovs-dev] [PATCH 2/2] ci: Run tc offload tests in GitHub Actions.

2023-02-28 Thread Simon Horman
On Tue, Feb 28, 2023 at 04:24:57PM +0100, Eelco Chaudron wrote: > > > On 16 Feb 2023, at 13:21, Eelco Chaudron wrote: > > > On 15 Feb 2023, at 21:15, Ilya Maximets wrote: > > > >> On 2/14/23 14:54, Eelco Chaudron wrote: > >>> Run "make check-offloads" as part of the GitHub actions tests. > >>>

Re: [ovs-dev] [External] Re: Deadlock happen when delete vhostuserclient port while qemu destroy virtio

2023-02-28 Thread Maxime Coquelin
Hi, On 2/28/23 10:33, Wan Junjie wrote: Hi, On Tue, Feb 28, 2023 at 4:03 PM David Marchand wrote: Hello, On Fri, Feb 24, 2023 at 2:55 AM Han Ding wrote: On 2/23/23 10:35, Han Ding wrote: When use ovs-vsctl to delete vhostuserclient port while qemu destroy virtio, there is a deadlock

Re: [ovs-dev] [External] Re: Deadlock happen when delete vhostuserclient port while qemu destroy virtio

2023-02-28 Thread Maxime Coquelin
On 2/28/23 16:37, Ilya Maximets wrote: On 2/28/23 16:16, Maxime Coquelin wrote: Hi, On 2/28/23 10:33, Wan Junjie wrote: Hi, On Tue, Feb 28, 2023 at 4:03 PM David Marchand wrote: Hello, On Fri, Feb 24, 2023 at 2:55 AM Han Ding wrote: On 2/23/23 10:35, Han Ding wrote: When use

Re: [ovs-dev] [External] Re: Deadlock happen when delete vhostuserclient port while qemu destroy virtio

2023-02-28 Thread Ilya Maximets
On 2/28/23 17:14, Ilya Maximets wrote: > On 2/28/23 17:05, Maxime Coquelin wrote: >> >> >> On 2/28/23 16:37, Ilya Maximets wrote: >>> On 2/28/23 16:16, Maxime Coquelin wrote: Hi, On 2/28/23 10:33, Wan Junjie wrote: > Hi, > > On Tue, Feb 28, 2023 at 4:03 PM David Marchand

Re: [ovs-dev] [PATCH 2/2] ci: Run tc offload tests in GitHub Actions.

2023-02-28 Thread Eelco Chaudron
On 16 Feb 2023, at 13:21, Eelco Chaudron wrote: > On 15 Feb 2023, at 21:15, Ilya Maximets wrote: > >> On 2/14/23 14:54, Eelco Chaudron wrote: >>> Run "make check-offloads" as part of the GitHub actions tests. >>> >>> This test was run 25 times using GitHub actions, and the >>> failing rerun

Re: [ovs-dev] [External] Re: Deadlock happen when delete vhostuserclient port while qemu destroy virtio

2023-02-28 Thread Ilya Maximets
On 2/28/23 17:05, Maxime Coquelin wrote: > > > On 2/28/23 16:37, Ilya Maximets wrote: >> On 2/28/23 16:16, Maxime Coquelin wrote: >>> Hi, >>> >>> On 2/28/23 10:33, Wan Junjie wrote: Hi, On Tue, Feb 28, 2023 at 4:03 PM David Marchand wrote: > > Hello, > > On

Re: [ovs-dev] [PATCH ovn v2 6/7] system-tests: Skip LB affinity for now with OvS userspace

2023-02-28 Thread Mark Michelson
Hi Ales, May I suggest placing the tests that are failing with the userspace datapath into the tests/system-ovn-kmod.at file? The current structure of the test files is: tests/system-ovn.at: Tests that can run with any datapath. tests/system-ovn-kmod.at: Tests that can only be run with the

Re: [ovs-dev] [PATCH v2] system-traffic.at: Add icmp error tests while dnatting address and port.

2023-02-28 Thread Ilya Maximets
On 2/28/23 10:43, Simon Horman wrote: > On Mon, Feb 27, 2023 at 05:51:10PM +0100, Paolo Valerio wrote: >> The two tests verify, for both icmp and icmpv6, that the correct port >> translation happen in the inner packet in the case an error is >> received in the reply direction. >> >> Signed-off-by:

Re: [ovs-dev] [PATCH v5 0/5] Add support for preffered src address in ovs-router

2023-02-28 Thread Ilya Maximets
On 2/22/23 11:29, Nobuhiro MIKI wrote: > With this series, the preferred source address in ovs-router is obtained > from both ovs/route/add command and kernel FIB. > > v5: > - Add patch to fix man page > v4: > - Add cleanup patch for ovs/route/add > - Remove unrelated code > v3: > - Fix

Re: [ovs-dev] [PATCH] classifier: Fix missing masks on a final stage with ports trie.

2023-02-28 Thread Ilya Maximets
On 2/28/23 16:34, Aaron Conole wrote: > Aaron Conole writes: > >> Ilya Maximets writes: >> >>> Flow lookup doesn't include masks of the final stage in a resulted >>> flow wildcards in case that stage had L4 ports match. Only the result >>> of ports trie lookup is added to the mask. It might

[ovs-dev] [PATCH v2] treewide: Remove uses of ATOMIC_VAR_INIT

2023-02-28 Thread Fangrui Song via dev
ATOMIC_VAR_INIT has a trivial definition `#define ATOMIC_VAR_INIT(value) (value)`, is deprecated in C17/C++20, and will be removed in newer standards in newer GCC/Clang (e.g. https://reviews.llvm.org/D144196). Signed-off-by: Fangrui Song --- Changes from v1: * remove ATOMIC_VAR_INIT from

Re: [ovs-dev] [PATCH v5 0/5] Add support for preffered src address in ovs-router

2023-02-28 Thread Nobuhiro MIKI
On 2023/03/01 2:37, Ilya Maximets wrote: > On 2/22/23 11:29, Nobuhiro MIKI wrote: >> With this series, the preferred source address in ovs-router is obtained >> from both ovs/route/add command and kernel FIB. >> >> v5: >> - Add patch to fix man page >> v4: >> - Add cleanup patch for ovs/route/add

Re: [ovs-dev] [PATCH v5 0/5] Add support for preffered src address in ovs-router

2023-02-28 Thread Nobuhiro MIKI
On 2023/03/01 2:37, Ilya Maximets wrote: > On 2/22/23 11:29, Nobuhiro MIKI wrote: >> With this series, the preferred source address in ovs-router is obtained >> from both ovs/route/add command and kernel FIB. >> >> v5: >> - Add patch to fix man page >> v4: >> - Add cleanup patch for ovs/route/add

[ovs-dev] [PATCH v7] netdev-offload-tc: del ufid mapping if device not exist

2023-02-28 Thread Faicker Mo
The device may be deleted and added with ifindex changed. The tc rules on the device will be deleted if the device is deleted. The func tc_del_filter will fail when flow del. The mapping of ufid to tc will not be deleted. The traffic will trigger the same flow(with same ufid) to put to tc on the

Re: [ovs-dev] [PATCH ovn v2 6/7] system-tests: Skip LB affinity for now with OvS userspace

2023-02-28 Thread Ales Musil
On Tue, Feb 28, 2023 at 8:03 PM Mark Michelson wrote: > Hi Ales, > > May I suggest placing the tests that are failing with the userspace > datapath into the tests/system-ovn-kmod.at file? The current structure > of the test files is: > > tests/system-ovn.at: Tests that can run with any

Re: [ovs-dev] [PATCH ovn v2 6/7] system-tests: Skip LB affinity for now with OvS userspace

2023-02-28 Thread Simon Horman
On Wed, Mar 01, 2023 at 07:31:04AM +0100, Ales Musil wrote: > On Tue, Feb 28, 2023 at 8:03 PM Mark Michelson wrote: > > > Hi Ales, > > > > > May I suggest placing the tests that are failing with the userspace > > datapath into the tests/system-ovn-kmod.at file? The current structure > > of the

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

2023-02-28 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 --- lib/netdev-offload-tc.c | 267

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

2023-02-28 Thread Chris Mi via dev
Add two sFlow offload test caes: 3: sflow offloads with sampling=1 - ping between two ports - offloads enabled ok 4: sflow offloads with sampling=2 - ping between two ports - offloads enabled ok Signed-off-by: Chris Mi Reviewed-by: Roi Dayan Acked-by: Eelco Chaudron ---

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

2023-02-28 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 ---

Re: [ovs-dev] [PATCH v7] netdev-offload-tc: del ufid mapping if device not exist

2023-02-28 Thread Eelco Chaudron
On 1 Mar 2023, at 3:12, Faicker Mo wrote: > The device may be deleted and added with ifindex changed. > The tc rules on the device will be deleted if the device is deleted. > The func tc_del_filter will fail when flow del. The mapping of > ufid to tc will not be deleted. > The traffic will

Re: [ovs-dev] [PATCH v5 0/5] Add support for preffered src address in ovs-router

2023-02-28 Thread Eelco Chaudron
On 28 Feb 2023, at 18:37, Ilya Maximets wrote: > On 2/22/23 11:29, Nobuhiro MIKI wrote: >> With this series, the preferred source address in ovs-router is obtained >> from both ovs/route/add command and kernel FIB. >> >> v5: >> - Add patch to fix man page >> v4: >> - Add cleanup patch for

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

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

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

2023-02-28 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 | 35 +++ lib/netdev-offload.h | 5 + 2 files changed, 40 insertions(+) diff

[ovs-dev] [PATCH v24 4/8] netdev-offload-tc: Add sFlow offload API for TC

2023-02-28 Thread Chris Mi via dev
Initialize psample socket. Add sFlow recv API to receive sampled packets from psample socket. Add sFow recv wait API to add psample socket fd to poll list. Signed-off-by: Chris Mi Reviewed-by: Roi Dayan --- lib/dpif.h| 2 + lib/netdev-offload-provider.h | 14 +++

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

2023-02-28 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

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

2023-02-28 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 v24 1/8] compat: Add psample and tc sample action defines for older kernels

2023-02-28 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| 4 ++- include/linux/psample.h | 62 include/linux/tc_act/tc_sample.h | 25