Re: [ovs-dev] [External] Re: [PATCH] dpif-netdev: Fix use-after-free on PACKET_OUT of IP fragments.

2021-10-12 Thread Wan Junjie
On Wed, Oct 13, 2021 at 5:12 AM Aaron Conole wrote: > > Ilya Maximets writes: > > > IP fragmentation engine may not only steal the packet but also add > > more. For example, after receiving the last fragment, it will > > add all previous fragments to a batch. Unfortunately, it will also > >

Re: [ovs-dev] [PATCH] dpif-netdev: Fix use-after-free on PACKET_OUT of IP fragments.

2021-10-12 Thread Aaron Conole
Ilya Maximets writes: > IP fragmentation engine may not only steal the packet but also add > more. For example, after receiving the last fragment, it will > add all previous fragments to a batch. Unfortunately, it will also > free the original last fragment and replace it with a copy. > This

Re: [ovs-dev] [PATCH] dpif-netdev: Call cpuid for x86 isa availability.

2021-10-12 Thread 0-day Robot
Bleep bloop. Greetings David Marchand, 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 spacing around cast #94 FILE: lib/cpu.c:43: return (regs[reg] &

[ovs-dev] [PATCH] [python] Avoid pre-allocating column defaults

2021-10-12 Thread Terry Wilson
Many python implementations pre-allocate space for multiple objects in empty dicts and lists. Using a custom dict-like object that only generates these objects when they are accessed can save memory. On a fairly pathological case where the DB has 1000 networks each with 100 ports, with only

[ovs-dev] [PATCH] dpif-netdev: Call cpuid for x86 isa availability.

2021-10-12 Thread David Marchand
DPIF AVX512 optimisations currently rely on DPDK availability while they can be used without DPDK. Besides, checking for availability of some isa only has to be done once and won't change while a OVS process runs. Resolve isa availability in constructors by using a simplified query based on cpuid

Re: [ovs-dev] [PATCH v2] docs/userspace-tunneling: Fix IP addresses for host2.

2021-10-12 Thread Ilya Maximets
On 9/22/21 14:00, Cian Ferriter wrote: > The IP addresses being recommended for the VM interface and the > "remote_ip" on the tunnel port are wrong. The host1 values were being > used before. Update to use the host2 values. > > Signed-off-by: Cian Ferriter > > --- > > v2: > - Refer directly to

Re: [ovs-dev] [PATCH v2] acinclude: Use standardized DPDK component defines.

2021-10-12 Thread Ilya Maximets
On 9/16/21 21:39, David Marchand wrote: > On Thu, Sep 16, 2021 at 8:11 AM Sunil Pai G wrote: >> >> The DPDK component defines have been renamed from >> RTE_LIBRTE_* to macro's of the form: >> "RTE_" + + "_" + drivername >> as documented in the commit [1]. > > Nit: for clarity, "in the DPDK

Re: [ovs-dev] [PATCH] correct macro name

2021-10-12 Thread Ilya Maximets
On 9/13/21 15:33, chengtcli--- via dev wrote: > From: lic121 > > fix macro name from "VLXAN_GPE_FLAGS_P" to "VXLAN_GPE_FLAGS_P" > > Signed-off-by: lic121 > --- Thanks! Applied. Best regards, Ilya Maximets. ___ dev mailing list d...@openvswitch.org

Re: [ovs-dev] [PATCH] datapath: handle DNAT tuple collision

2021-10-12 Thread Ilya Maximets
On 9/9/21 21:59, Paolo Valerio wrote: > Dumitru Ceara writes: > >> Upstream commit: >> commit 8aa7b526dc0b5dbf40c1b834d76a667ad672a410 >> Author: Dumitru Ceara >> Date: Wed Oct 7 17:48:03 2020 +0200 >> >> openvswitch: handle DNAT tuple collision >> >> With multiple DNAT

Re: [ovs-dev] [PATCH v4] pmd.at: Add test-cases for DPCLS and DPIF commands.

