Re: [ovs-dev] [PATCH v11 2/2] conntrack: prefer dst port range during unique tuple search

2022-02-15 Thread Paolo Valerio
Hello wenxu, we...@ucloud.cn writes: > From: wenxu > > This commit splits the nested loop used to search the unique ports for > the reverse tuple. > It affects only the dnat action, giving more precedence to the dnat > range, similarly to the kernel dp, instead of searching through the >

[ovs-dev] [PATCH ovn] northd: allow explicit nat-addresses for distributed gw ports

2022-02-15 Thread Lorenzo Bianconi
Allow the CMS to explicitly configure nat addresses to use in GARP advertising even if the logical switch port is connected to a distributed gateway router port. Signed-off-by: Lorenzo Bianconi --- northd/northd.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git

[ovs-dev] ovsdb with ovn-controller-vtep question

2022-02-15 Thread Vladislav Odintsov
Hi, I was debugging a strange behaviour of ovn-controller-vtep daemon and need some assistance about how ovsdb transactions and in-memory objects work. ovn-controller-vtep, when a new vlan binding appears tries to commit in SB DB type=vtep Port_Binding "chassis" column value [0]. Based on the

Re: [ovs-dev] [PATCH v2] dpif-netdev-dpcls: Make subtable reprobe thread-safe.

2022-02-15 Thread Stokes, Ian
> >> Thanks for the patch, in general this looks ok to me, but I realize Ilya > >> had a > few comments on the v1. I think these are addressed here but maybe Ilya would > like to confirm before sign off? > > > > Thanks, Ian. > > I'll take a look at this patch tomorrow. > > > >> > >> @Ilya

[ovs-dev] [PATCH ovn v5] acl-log: Log the direction (logical pipeline) of the matching ACL.

2022-02-15 Thread Dumitru Ceara
It's useful to differentiate between ingress and egress pipelines in the ACL logs. To achieve this we determine the direction by interpreting the openflow table ID when processing packets punted to pinctrl by "log()" action. Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1992641

Re: [ovs-dev] [PATCH v3 00/14] Fix UndefinedBehaviorSanitizer reported issues and enable it in CI.

2022-02-15 Thread Ilya Maximets
On 2/15/22 18:06, Dumitru Ceara wrote: > On 2/15/22 14:22, Ilya Maximets wrote: >> On 1/24/22 21:10, Dumitru Ceara wrote: >>> On 1/24/22 19:40, Adrian Moreno wrote: On 1/24/22 18:49, Jeffrey Walton wrote: > On Mon, Jan 24, 2022 at 9:17 AM Dumitru Ceara wrote: >> >> As

Re: [ovs-dev] [PATCH v3 00/14] Fix UndefinedBehaviorSanitizer reported issues and enable it in CI.

2022-02-15 Thread Dumitru Ceara
On 2/15/22 14:22, Ilya Maximets wrote: > On 1/24/22 21:10, Dumitru Ceara wrote: >> On 1/24/22 19:40, Adrian Moreno wrote: >>> >>> >>> On 1/24/22 18:49, Jeffrey Walton wrote: On Mon, Jan 24, 2022 at 9:17 AM Dumitru Ceara wrote: > > As privately reported by Aaron Conole, and by Jeffrey

Re: [ovs-dev] [PATCH ovn v2] controller: add ovn-set-local-ip option

2022-02-15 Thread Vladislav Odintsov
Hi Numan, I’ve submitted the v2, please check this out: https://patchwork.ozlabs.org/project/ovn/patch/20220215145442.2868060-1-odiv...@gmail.com/ Regards, Vladislav Odintsov > On 11 Feb 2022, at 22:12, Numan Siddique wrote: > > On Wed, Feb 9, 2022 at 6:33 PM Vladislav Odintsov

[ovs-dev] [PATCH ovn v2] controller: add ovn-set-local-ip option

2022-02-15 Thread Vladislav Odintsov
When transport node has multiple interfaces (vlans) and ovn-encap-ip on different hosts need to be configured from different VLANs source IP for encapsulated packet can be not the same, which is expected by remote system. Explicitely setting local_ip resolves such problem. Signed-off-by:

Re: [ovs-dev] [PATCH v2] dpif-netdev-dpcls: Make subtable reprobe thread-safe.

