Re: [ovs-dev] [ovn] ovn reporting port up

2021-09-24 Thread Han Zhou
On Fri, Sep 24, 2021 at 7:27 AM Numan Siddique wrote: > > On Fri, Sep 24, 2021 at 7:22 AM Dumitru Ceara wrote: > > > > On 9/24/21 12:06 PM, Xavier Simonart wrote: > > > Hi > > > > > > > Hi Xavier, > > > > > I have the following question on when ovn is reporting a port to be up if > > >

[ovs-dev] [PATCH v3 ovn 4/4] controller: binding: add memory accounting for local_lports and related_lports

2021-09-24 Thread Lorenzo Bianconi
Introduce memory accounting for: - binding local_lports map - binding related_lports map Signed-off-by: Lorenzo Bianconi --- controller/binding.c| 59 + controller/binding.h| 5 controller/ovn-controller.c | 5 ++-- 3 files changed, 67

[ovs-dev] [PATCH v3 ovn 2/4] controller: add memory accounting for if_status_mgr module

2021-09-24 Thread Lorenzo Bianconi
Introduce memory accounting for data structures in ovn-controller if_status_mgr module. Signed-off-by: Lorenzo Bianconi --- controller/if-status.c | 33 + controller/if-status.h | 3 +++ controller/ovn-controller.c | 1 + 3 files changed, 37

[ovs-dev] [PATCH v3 ovn 3/4] controller: add memory accounting for local_datapath

2021-09-24 Thread Lorenzo Bianconi
Similar to if-status-mgr, track memory allocated for local_datapath. Signed-off-by: Lorenzo Bianconi --- controller/binding.c| 3 +++ controller/local_data.c | 50 + controller/local_data.h | 3 +++ controller/ovn-controller.c | 1 + 4

[ovs-dev] [PATCH v3 ovn 1/4] controller: do not allocate iface name twice in if_status_mgr module

2021-09-24 Thread Lorenzo Bianconi
Rely on shash_add_nocopy instead of shash_add in ovs_iface_create in order to avoid allocating iface_id twice. Signed-off-by: Lorenzo Bianconi --- controller/if-status.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/controller/if-status.c b/controller/if-status.c

[ovs-dev] [PATCH v3 ovn 0/4] add memory accounting for if_status_mgr module

2021-09-24 Thread Lorenzo Bianconi
Changes since v2: - add local_datapath and binding {local_lports,related_lports} memory accouting Changes since v1: - add ovs_iface_account_mem utility routine - rely on shash_add_nocopy in ovs_iface_create Lorenzo Bianconi (4): controller: do not allocate iface name twice in if_status_mgr

[ovs-dev] [PATCH] include/openvswitch/compiler.h: enable several OVS_ attributes for Clang in Windows

2021-09-24 Thread Sergey Madaminov
Clang on Windows does not necessarily have '__GNUC__' defined when compiling OvS on Windows. However, it supports the attributes such as '__unused__' and the rest in this macro-defined branch. Instead of defining '__GNUC__' with a flag '-fgnuc_version=X' (X is a version), which may have a larger

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

2021-09-24 Thread remijouannet
From: Remi Jouannet --- utilities/ovs-ctl.in | 4 1 file changed, 4 insertions(+) diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in index 7180079..389e064 100644 --- a/utilities/ovs-ctl.in +++ b/utilities/ovs-ctl.in @@ -431,6 +431,10 @@ Debugging options for "start", "restart" and

Re: [ovs-dev] [ovn] ovn reporting port up

2021-09-24 Thread Numan Siddique
On Fri, Sep 24, 2021 at 7:22 AM Dumitru Ceara wrote: > > On 9/24/21 12:06 PM, Xavier Simonart wrote: > > Hi > > > > Hi Xavier, > > > I have the following question on when ovn is reporting a port to be up if > > conditional monitoring is enabled. > > > > In the current ovn master, if conditional

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

2021-09-24 Thread Ilya Maximets
On 9/23/21 01:47, Ilya Maximets wrote: > 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

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

2021-09-24 Thread Ilya Maximets
On 9/23/21 22:51, Dumitru Ceara wrote: > On 9/23/21 2:13 AM, Ilya Maximets wrote: >> 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

[ovs-dev] [PATCH ovn] nbctl: allow multiple bfd sessions with same nexthop and different outports

2021-09-24 Thread Lorenzo Bianconi
Allow CMS to create multiple bfd sessions with the same nexthop but different outports: ovn-nbctl --bfd --policy=src-ip --ecmp-symmetric-reply lr-route-add GR_ovn-worker 10.244.0.5/32 172.18.0.4 rtoe-GR_ovn-worker ovn-nbctl --bfd --policy=src-ip --ecmp-symmetric-reply lr-route-add

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