2021-10-12 Thread Ilya Maximets
On 9/3/21 13:05, Kevin Traynor wrote: > On 02/09/2021 18:23, Kumar Amber wrote: >> Added 2 separate test-cases for DPCLS and DPIF commands: >> 1018: PMD - dpcls configuration >> 1017: PMD - dpif configuration >> >> The above added tests are to test the commands which are used >> to either get or

Re: [ovs-dev] [PATCH] ovs-ctl: add missing description for --ovs-vswitchd-options and --ovsdb-server-options to usage()

2021-10-12 Thread Ilya Maximets
On 10/5/21 12:46, remijouan...@gmail.com wrote: > From: Remi Jouannet > > the options commit by fce20b8b73b1 were missing a description in ovs-ctl help > message > > Fixes: fce20b8b73b1 ("ovs-ctl: Permit to specify additional options") > Signed-off-by: Remi Jouannet > --- >

Re: [ovs-dev] [PATCH v2] dpif-netlink: Fix feature negotiation for older kernels

2021-10-12 Thread Ilya Maximets
On 9/16/21 10:40, Dumitru Ceara wrote: > On 9/15/21 5:08 PM, Mark Gray wrote: >> Older kernels do not reject unsupported features. This can lead >> to a situation in which 'ovs-vswitchd' believes that a feature is >> supported when, in fact, it is not. >> >> This patch probes for this by

Re: [ovs-dev] [PATCH v2] dpif-netdev: Fix pmd thread comments to include SMC.

2021-10-12 Thread Ilya Maximets
On 9/17/21 18:15, Kevin Traynor wrote: > On 09/09/2021 16:30, Cian Ferriter wrote: >> These comments are relevant to SMC too. >> >> Fixes: 60d8ccae135f ("dpif-netdev: Add SMC cache after EMC cache") >> Signed-off-by: Cian Ferriter >> Acked-by: Kevin Traynor >> --- > > Just to confirm, lgtm. >

Re: [ovs-dev] [PATCH v3] [python] Avoid sending transactions when the DB is not synced up

2021-10-12 Thread Ilya Maximets
On 9/2/21 17:53, Dumitru Ceara wrote: > On 9/2/21 5:34 PM, Terry Wilson wrote: >> This ports the C IDL change f50714b to the Python IDL: >> >> Until now the code here would happily try to send transactions to the >> database server even if the database connection was not in the correct >> state.

Re: [ovs-dev] [PATCH v1] dpdk-stub: Change the ERR log to DBG.

2021-10-12 Thread Ilya Maximets
On 9/30/21 10:41, Kumar Amber wrote: > When DPDK is not availble and avx512 looks for isa > the function returns an error log which results in > unit test failures. > > By logging a debug level log, this still shows up > in the vswitchd.log file, but won't fail unit tests > that do not have DPDK

[ovs-dev] [PATCH] dpif-netdev: Fix use-after-free on PACKET_OUT of IP fragments.

2021-10-12 Thread Ilya Maximets
IP fragmentation engine may not only steal the packet but also add more. For example, after receiving the last fragment, it will add all previous fragments to a batch. Unfortunately, it will also free the original last fragment and replace it with a copy. This invalidates the 'packet_clone'

[ovs-dev] [PATCH] [python] Avoid alloc of an attr dict/row+column

2021-10-12 Thread Terry Wilson
Python objects normally have a dictionary named __dict__ allocated for handling dynamically assigned attributes. Depending on architecture and Python version, that empty dict may be between 64 and 280 bytes. Seeing as Atom and Datum objects do not need dynamic attribute support and there can be

Re: [ovs-dev] [PATCH] ipf: release unhandled packets from the batch

2021-10-12 Thread Alin-Gabriel Serdean
-Original Message- From: Ilya Maximets Sent: Tuesday, October 12, 2021 6:41 PM To: Alin-Gabriel Serdean ; ovs-dev@openvswitch.org; d...@openvswitch.org Cc: i.maxim...@ovn.org; Aaron Conole Subject: Re: [ovs-dev] [PATCH] ipf: release unhandled packets from the batch > On 10/12/21