2022-02-15 Thread Ilya Maximets
On 2/14/22 18:35, Ilya Maximets wrote: > On 2/14/22 17:39, Stokes, Ian wrote: >>> The subtable search function can be used at any time by a PMD thread. >>> Setting the subtable search function should be done atomically to >>> prevent garbage data from being read. >>> >>> A

Re: [ovs-dev] [PATCH v3 06/14] bfd: lldp: stp: Fix misaligned packet field access.

2022-02-15 Thread Ilya Maximets
On 1/24/22 15:18, Dumitru Ceara wrote: > UB Sanitizer reports: > lib/bfd.c:748:16: runtime error: member access within misaligned address > 0x01f0d6ea for type 'struct msg', which requires 4 byte alignment > 0x01f0d6ea: note: pointer points here >00 20 00 00 20 40 03 18 93 f9 0a

Re: [ovs-dev] [PATCH v3 00/14] Fix UndefinedBehaviorSanitizer reported issues and enable it in CI.

2022-02-15 Thread Ilya Maximets
On 1/24/22 21:10, Dumitru Ceara wrote: > On 1/24/22 19:40, Adrian Moreno wrote: >> >> >> On 1/24/22 18:49, Jeffrey Walton wrote: >>> On Mon, Jan 24, 2022 at 9:17 AM Dumitru Ceara wrote: As privately reported by Aaron Conole, and by Jeffrey Walton [0] there's currently a number of

Re: [ovs-dev] [PATCH v3 13/14] ci: Fix typo in variable name.

2022-02-15 Thread Ilya Maximets
On 2/3/22 20:07, Paolo Valerio wrote: > Dumitru Ceara writes: > >> Reported-by: David Marchand >> Signed-off-by: Dumitru Ceara >> --- >> .ci/linux-build.sh |4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh >> index

Re: [ovs-dev] [PATCH v3 07/14] dp-packet: Ensure packet base is always non-NULL.

2022-02-15 Thread Ilya Maximets
On 2/3/22 19:59, Paolo Valerio wrote: > Dumitru Ceara writes: > >> UB Sanitizer report: >> lib/dp-packet.h:297:39: runtime error: applying zero offset to null pointer >> #0 0x7946f5 in dp_packet_tail /root/ovs/./lib/dp-packet.h:297:39 >> #1 0x794331 in dp_packet_tailroom

Re: [ovs-dev] [PATCH v3 05/14] ovsdb-idlc: Avoid accessing member within NULL idl index cursors.

2022-02-15 Thread Ilya Maximets
On 2/3/22 20:05, Paolo Valerio wrote: > Dumitru Ceara writes: > >> Reported by UndefinedBehaviorSanitizer: >> tests/idltest.c:3602:12: runtime error: member access within null pointer >> of type 'const struct idltest_simple' >> #0 0x4295af in idltest_simple_cursor_first_ge

Re: [ovs-dev] [PATCH v3 03/14] stopwatch: Fix buffer underflow when computing percentiles.

2022-02-15 Thread Ilya Maximets
On 2/3/22 20:02, Paolo Valerio wrote: > Dumitru Ceara writes: > >> UB Sanitizer report: >> lib/stopwatch.c:119:22: runtime error: index 18446744073709551615 out of >> bounds for type 'long long unsigned int [50]' >> #0 0x698358 in calc_percentile lib/stopwatch.c:119 >> #1 0x69ada1

Re: [ovs-dev] [PATCH v3 02/14] dpif-netdev: Fix misaligned access.

2022-02-15 Thread Ilya Maximets
On 2/3/22 18:13, Paolo Valerio wrote: > Dumitru Ceara writes: > >> Remove the forced cache-line size alignment markers from >> struct dp_netdev_pmd_thread and struct dp_netdev as discussed >> at [0]. They don't seem to add any benefit and cause 64 byte >> alignment requirements. >> >> UB

Re: [ovs-dev] [PATCH v3 01/14] treewide: Don't pass NULL to library functions that expect non-NULL.

2022-02-15 Thread Ilya Maximets
On 2/3/22 17:33, Paolo Valerio wrote: > Dumitru Ceara writes: > >> It's actually undefined behavior to pass NULL to standard library >> functions that manipulate arrays (e.g., qsort, memcpy, memcmp), even if >> the passed number of items is 0. >> >> UB Sanitizer reports: >>

