[ovs-dev] [PATCH v2 ovn] Fix basic multicast flows for vxlan (non-vtep) tunnels

2021-09-22 Thread Ihar Hrachyshka
The 15-bit port key range used for multicast groups can't be covered by 12-bit key space available for port keys in VXLAN. To make multicast keys work, we have to transform 16-bit multicast port keys to 12-bit keys before fanning out packets through VXLAN tunnels. Otherwise significant bits are not

[ovs-dev] [PATCH v2 ovn] Enforce datapath and port key constraints in vxlan mode

2021-09-22 Thread Ihar Hrachyshka
With vxlan enabled for in-cluster communication, the ranges available for port and datapath keys are limited to 12 bits (including multigroup keys). (The default range is 16 bit long.) This means that OVN should avoid allocating, or allowing to request, tunnel keys for datapaths and ports that are

[ovs-dev] [PATCH] ovsdb-data: Deduplicate string atoms.

2021-09-22 Thread Ilya Maximets
ovsdb-server spends a lot of time cloning atoms for various reasons, e.g. to create a diff of two rows or to clone a row to the transaction. All atoms, except for strings, contains a simple value that could be copied in efficient way, but duplicating strings every time has a significant performance

[ovs-dev] [PATCH v3 2/3] ovsdb-data: Optimize subtraction of sets.

2021-09-22 Thread Ilya Maximets
Current algorithm for ovsdb_datum_subtract looks like this: for-each atom in a: if atom in b: swap(atom, ) destroy(atom) quicksort(a) Complexity: Na * log2(Nb) + (Na - Nb) * log2(Na - Nb) Search Comparisons for quicksort It's not optimal, especiall

[ovs-dev] [PATCH v3 3/3] ovsdb-datum: Add function to apply diff in-place.

2021-09-22 Thread Ilya Maximets
ovsdb_datum_apply_diff() is heavily used in ovsdb transactions, but it's linear in terms of number of comparisons. And it also clones all the atoms along the way. In most cases size of a diff is much smaller than the size of the original datum, this allows to perform the same operation in-place w

[ovs-dev] [PATCH v3 1/3] ovsdb-data: Optimize union of sets.

2021-09-22 Thread Ilya Maximets
Current algorithm of ovsdb_datum_union looks like this: for-each atom in b: if not bin_search(a, atom): push(a, clone(atom)) quicksort(a) So, the complexity looks like this: Nb * log2(Na) +Nb + (Na + Nb) * log2(Na + Nb) Comparisonsclones Compar

[ovs-dev] [PATCH v3 0/3] ovsdb: Optimize set operations.

2021-09-22 Thread Ilya Maximets
Version 3: - Updated ovsdb_datum_find_key() signature to return a boolean result and the position as an argument. - Added a few extra comments. - Re-organized subtraction to use 'start_idx' in 2 places and to set it in a more readable way. - Other small adjustments for code clarity.

Re: [ovs-dev] [PATCH] ovsdb: transaction: Use diffs for strong reference counting.

2021-09-22 Thread Ilya Maximets
On 9/22/21 13:16, Dumitru Ceara wrote: > On 9/22/21 1:14 PM, Dumitru Ceara wrote: >> On 9/16/21 10:15 PM, Ilya Maximets wrote: >>> Currently, even if one reference added to the set of strong references >>> or removed from it, ovsdb-server will walk through the whole set and >>> re-count references

Re: [ovs-dev] dpif-netdev.c : remove dpif OVS_UNUSED flag.

2021-09-22 Thread Ilya Maximets
On 9/22/21 16:06, David Marchand wrote: > On Fri, Sep 17, 2021 at 2:30 PM lin huang wrote: >> >> From: linhuang >> >> The dpif is used, so remove the OVS_UNUSED flag. >> >> Signed-off-by: linhuang > > Lin, > > Usually, reviewers are Cc'd on a new revision of a patch, so please keep me > Cc:.

Re: [ovs-dev] [PATCH ovn v4 9/9] plug_providers: Introduce representor plugin.

2021-09-22 Thread Numan Siddique
On Tue, Sep 21, 2021 at 3:41 AM Han Zhou wrote: > > On Fri, Sep 3, 2021 at 12:27 PM Frode Nordahl > wrote: > > > > Add the first in-tree plug provider plugin and its dependencies. > > The representor plugin can be used with multiple NIC vendors > > supporting Open vSwitch hardware offload and the