Re: [ovs-dev] [PATCH] ipf: release unhandled packets from the batch

2021-10-12 Thread Ilya Maximets
On 10/12/21 17:29, Alin-Gabriel Serdean wrote: > Applied on master. > > Thank you! Hi, Alin. Thanks for taking care of this! This patch also needs to be backported, probably, to all supported branches (down to 2.12). Could you handle this? If it's not directly applicable to some older

[ovs-dev] [PATCH] ipf: release unhandled packets from the batch

2021-10-12 Thread Alin-Gabriel Serdean
Applied on master. Thank you! ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

[ovs-dev] [PATCH] tunnel-push-pop.at: Mask source port in tunnel header.

2021-10-12 Thread Alin-Gabriel Serdean
Acked-by: Alin-Gabriel Serdean ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

[ovs-dev] [PATCH v2] sflow functions: fix unused parameter warnings for sflow functions

2021-10-12 Thread Alin-Gabriel Serdean
___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Re: [ovs-dev] [PATCH v3] [python] Avoid sending transactions when the DB is not synced up

2021-10-12 Thread Ilya Maximets
On 10/12/21 15:56, Ilya Maximets wrote: > On 10/12/21 15:50, Terry Wilson wrote: >> On Mon, Sep 20, 2021 at 1:18 PM Ilya Maximets wrote: >>> >>> On 9/20/21 20:10, Terry Wilson wrote: The problem is that has_ever_connected() doesn't imply that we have downloaded the db into memory since

Re: [ovs-dev] [PATCH v3] [python] Avoid sending transactions when the DB is not synced up

2021-10-12 Thread Ilya Maximets
On 10/12/21 15:50, Terry Wilson wrote: > On Mon, Sep 20, 2021 at 1:18 PM Ilya Maximets wrote: >> >> On 9/20/21 20:10, Terry Wilson wrote: >>> The problem is that has_ever_connected() doesn't imply that we have >>> downloaded the db into memory since the _Server stuff was added. >> >> Hmm. That

Re: [ovs-dev] [PATCH v3] [python] Avoid sending transactions when the DB is not synced up

2021-10-12 Thread Terry Wilson
On Mon, Sep 20, 2021 at 1:18 PM Ilya Maximets wrote: > > On 9/20/21 20:10, Terry Wilson wrote: > > The problem is that has_ever_connected() doesn't imply that we have > > downloaded the db into memory since the _Server stuff was added. > > Hmm. That does sound like a bug to me.

[ovs-dev] [PATCH] tunnel-push-pop.at: Mask source port in tunnel header.

2021-10-12 Thread Ilya Maximets
Source port is based on a packet hash and hash depends on a chosen implementation. Masking it to avoid test failures with '-msse4.2'. Fixes: 7e6b41ac8d9d ("dpif-netdev: Fix crash when PACKET_OUT is metered.") Reported-by: Kumar Amber Signed-off-by: Ilya Maximets --- tests/tunnel-push-pop.at |

Re: [ovs-dev] [PATCH ovn v6 0/4] Add multiple routing tables support to Logical Routers

2021-10-12 Thread Vladislav Odintsov
Hi Han, could you please take a look on this when you have time? Thanks. Regards, Vladislav Odintsov > On 5 Oct 2021, at 23:24, Vladislav Odintsov wrote: > > v5 -> v6: > - 2 memory leak bugs were fixed in ovn-ic code, which were introduced in >previous versions of #3 patch. > > v4 ->

[ovs-dev] [PATCH ovn v3] ovn-controller: Avoid infinite replying for TCP/ICMP connection reset messages

2021-10-12 Thread mheib
From: Mohammad Heib When the ovn controller receives an ip packet that targets a lport that has ACL rule to reject ip packets, the controller will reply with TCP_RST or icmp4/6 unreachable packet to notify the sender that the destination is not available. In turn, the receiver host will

Re: [ovs-dev] [PATCH ovn v2] ovn-controller: Avoid infinite replying for TCP/ICMP connection reset messages