Re: [ovs-dev] [PATCH v2 05/16] list: use short version of safe loops if possible

2022-02-15 Thread Ilya Maximets
On 2/15/22 13:58, Adrian Moreno wrote: > > > On 2/15/22 13:54, Ilya Maximets wrote: >> On 2/15/22 13:49, Adrian Moreno wrote: >>> >>> >>> On 2/15/22 13:42, Adrian Moreno wrote: On 2/14/22 18:30, Ilya Maximets wrote: > On 2/14/22 11:13, Adrian Moreno wrote: >> Using the

Re: [ovs-dev] [PATCH v2 05/16] list: use short version of safe loops if possible

2022-02-15 Thread Adrian Moreno
On 2/15/22 13:54, Ilya Maximets wrote: On 2/15/22 13:49, Adrian Moreno wrote: On 2/15/22 13:42, Adrian Moreno wrote: On 2/14/22 18:30, Ilya Maximets wrote: On 2/14/22 11:13, Adrian Moreno wrote: Using the SHORT version of the *_SAFE loops makes the code cleaner and less error-prone.

Re: [ovs-dev] [PATCH v2 05/16] list: use short version of safe loops if possible

2022-02-15 Thread Ilya Maximets
On 2/15/22 13:49, Adrian Moreno wrote: > > > On 2/15/22 13:42, Adrian Moreno wrote: >> >> >> On 2/14/22 18:30, Ilya Maximets wrote: >>> On 2/14/22 11:13, Adrian Moreno wrote: Using the SHORT version of the *_SAFE loops makes the code cleaner and less error-prone. So, use the SHORT

Re: [ovs-dev] [PATCH v2 05/16] list: use short version of safe loops if possible

2022-02-15 Thread Adrian Moreno
On 2/15/22 13:42, Adrian Moreno wrote: On 2/14/22 18:30, Ilya Maximets wrote: On 2/14/22 11:13, Adrian Moreno wrote: Using the SHORT version of the *_SAFE loops makes the code cleaner and less error-prone. So, use the SHORT version and remove the extra variable when possible. In order to

Re: [ovs-dev] [PATCH v2 05/16] list: use short version of safe loops if possible

2022-02-15 Thread Adrian Moreno
On 2/14/22 18:30, Ilya Maximets wrote: On 2/14/22 11:13, Adrian Moreno wrote: Using the SHORT version of the *_SAFE loops makes the code cleaner and less error-prone. So, use the SHORT version and remove the extra variable when possible. In order to be able to use both long and short

[ovs-dev] [PATCH v2 1/1] ovs-monitor-ipsec: Migration from ipsec.conf to swanctl.conf

2022-02-15 Thread Emeel Hakim via dev
As strongswan moved to the modern vici-based interface,this patch modifies ovs-monitor-ipsec to use strongswan's vici-based configuration instead of the legacy stroke-based configuration. Reviewed-by: Raed Salem Signed-off-by: Emeel Hakim --- v2: fixed Reviewed-by in the commit message.

Re: [ovs-dev] [PATCH 1/1] ovs-monitor-ipsec: Migration from ipsec.conf to swanctl.conf

2022-02-15 Thread Emeel Hakim via dev
Hi Mohammad, thanks for your quick reply. I will address the comments and send a V2 I just want to mention that there is a weird mistake in my submission the Reviewed-by in the commit message is wrong! im really confused here since I added Raed Salem as a Reviewed-by looks like it was an

Re: [ovs-dev] [ovs-dev v6] ofproto: add refcount to ofproto to fix ofproto use-after-free

2022-02-15 Thread Peng He
Adrian Moreno 于2022年2月15日周二 17:19写道: > Hi Peng, > > On 2/13/22 03:14, Peng He wrote: > > From hepeng: > > > https://patchwork.ozlabs.org/project/openvswitch/patch/20200717015041.82746-1-hepeng.0...@bytedance.com/#2487473 > > > > also from guohongzhi : > > >

[ovs-dev] [PATCH] ofproto/ofproto-dpif: Fix dpif_type for userspace tunnels