Re: [ovs-dev] [PATCH] cirrus: Reduce memory requirements for FreeBSD VMs.

2021-09-22 Thread Ilya Maximets
On 9/16/21 14:42, Aaron Conole wrote: > Ilya Maximets writes: > >> According to memory usage graphs, our builds are using 3GB at most. >> Reducing memory requirements to 4GB to have some room. This change >> doesn't affect time needed to finish the build, but should have a >> slight positive eff

Re: [ovs-dev] [PATCH v2 2/2] ovsdb-data: Optimize subtraction of sets.

2021-09-22 Thread Ilya Maximets
On 9/22/21 23:28, Ilya Maximets wrote: > On 9/21/21 12:33, Mark Gray wrote: >> On 17/09/2021 18:17, Ilya Maximets wrote: >>> Current algorithm for ovsdb_datum_subtract looks like this: >>> >>> for-each atom in a: >>> if atom in b: >>> swap(atom, ) >>> destroy(atom) >>>

Re: [ovs-dev] [PATCH ovn v2] controller: Allow specifying tos option for tunnel interface

2021-09-22 Thread Han Zhou
On Wed, Sep 22, 2021 at 8:26 AM wrote: > > From: Venugopal Iyer > > Currently, OVN tunnel interface supports the csum option along > with remote_ip and key. There are applications (e.g. RoCE) that rely > on setting the DSCP bits and expect it to be moved to the outer/ > tunnel header as well. > >

Re: [ovs-dev] [PATCH v2 2/2] ovsdb-data: Optimize subtraction of sets.

2021-09-22 Thread Ilya Maximets
On 9/21/21 12:33, Mark Gray wrote: > On 17/09/2021 18:17, Ilya Maximets wrote: >> Current algorithm for ovsdb_datum_subtract looks like this: >> >> for-each atom in a: >> if atom in b: >> swap(atom, ) >> destroy(atom) >> quicksort(a) >> >> Complexity: >> >> Na * log2

Re: [ovs-dev] [PATCH v2 1/2] ovsdb-data: Optimize union of sets.

2021-09-22 Thread Ilya Maximets
On 9/21/21 12:34, Mark Gray wrote: > On 17/09/2021 18:17, Ilya Maximets wrote: >> Current algorithm of ovsdb_datum_union looks like this: >> >> for-each atom in b: >> if not bin_search(a, atom): >> push(a, clone(atom)) >> quicksort(a) >> >> So, the complexity looks like this: >>

Re: [ovs-dev] [PATCH ovn] ovn-northd: Virtual port add ND/ARP responder flows for IPv6 VIPs.

2021-09-22 Thread Mohammad Heib
Hi Dumitru, Thanks for the review:) On 9/21/21 5:14 PM, Dumitru Ceara wrote: On 9/20/21 3:20 PM, mh...@redhat.com wrote: From: Mohammad Heib currently ovn-northd only handle virtual ports with VIP IPv4 and ignores virtual ports with VIP IPv6. This patch adds support for virtual ports with

[ovs-dev] [PATCH ovn v2] ovn-northd: Virtual port add ND/ARP responder flows for IPv6 VIPs.

2021-09-22 Thread mheib
From: Mohammad Heib currently ovn-northd only handle virtual ports with VIP IPv4 and ignores virtual ports with VIP IPv6. This patch adds support for virtual ports with VIP IPv6 by adding lflows to the lsp_in_arp_rsp logical switch pipeline. Those lflows handle Neighbor Solicitations and Neighbo

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

2021-09-22 Thread Michael Santana
On 9/15/21 5:32 PM, sergey.madami...@gmail.com wrote: From: Sergey Madaminov Several 'sflow' functions (sfl_poller_tick, sfl_sampler_tick, and sfl_receiver_tick) have unused parameter 'now' in their signatures. This patch removes that parameter from their signatures to fix compilation warnin

Re: [ovs-dev] ofproto use after free with meters

2021-09-22 Thread Ilya Maximets
On 9/22/21 17:17, David Marchand wrote: > Hello, > > That is more a FYI, in case nobody noticed. > > I did not analyse it. > GHA ASan build caught it 3 times over past days. Yeah, it's kind of a "well-known" issue. And there are several issues here. One that ofproto itself needs RCu/refcounting

Re: [ovs-dev] [PATCH v2] ovsdb-server: Log database transactions for user requested tables.