2021-10-12 Thread Mohammad Heib
Hi Mark, On 10/11/21 8:03 PM, Mark Gray wrote: On 11/10/2021 10:01, mh...@redhat.com wrote: From: Mohammad Heib When the ovn controller receives an ip packet that targets a lport that has ACL rule to reject ip packets, the controller will reply with TCP_RST or icmp4/6 unreachable packet to

Re: [ovs-dev] [PATCH] ovs-ctl: add missing description for --ovs-vswitchd-options and --ovsdb-server-options to usage()

2021-10-12 Thread Rémi Jouannet
Le 06/10/2021 à 16:16, David Marchand a écrit : One minor comment, if you (already) registered to patchwork, you can mark your previous patches as superseded. https://patchwork.ozlabs.org/project/openvswitch/patch/1632229406-23598-1-git-send-email-remijouan...@gmail.com/

[ovs-dev] [PATCH] dpif:Fix typo in function pointer name bond-add

2021-10-12 Thread Somnath Chatterjee via dev
There was wrong typo in function pointer check in dpif_bond_add() before calling bond_add() Signed-off-by: Somnath Chatterjee --- lib/dpif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dpif.c b/lib/dpif.c index 8c4aed4..294b1c4 100644 --- a/lib/dpif.c +++

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

2021-10-12 Thread Chris Mi via dev
Create a unique group ID to map the sFlow info when offloading sFlow 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: Eli Britstein --- NEWS| 1 +

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

2021-10-12 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 --- tests/system-offloads-traffic.at | 101

[ovs-dev] [PATCH v16 6/8] ofproto: Introduce API to process sFlow offload packet

2021-10-12 Thread Chris Mi via dev
Process sFlow offload packet in handler thread if handler id is 0. Signed-off-by: Chris Mi Reviewed-by: Eli Britstein --- ofproto/ofproto-dpif-upcall.c | 73 +++ 1 file changed, 73 insertions(+) diff --git a/ofproto/ofproto-dpif-upcall.c

[ovs-dev] [PATCH v16 5/8] dpif-offload-netlink: Implement dpif-offload-provider API

2021-10-12 Thread Chris Mi via dev
Implement dpif-offload API for netlink datapath. Signed-off-by: Chris Mi Reviewed-by: Eli Britstein --- lib/automake.mk | 1 + lib/dpif-netlink.c | 2 +- lib/dpif-offload-netlink.c | 209 lib/dpif-offload-provider.h | 13 ++- 4

[ovs-dev] [PATCH v16 3/8] dpif-offload-provider: Introduce dpif-offload-provider layer

2021-10-12 Thread Chris Mi via dev
Some offload actions require functionality that is not netdev based, but dpif. For example, sFlow action requires to create a psample netlink socket to receive the sampled packets from TC or kernel driver. Create dpif-offload-provider layer to support such actions. Signed-off-by: Chris Mi

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

2021-10-12 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: Eli Britstein Acked-by: Eelco Chaudron --- utilities/ovs-kmod-ctl.in | 14 ++ 1 file changed, 14 insertions(+) diff

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

2021-10-12 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 v16 1/8] compat: Add psample and tc sample action defines for older kernels

2021-10-12 Thread Chris Mi via dev
Update kernel UAPI to support psample and the tc sample action. Signed-off-by: Chris Mi Reviewed-by: Eli Britstein Acked-by: Eelco Chaudron --- include/linux/automake.mk| 4 ++- include/linux/psample.h | 62 include/linux/tc_act/tc_sample.h |

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

2021-10-12 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 v15 3/7] dpif-offload-provider: Introduce dpif-offload-provider layer