2022-02-15 Thread Wan Junjie
When we create two or more tunnels with the same type, only the first tunnel will be added by dpif since they share the same datapath port. Set the dpif_type here will clear the ioctl error logs. Fixes: 4f19a78 ("netdev-vport: Fix userspace tunnel ioctl(SIOCGIFINDEX) info logs.") Signed-off-by:

[ovs-dev] [PATCH v2] tc: Keep header rewrite actions order

2022-02-15 Thread Roi Dayan via dev
From: Chris Mi Currently, tc merges all header rewrite actions into one tc pedit action. So the header rewrite actions order is lost. Save each header rewrite action into one tc pedit action to keep the order. And only append one tc csum action to the last pedit action of a series.

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

2022-02-15 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. Patch skipped due to previous failure. Please check this out. If you feel there has been an error, please

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

2022-02-15 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. git-am: error: sha1 information is lacking or useless (lib/netdev-offload-tc.c). error: could not build fake

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

2022-02-15 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: Remove Gerrit Change-Id's before submitting upstream. 8: Change-Id:

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

2022-02-15 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: Remove Gerrit Change-Id's before submitting upstream. 9: Change-Id:

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

2022-02-15 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: Remove Gerrit Change-Id's before submitting upstream. 12: Change-Id:

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

2022-02-15 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: Remove Gerrit Change-Id's before submitting upstream. 13: Change-Id:

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

2022-02-15 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: Remove Gerrit Change-Id's before submitting upstream. 9: Change-Id:

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

2022-02-15 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: Remove Gerrit Change-Id's before submitting upstream. 8: Change-Id:

Re: [ovs-dev] [ovs-dev v6] ofproto: add refcount to ofproto to fix ofproto use-after-free

2022-02-15 Thread Adrian Moreno
Hi Peng, On 2/13/22 03:14, Peng He wrote: From hepeng: https://patchwork.ozlabs.org/project/openvswitch/patch/20200717015041.82746-1-hepeng.0...@bytedance.com/#2487473 also from guohongzhi : http://patchwork.ozlabs.org/project/openvswitch/patch/20200306130555.19884-1-guohongz...@huawei.com/

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

2022-02-15 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 Issue: 2181036 Change-Id: Iab54cbdd18fea3cc99d707cdbde103ecd9a17341 Signed-off-by: Chris Mi

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

2022-02-15 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. Issue: 2181036 Change-Id: Ic73cb614a51fee1cb3f6e606c6fccaf3de70c437 Signed-off-by: Chris Mi

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

2022-02-15 Thread Chris Mi via dev
Load kernel module psample to receive sampled packets from TC. Before removing kernel module psample, remove act_sample first. Issue: 2181036 Change-Id: I494b8e5e9ebda64376c6f0bcdb6138d49de5c134 Signed-off-by: Chris Mi Reviewed-by: Eli Britstein Acked-by: Eelco Chaudron ---

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

2022-02-15 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 v20 3/8] dpif-offload-provider: Introduce dpif-offload-provider layer

2022-02-15 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. Issue: 2181036 Change-Id:

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

2022-02-15 Thread Chris Mi via dev
Process sFlow offload packet in handler thread if handler id is 0. Issue: 2181036 Change-Id: I40e0add3bff69751d8f957e5eeff58c665dd5d45 Signed-off-by: Chris Mi Reviewed-by: Eli Britstein Acked-by: Eelco Chaudron --- ofproto/ofproto-dpif-upcall.c | 73 +++ 1 file

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

2022-02-15 Thread Chris Mi via dev
Implement dpif-offload API for netlink datapath. And implement a dummy dpif-offload API for netdev datapath to make tests pass. Issue: 2181036 Change-Id: I950c3cc3c7092c3d87602da8928ad4aa2df4f38a Signed-off-by: Chris Mi Reviewed-by: Eli Britstein --- lib/automake.mk | 2 +

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

2022-02-15 Thread Chris Mi via dev
Update kernel UAPI to support psample and the tc sample action. Issue: 2181036 Change-Id: I67822667494230bdc1d1f4b2217d019a65486ad3 Signed-off-by: Chris Mi Reviewed-by: Eli Britstein Acked-by: Eelco Chaudron --- include/linux/automake.mk| 4 ++- include/linux/psample.h | 62

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

2022-02-15 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