2021-09-22 Thread Dumitru Ceara
On 9/22/21 5:25 PM, Michael Santana wrote: > > > On 9/22/21 3:24 AM, Dumitru Ceara wrote: >> On 9/21/21 6:12 PM, Michael Santana wrote: >>> >>> >>> On 9/16/21 11:37 AM, Dumitru Ceara wrote: Add a new command, 'ovsdb-server/log-db-ops DB TABLE on|off', which allows the user to enable/dis

Re: [ovs-dev] [PATCH ovn] controller: add memory accounting for if_status_mgr module

2021-09-22 Thread Michael Santana
On 9/16/21 8:56 AM, Lorenzo Bianconi wrote: Introduce memory accounting for data structures in ovn-controller if_status_mgr module. Signed-off-by: Lorenzo Bianconi --- controller/if-status.c | 23 +++ controller/if-status.h | 3 +++ controller/ovn-controlle

[ovs-dev] [PATCH ovn v2] controller: Allow specifying tos option for tunnel interface

2021-09-22 Thread venugopali--- via dev
From: Venugopal Iyer Currently, OVN tunnel interface supports the csum option along with remote_ip and key. There are applications (e.g. RoCE) that rely on setting the DSCP bits and expect it to be moved to the outer/ tunnel header as well. This commit adds an "ovn-encap-tos" external-id that ca

Re: [ovs-dev] [PATCH v2] ovsdb-server: Log database transactions for user requested tables.

2021-09-22 Thread Michael Santana
On 9/22/21 3:24 AM, Dumitru Ceara wrote: On 9/21/21 6:12 PM, Michael Santana wrote: On 9/16/21 11:37 AM, Dumitru Ceara wrote: Add a new command, 'ovsdb-server/log-db-ops DB TABLE on|off', which allows the user to enable/disable transaction logging for specific databases and tables. By defa

[ovs-dev] ofproto use after free with meters

2021-09-22 Thread David Marchand
Hello, That is more a FYI, in case nobody noticed. I did not analyse it. GHA ASan build caught it 3 times over past days. Last example: https://github.com/ovsrobot/ovs/runs/3632261562?check_suite_focus=true It happens when OVS is terminated: ==478==ERROR: AddressSanitizer: heap-use-after-free

[ovs-dev] [PATCH v2 4/4] netdev-offload-dpdk: Add support for matching on gre fields

2021-09-22 Thread Nir Anteby via dev
Add parsing gre match fields. Signed-off-by: Nir Anteby --- NEWS | 2 + lib/netdev-offload-dpdk.c | 96 +++ 2 files changed, 98 insertions(+) diff --git a/NEWS b/NEWS index 90f4b15..fd02d7d 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +

[ovs-dev] [PATCH 0/4] netdev datapath hardware offload support for GRE flows

2021-09-22 Thread Nir Anteby via dev
Add hardware offload support for GRE flows (experimental). Available only if DPDK experimantal APIs enabled during the build. Subject: [PATCH v2 0/4] netdev datapath hardware offload support for GRE flows V1: Add hardware offload support for GRE flows (experimental). Available only if DPDK exper

[ovs-dev] [PATCH v2 3/4] netdev-offload-dpdk: Support tnl_pop for gre tunnel

2021-09-22 Thread Nir Anteby via dev
Add support for tnl_pop action for gre vport. Signed-off-by: Nir Anteby --- lib/netdev-offload-dpdk.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c index 10924de..5c721fe 100644 --- a/lib/netdev-offload-dpdk.c +++ b/lib/net

[ovs-dev] [PATCH v2 1/4] netdev-offload-dpdk: Refactor get_vport_netdev()

2021-09-22 Thread Nir Anteby via dev
Refactor the function as a pre-step towards supporting more tunnel types. Signed-off-by: Nir Anteby --- lib/netdev-offload-dpdk.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c index 9fee757..10924

[ovs-dev] [PATCH v2 2/4] netdev-dpdk: Add flow_api support for netdev gre vports

2021-09-22 Thread Nir Anteby via dev
Add the acceptance of GRE devices to netdev_dpdk_flow_api_supported() API, to allow offloading of DPDK GRE devices. Signed-off-by: Nir Anteby --- lib/netdev-dpdk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index ca92c94..0630048 1

Re: [ovs-dev] dpif-netdev.c : remove dpif OVS_UNUSED flag.

2021-09-22 Thread David Marchand
On Fri, Sep 17, 2021 at 2:30 PM lin huang wrote: > > From: linhuang > > The dpif is used, so remove the OVS_UNUSED flag. > > Signed-off-by: linhuang Lin, Usually, reviewers are Cc'd on a new revision of a patch, so please keep me Cc:. Also submit new revision with a version number. Ilya, Th