2021-10-12 Thread Chris Mi via dev
On 10/8/2021 4:34 PM, Eelco Chaudron wrote: On 8 Oct 2021, at 10:06, Chris Mi wrote: On 10/1/2021 5:52 PM, Eelco Chaudron wrote: See some small comments inline. On 15 Sep 2021, at 14:43, Chris Mi wrote: --- /dev/null +++ b/lib/dpif-offload-provider.h @@ -0,0 +1,47 @@ +/* + * Copyright

Re: [ovs-dev] [PATCH v6] Encap & Decap actions for MPLS packet type.

2021-10-12 Thread Eelco Chaudron
On 11 Oct 2021, at 17:38, Martin Varghese wrote: > On Fri, Oct 08, 2021 at 03:20:09PM +0200, Eelco Chaudron wrote: >> Thanks Martin, some minor comments. >> > Thanks Eelco. I will send out the v7 soon. Ack, will try to review your v7 this week or next. >> //Eelco >> >> On 30 Sep 2021, at

Re: [ovs-dev] [PATCH v15 0/7] Add offload support for sFlow

2021-10-12 Thread Eelco Chaudron
On 12 Oct 2021, at 9:05, Chris Mi wrote: > On 10/12/2021 2:53 PM, Eelco Chaudron wrote: >> >> On 9 Oct 2021, at 10:16, Chris Mi wrote: >> >>> On 10/1/2021 5:43 PM, Eelco Chaudron wrote: On 1 Oct 2021, at 11:35, Eelco Chaudron wrote: > Hi Chris, > > I just started to review

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

2021-10-12 Thread Chris Mi via dev
On 10/1/2021 9:55 PM, Eelco Chaudron wrote: One small nit below. On 15 Sep 2021, at 14:43, Chris Mi wrote: Create a unique group ID to map the sFlow info when offloading sFlow action to TC. When showing the offloaded datapath flows, translate the group ID from TC sample action to sFlow info

Re: [ovs-dev] [PATCH v15 6/7] ofproto: Introduce API to process sFlow offload packet

2021-10-12 Thread Chris Mi via dev
On 10/1/2021 8:24 PM, Eelco Chaudron wrote: See comments below. On 15 Sep 2021, at 14:43, Chris Mi wrote: Process sFlow offload packet in handler thread if handler id is 0. Signed-off-by: Chris Mi Reviewed-by: Eli Britstein --- ofproto/ofproto-dpif-upcall.c | 63

Re: [ovs-dev] [PATCH v15 0/7] Add offload support for sFlow

2021-10-12 Thread Chris Mi via dev
On 10/12/2021 2:53 PM, Eelco Chaudron wrote: On 9 Oct 2021, at 10:16, Chris Mi wrote: On 10/1/2021 5:43 PM, Eelco Chaudron wrote: On 1 Oct 2021, at 11:35, Eelco Chaudron wrote: Hi Chris, I just started to review this patchset, but as some of the v14 discussions have not finished, I’ll

Re: [ovs-dev] [PATCH v15 0/7] Add offload support for sFlow

2021-10-12 Thread Eelco Chaudron
On 9 Oct 2021, at 10:16, Chris Mi wrote: > On 10/1/2021 5:43 PM, Eelco Chaudron wrote: >> >> On 1 Oct 2021, at 11:35, Eelco Chaudron wrote: >> >>> Hi Chris, >>> >>> I just started to review this patchset, but as some of the v14 discussions >>> have not finished, I’ll copy them over to v15.

Re: [ovs-dev] [PATCH v15 5/7] dpif-offload-netlink: Implement dpif-offload-provider API

2021-10-12 Thread Chris Mi via dev
On 10/1/2021 7:57 PM, Eelco Chaudron wrote: Some comments on user-facing log messages, the rest look ok. //Eelco On 15 Sep 2021, at 14:43, Chris Mi wrote: Implement dpif-offload API for netlink datapath. Signed-off-by: Chris Mi Reviewed-by: Eli Britstein --- lib/automake.mk

Re: [ovs-dev] [PATCH v15 4/7] netdev-offload-tc: Introduce group ID management API

2021-10-12 Thread Chris Mi via dev
On 10/1/2021 6:20 PM, Eelco Chaudron wrote: One nit, rest looks good. Thanks for removing the expired list handling, as it looks way cleaner now! //Eelco On 15 Sep 2021, at 14:43, Chris Mi wrote: When offloading sample action to TC, userspace creates a unique ID to map sFlow action and