2021-09-24 Thread Ilya Maximets
On 9/22/21 09:25, Roi Dayan wrote: > > > 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

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

2021-09-24 Thread Mark Gray
On 24/09/2021 12:01, Ilya Maximets wrote: > On 9/24/21 11:12, Mark Gray wrote: >> On 23/09/2021 01:13, Ilya Maximets wrote: >>> 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

[ovs-dev] [PATCH] json: SORT json only if debug is enabled

2021-09-24 Thread anton . ivanov
From: Anton Ivanov No point to abuse CPU with sorting (in a worst case scenario - up to million of rows in OVN) unless a human is reading the result. The machine on the other side could not care less if it is sorted or not. Signed-off-by: Anton Ivanov --- lib/json.c | 9 - 1 file

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

2021-09-24 Thread Numan Siddique
On Wed, Sep 22, 2021 at 8:18 AM Vladislav Odintsov wrote: > > 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

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

2021-09-24 Thread Eelco Chaudron
Hi Martin, See my comments below... Cheers, Eelco On 30 Aug 2021, at 14:40, Martin Varghese wrote: > From: Martin Varghese > > The encap & decap actions are extended to support MPLS packet type. > Encap & decap actions adds and removes MPLS header at start of the > packet. > > The existing

Re: [ovs-dev] [ovn] ovn reporting port up

2021-09-24 Thread Dumitru Ceara
On 9/24/21 12:06 PM, Xavier Simonart wrote: > Hi > Hi Xavier, > I have the following question on when ovn is reporting a port to be up if > conditional monitoring is enabled. > > In the current ovn master, if conditional monitoring is enabled, a port is > reported up too early i.e. before all

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

2021-09-24 Thread Ilya Maximets
On 9/23/21 10:58, Mark Gray wrote: > On 23/09/2021 00:47, 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:

[ovs-dev] [PATCH] [PATCH] dpif-netdev: Avoid meter not working while burst is small

2021-09-24 Thread taoyunxiang
While busrt is smaller than rate/1000, the band_max_delta_t will be set to 0. And than, it will cause the buckt in dp_netdev_run_meter being 0, eventually it will make the packets be dropped. This fix will set the band_max_delta_t to 1, if busrt is too small, to avoid meter not working.

[ovs-dev] [PATCH] [PATCH] dpif-netdev: Avoid meter not working while burst is small

2021-09-24 Thread taoyunxiang
While busrt is smaller than rate/1000, the band_max_delta_t will be set to 0. And than, it will cause the buckt in dp_netdev_run_meter being 0, eventually it will make the packets be dropped. This fix will set the band_max_delta_t to 1, if busrt is too small, to avoid meter not working.

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

2021-09-24 Thread Ilya Maximets
On 9/23/21 09:36, Han Zhou wrote: > > > On Wed, Sep 22, 2021 at 4:47 PM 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)) >>  

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

2021-09-24 Thread Ilya Maximets
On 9/24/21 11:12, Mark Gray wrote: > On 23/09/2021 01:13, Ilya Maximets wrote: >> 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

[ovs-dev] [PATCH ovn] doc: Fix Update Openflow Table numbers

2021-09-24 Thread Xavier Simonart
Openflow tables OFTABLE_REMOTE_OUTPUT, OFTABLE_LOCAL_OUTPUT and OFTABLE_CHECK_LOOPBACK numbering changed, but documentation was not updated. Fixes: dd94f1266c ("northd: MAC learning: Add logical flows for fdb.") Signed-off-by: Xavier Simonart --- controller/physical.c | 40

[ovs-dev] [PATCH v2] jsonrpc: Sort JSON objects only if debug is on

2021-09-24 Thread anton . ivanov
From: Anton Ivanov There is no point to sort JSON objects when nobody is observing them. Machines do not care if it is sorted or not. Signed-off-by: Anton Ivanov --- lib/jsonrpc.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/jsonrpc.c b/lib/jsonrpc.c index

[ovs-dev] [ovn] ovn reporting port up

2021-09-24 Thread Xavier Simonart
Hi I have the following question on when ovn is reporting a port to be up if conditional monitoring is enabled. In the current ovn master, if conditional monitoring is enabled, a port is reported up too early i.e. before all related flows are properly installed in ovs. Packets sent through ovs

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

2021-09-24 Thread Mark Gray
On 23/09/2021 01:13, Ilya Maximets wrote: > 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

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

2021-09-24 Thread Chris Mi via dev
Hi Simon, On 9/24/2021 3:03 PM, Simon Horman wrote: On Thu, Sep 16, 2021 at 11:38:52AM +0300, Chris Mi wrote: 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 -

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

2021-09-24 Thread Simon Horman
On Thu, Sep 16, 2021 at 11:38:52AM +0300, Chris Mi wrote: > 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