Re: [ovs-dev] [PATCH 0/4] netdev datapath hardware offload support for GRE flows

2021-09-22 Thread Maxime Coquelin
Hi Nir, On 9/14/21 10:05, Nir Anteby via dev wrote: Add hardware offload support for GRE flows (experimental). Available only if DPDK experimantal APIs enabled during the build. Nir Anteby (4): netdev-offload-dpdk: Refactor get_vport_netdev() netdev-dpdk: Add flow_api support for netdev g

[ovs-dev] [PATCH ovn] rhel: replace try-restart with restart in ovn-controller %postun

2021-09-22 Thread Vladislav Odintsov
In commit [1] support for graceful stop during ovn-controller RPM upgrade was added. Unfortunately there was an error, where after ovn-controller service stop via ctl socket was invoked, systemd service transitioned to dead state and subsequent try-restart didn't start the service. This commit fix

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

2021-09-22 Thread Cian Ferriter
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 the commands that the host2 IP addresses should be used i

Re: [ovs-dev] [PATCH] ovsdb: transaction: Use diffs for strong reference counting.

2021-09-22 Thread Dumitru Ceara
On 9/22/21 1:14 PM, Dumitru Ceara wrote: > On 9/16/21 10:15 PM, Ilya Maximets wrote: >> Currently, even if one reference added to the set of strong references >> or removed from it, ovsdb-server will walk through the whole set and >> re-count references to other rows. These referenced rows will al

Re: [ovs-dev] [PATCH] ovsdb: transaction: Use diffs for strong reference counting.

2021-09-22 Thread Dumitru Ceara
On 9/16/21 10:15 PM, Ilya Maximets wrote: > Currently, even if one reference added to the set of strong references > or removed from it, ovsdb-server will walk through the whole set and > re-count references to other rows. These referenced rows will also be > added to the transaction in order to r

[ovs-dev] [PATCH ovn] northd: do not run find_lrp_member_ip with empty nexthop

2021-09-22 Thread Lorenzo Bianconi
Do not run find_lrp_member_ip in find_static_route_outport if the route has been configured without a valid nexthop. This patch fixes the following northd warning: 2021-09-18T06:01:37.909Z|8|ovn_northd|WARN|bad ipv6 address Fixes: c00852288 ("northd: allow to configure routes with no nexthop"

Re: [ovs-dev] [PATCH 0/4] dpif-netdev: rxq auto-lb improvements

2021-09-22 Thread Anurag Agarwal via dev
Thanks Kevin. We'll surely discuss and consider these inputs. Regards, Anurag -Original Message- From: Kevin Traynor Sent: Friday, September 17, 2021 2:13 PM To: Anurag Agarwal ; Ilya Maximets ; anura...@gmail.com; d...@openvswitch.org Cc: rudrasury...@acldigital.com; Anju Thomas ;

Re: [ovs-dev] [PATCH ovn] northd: Fix multicast relay when DGP are configured.

2021-09-22 Thread Dumitru Ceara
On 9/22/21 3:24 AM, Numan Siddique wrote: > On Tue, Sep 21, 2021 at 1:50 PM Han Zhou wrote: >> >> On Tue, Sep 21, 2021 at 6:50 AM Dumitru Ceara wrote: >>> >>> IP multicast relay didn't work properly if traffic had to be forwarded >>> across a distributed gateway port in the router pipeline. That

Re: [ovs-dev] [PATCH v2 0/6] Add support for ovs metering with tc offload

2021-09-22 Thread Roi Dayan via dev
On 2021-09-02 3:59 PM, Roi Dayan wrote: Hi, This series is adding support for tc offloading of ovs metering. The first 3 patches add lib support. 4th patch adding tc police actions to reflect ovs metering. 5th patch cleaning existing tc police actions on start to avoid conflicts. last patch i

Re: [ovs-dev] [PATCH v2] ovsdb-server: Log database transactions for user requested tables.

2021-09-22 Thread Dumitru Ceara
On 9/21/21 6:12 PM, Michael Santana wrote: > > > On 9/16/21 11:37 AM, Dumitru Ceara wrote: >> Add a new command, 'ovsdb-server/log-db-ops DB TABLE on|off', which >> allows the user to enable/disable transaction logging for specific >> databases and tables. >> >> By default, logging is disabled.