[ovs-dev] [PATCH ovn 4/6] Add new egress tables to accommodate for too-big packets handling

2023-05-02 Thread Ihar Hrachyshka
The new tables will be used in a later patch as follows: table=37, OFTABLE_OUTPUT_INIT: becomes an initial entry point into the egress pipeline that serves a semantic goal. (Not doing any actual processing at the moment.) table=38, OFTABLE_OUTPUT_LARGE_PKT_DETECT: detect "too-big" IP packets and

[ovs-dev] [PATCH ovn 6/6] Update multichassis physical flows on interface MTU update

2023-05-02 Thread Ihar Hrachyshka
Make ICMP Path MTU Discovery flows in table=38 react to underlying interface MTU update. NOTE: ideally, OVN would support Logical_Port MTU, in which case we wouldn't have to track OVSDB for interfaces, and we would also be able to react to MTU changes regardless of interface location. This patch i

[ovs-dev] [PATCH ovn 5/6] Implement MTU Path Discovery for multichassis ports

2023-05-02 Thread Ihar Hrachyshka
When a multichassis port belongs to a switch with a localnet port, packets originating or directed to the multichassis port are NOT sent thorugh the localnet port. Instead, tunneling is enforced in-cluster to guarantee delivery of all packets to all chassis of the port. This behavior has an unfort

[ovs-dev] [PATCH ovn 3/6] if-status: track interfaces for additional chassis

2023-05-02 Thread Ihar Hrachyshka
This will allow all chassis hosting a port to extract interface MTU from if-status-mgr. This will be used in a later patch to calculate the effective path MTU for each port. In addition, it's the right thing to do to claim and mark an interface on all chassis as ovn-installed, even if the chassis

[ovs-dev] [PATCH ovn 2/6] Track interface MTU in if-status-mgr

2023-05-02 Thread Ihar Hrachyshka
This will be used in a later patch to calculate the effective interface MTU after considering tunneling overhead. Signed-off-by: Ihar Hrachyshka --- controller/binding.c | 4 ++-- controller/if-status.c | 31 +++ controller/if-status.h | 3 +++ 3 files changed, 32

[ovs-dev] [PATCH ovn 1/6] Track ip version of tunnel in chassis_tunnel struct

2023-05-02 Thread Ihar Hrachyshka
This will be used in a later patch to calculate tunneling overhead for effective path MTU. Signed-off-by: Ihar Hrachyshka --- controller/local_data.c | 2 ++ controller/local_data.h | 1 + 2 files changed, 3 insertions(+) diff --git a/controller/local_data.c b/controller/local_data.c index acaf

[ovs-dev] [PATCH ovn 0/6] Implement MTU Path Discovery for multichassis ports

2023-05-02 Thread Ihar Hrachyshka
This series fixes a non-optimal behavior with some multichassis ports. Specifically, - when a multichassis port belongs to a switch that also has a localnet port, - because ingress and egress traffic for the port is funnelled through tunnels to guarantee delivery of packets to all chassis tha

Re: [ovs-dev] [PATCH ovn] utilities: disable OVSDB inactivity probes for non-daemon ovn-nbctl

2023-05-02 Thread Vladislav Odintsov
Hi Dumitru, I’m a bit concerned about our last conversation’s idea how to set inactivity probe. The point is that in general case dbctl module can be used by multiple existing and possible future ovn-*ctl utilities. So, to configure a basic (we may call it a "startup" idl inactivity probe), whi

[ovs-dev] [PATCH ovn v2] utilities: increase OVSDB inactivity probe interval for ovn-*ctl

2023-05-02 Thread Vladislav Odintsov
For large OVN_Southbound (or other) databases the default interval of 5000 ms could be not sufficient to run. This patch adds configuration of OVSDB inactivity probes for ovn-*ctl utilities. Initially, on the utility start the hardcoded value of 12 ms is set. For daemon-mode it is possible to

Re: [ovs-dev] [PATCH] dpif-netdev: Add config option for vhost tx_steering default mode

2023-05-02 Thread 0-day Robot
Bleep bloop. Greetings Christophe Fontaine, 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: WARNING: Line has non-spaces leading whitespace #104 FILE: lib/dpif-netdev.c:5160:

[ovs-dev] [PATCH] dpif-netdev: Add config option for vhost tx_steering default mode

2023-05-02 Thread Christophe Fontaine
Current tx_steering mode has to be configured on each Interface. The global config option "vhost-tx-steering-default" allows the user to select a default mode (thread or hash) for all dpdkvhost ports. Signed-off-by: Christophe Fontaine --- NEWS | 1 + lib/dpif-netdev.c| 43 +

Re: [ovs-dev] [Patch ovn v3] pinctrl: fix restart of controller when bfd min_tx set to 1

2023-05-02 Thread Mark Michelson
Thanks! I added Ales's ack from v2 and pushed this change to main and all branches back to 22.03. I changed the subject line to: "fix restart of controller when bfd min_tx is too low." I changed it since the problem happens when min_tx is <= 4, not just 1. On 4/27/23 02:25, wangchuanlei wrot

[ovs-dev] [PATCH v10 8/8] treewide: Add `ovs_assert` to check for null pointers

2023-05-02 Thread James Raphael Tiovalen
This patch adds an assortment of `ovs_assert` statements to check for null pointers. We use assertions since it should be impossible for any of these pointers to be NULL. Signed-off-by: James Raphael Tiovalen Reviewed-by: Simon Horman --- lib/dp-packet.c| 1 + lib/dpctl.c| 4

[ovs-dev] [PATCH v10 6/8] ovs-vsctl: Fix crash when routing is enabled

2023-05-02 Thread James Raphael Tiovalen
In the case where routing is enabled, the bridge member of the `vsctl_port` structs is not populated. This can cause a crash if we attempt to access it. This patch fixes the crash by checking if the bridge member is valid before attempting to access it. In the `check_conflicts` function, we print b

[ovs-dev] [PATCH v10 7/8] lib, ovsdb: Add various null pointer checks

2023-05-02 Thread James Raphael Tiovalen
This commit adds various null pointer checks to some files in the `lib` and the `ovsdb` directories to fix several Coverity defects. These changes are grouped together as they perform similar checks, returning early or skipping some action if a null pointer is encountered. Signed-off-by: James Rap

[ovs-dev] [PATCH v10 5/8] file, monitor: Add null pointer assertions for old and new ovsdb_rows

2023-05-02 Thread James Raphael Tiovalen
This commit adds non-null pointer assertions in some code that performs some decisions based on old and new input ovsdb_rows. Signed-off-by: James Raphael Tiovalen --- ovsdb/file.c| 2 ++ ovsdb/monitor.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ovsdb/file.c b/o

[ovs-dev] [PATCH v10 3/8] shash, simap, smap: Add assertions to `*_count` functions

2023-05-02 Thread James Raphael Tiovalen
This commit adds assertions in the functions `shash_count`, `simap_count`, and `smap_count` to ensure that the corresponding input struct pointer is not NULL. This ensures that if the return values of `shash_sort`, `simap_sort`, or `smap_sort` are NULL, then the following for loops would not attem

[ovs-dev] [PATCH v10 4/8] ovsdb: Assert and check return values of `ovsdb_table_schema_get_column`

2023-05-02 Thread James Raphael Tiovalen
This commit adds a few null pointer assertions and checks to some return values of `ovsdb_table_schema_get_column`. If a null pointer is encountered in these blocks, either the assertion will fail or the control flow will now be redirected to alternative paths which will output the appropriate erro

[ovs-dev] [PATCH v10 2/8] lib, ovs-vsctl: Add zero-initializations

2023-05-02 Thread James Raphael Tiovalen
This commit adds zero-initializations by changing `SFL_ALLOC` from `malloc` to `xzalloc`, adding a `memset` call to `sflAlloc`, initializing a `pollfd` struct variable with zeroes, and changing some calls to `xmalloc` to `xzalloc`. This is to prevent potential data leaks or undefined behavior from

[ovs-dev] [PATCH v10 1/8] lib: Add non-null assertions to some return values of `dp_packet_data`

2023-05-02 Thread James Raphael Tiovalen
This commit adds some `ovs_assert()` checks to some return values of `dp_packet_data()` to ensure that they are not NULL and to prevent null-pointer dereferences, which might lead to unwanted crashes. We use assertions since it should be impossible for these calls to `dp_packet_data()` to return NU

[ovs-dev] [PATCH v10 0/8] treewide: Fix multiple Coverity defects

2023-05-02 Thread James Raphael Tiovalen
This cleanup patchset addresses several high and medium-impact Coverity defects. Unit tests have been successfully executed via `make check` and they successfully passed. The list of revisions so far: v2: Fix some apply-robot checkpatch errors and warnings. v3: Fix some apply-robot checkpatch e

Re: [ovs-dev] [PATCH ovn] ovn-nbctl: Fix unhandled NULL return from normalize_prefix_str

2023-05-02 Thread Mark Michelson
Thanks Ales and Simon Acked-by: Mark Michelson I pushed the change to main and to all branches back to 22.03. On 4/24/23 09:07, Simon Horman wrote: On Thu, Apr 20, 2023 at 03:38:53PM +0200, Ales Musil wrote: The normalize_prefix_str returns NULL when it fails to normalize the specified string

Re: [ovs-dev] [PATCH v9 8/8] treewide: Add `ovs_assert` to check for null pointers

2023-05-02 Thread 0-day Robot
Bleep bloop. Greetings James Raphael Tiovalen, 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 (ovsdb/monitor.c). error: could not build f

Re: [ovs-dev] [PATCH ovn v1] northd: Decrease arp_proxy priority to 30

2023-05-02 Thread Dumitru Ceara
On 4/28/23 09:08, Ales Musil wrote: > On Wed, Apr 26, 2023 at 10:36 PM Mark Michelson wrote: > >> Thanks! >> >> Acked-by: Mark Michelson >> >> On 4/25/23 09:26, Enrique Llorente wrote: >>> On cases where the configuration of arp_proxy collide with the default >>> ARP/NDP responder, the default r

[ovs-dev] [PATCH v9 8/8] treewide: Add `ovs_assert` to check for null pointers

2023-05-02 Thread James Raphael Tiovalen
This patch adds an assortment of `ovs_assert` statements to check for null pointers. We use assertions since it should be impossible for any of these pointers to be NULL. Signed-off-by: James Raphael Tiovalen Reviewed-by: Simon Horman --- lib/dp-packet.c| 1 + lib/dpctl.c| 4

[ovs-dev] [PATCH v9 7/8] lib, ovsdb: Add various null pointer checks

2023-05-02 Thread James Raphael Tiovalen
This commit adds various null pointer checks to some files in the `lib` and the `ovsdb` directories to fix several Coverity defects. These changes are grouped together as they perform similar checks, returning early or skipping some action if a null pointer is encountered. Signed-off-by: James Rap

[ovs-dev] [PATCH v9 6/8] ovs-vsctl: Fix crash when routing is enabled

2023-05-02 Thread James Raphael Tiovalen
In the case where routing is enabled, the bridge member of the `vsctl_port` structs is not populated. This can cause a crash if we attempt to access it. This patch fixes the crash by checking if the bridge member is valid before attempting to access it. In the `check_conflicts` function, we print b

[ovs-dev] [PATCH v9 5/8] file, monitor: Add null pointer assertions for old and new ovsdb_rows

2023-05-02 Thread James Raphael Tiovalen
This commit adds non-null pointer assertions in some code that performs some decisions based on old and new input ovsdb_rows. Signed-off-by: James Raphael Tiovalen --- ovsdb/file.c| 2 ++ ovsdb/monitor.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ovsdb/file.c b/o

[ovs-dev] [PATCH v9 4/8] ovsdb: Assert and check return values of `ovsdb_table_schema_get_column`

2023-05-02 Thread James Raphael Tiovalen
This commit adds a few null pointer assertions and checks to some return values of `ovsdb_table_schema_get_column`. If a null pointer is encountered in these blocks, either the assertion will fail or the control flow will now be redirected to alternative paths which will output the appropriate erro

[ovs-dev] [PATCH v9 3/8] shash, simap, smap: Add assertions to `*_count` functions

2023-05-02 Thread James Raphael Tiovalen
This commit adds assertions in the functions `shash_count`, `simap_count`, and `smap_count` to ensure that the corresponding input struct pointer is not NULL. This ensures that if the return values of `shash_sort`, `simap_sort`, or `smap_sort` are NULL, then the following for loops would not attem

[ovs-dev] [PATCH v9 2/8] lib, ovs-vsctl: Add zero-initializations

2023-05-02 Thread James Raphael Tiovalen
This commit adds zero-initializations by changing `SFL_ALLOC` from `malloc` to `xzalloc`, adding a `memset` call to `sflAlloc`, initializing a `pollfd` struct variable with zeroes, and changing some calls to `xmalloc` to `xzalloc`. This is to prevent potential data leaks or undefined behavior from

[ovs-dev] [PATCH v9 1/8] lib: Add non-null assertions to some return values of `dp_packet_data`

2023-05-02 Thread James Raphael Tiovalen
This commit adds some `ovs_assert()` checks to some return values of `dp_packet_data()` to ensure that they are not NULL and to prevent null-pointer dereferences, which might lead to unwanted crashes. We use assertions since it should be impossible for these calls to `dp_packet_data()` to return NU

[ovs-dev] [PATCH v9 0/8] treewide: Fix multiple Coverity defects

2023-05-02 Thread James Raphael Tiovalen
This cleanup patchset addresses several high and medium-impact Coverity defects. Unit tests have been successfully executed via `make check` and they successfully passed. The list of revisions so far: v2: Fix some apply-robot checkpatch errors and warnings. v3: Fix some apply-robot checkpatch e

Re: [ovs-dev] [PATCH ovn v3 4/4] acls: Add "pass" ACL action.

2023-05-02 Thread Dumitru Ceara
On 4/21/23 21:51, Mark Michelson wrote: > This allows for evaluating ACLs at the current tier to stop, and to > start evaluating ACLs at the next tier. If not using tiers, or if we > match on the final ACL tier, then a "pass" verdict results in the > default ACL action being applied. > > Reported-

Re: [ovs-dev] [PATCH ovn] northd: fix use-after-free after lrp destroyed

2023-05-02 Thread Dumitru Ceara
On 4/24/23 15:06, Simon Horman wrote: > On Thu, Apr 20, 2023 at 01:24:08PM +0800, Tao Liu wrote: >> In vxlan mode with more than 2047 lrp in router, build_ports() >> prints "all port tunnel ids exhausted", and frees the lrp port. >> >> However, lsp of type "router" connected to the lrp still holds

Re: [ovs-dev] [PATCH] ovsdb-idl.at: Fix write-changed-only tests without change tracking.

2023-05-02 Thread Dumitru Ceara
On 4/28/23 16:17, Ilya Maximets wrote: > The '-w' command line argument is not passed to test-ovsdb in the > OVSDB_CHECK_IDL_WRITE_CHANGED_ONLY_C, so it juts repeats normal > tests without testing the feature. > > Adding the flag. And using the long version of the flag to make > things more obvio

Re: [ovs-dev] [PATCH v11 2/4] dpif-netdev: Show netdev offloading flags.

2023-05-02 Thread Ilya Maximets
On 5/2/23 15:35, Mike Pattrick wrote: > On Fri, Apr 28, 2023 at 6:46 PM Ilya Maximets wrote: >> >> On 3/27/23 12:50, Mike Pattrick wrote: >>> From: Flavio Leitner >>> >>> This patch modifies netdev_get_status to include information about >>> checksum offload status by port, allowing the user to g

Re: [ovs-dev] [PATCH v8 8/8] treewide: Add `ovs_assert` to check for null pointers

2023-05-02 Thread 0-day Robot
Bleep bloop. Greetings James Raphael Tiovalen, 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 (ovsdb/monitor.c). error: could not build f

Re: [ovs-dev] [PATCH v11 2/4] dpif-netdev: Show netdev offloading flags.

2023-05-02 Thread Mike Pattrick
On Fri, Apr 28, 2023 at 6:46 PM Ilya Maximets wrote: > > On 3/27/23 12:50, Mike Pattrick wrote: > > From: Flavio Leitner > > > > This patch modifies netdev_get_status to include information about > > checksum offload status by port, allowing the user to gain insight into > > where checksum offloa

[ovs-dev] [PATCH v8 8/8] treewide: Add `ovs_assert` to check for null pointers

2023-05-02 Thread James Raphael Tiovalen
This patch adds an assortment of `ovs_assert` statements to check for null pointers. We use assertions since it should be impossible for any of these pointers to be NULL. Signed-off-by: James Raphael Tiovalen Reviewed-by: Simon Horman --- lib/dp-packet.c| 1 + lib/dpctl.c| 4

[ovs-dev] [PATCH v8 7/8] lib, ovsdb: Add various null pointer checks

2023-05-02 Thread James Raphael Tiovalen
This commit adds various null pointer checks to some files in the `lib` and the `ovsdb` directories to fix several Coverity defects. These changes are grouped together as they perform similar checks, returning early or skipping some action if a null pointer is encountered. Signed-off-by: James Rap

[ovs-dev] [PATCH v8 5/8] file, monitor: Add null pointer assertions for old and new ovsdb_rows

2023-05-02 Thread James Raphael Tiovalen
This commit adds non-null pointer assertions in some code that performs some decisions based on old and new input ovsdb_rows. Signed-off-by: James Raphael Tiovalen --- ovsdb/file.c| 2 ++ ovsdb/monitor.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ovsdb/file.c b/o

[ovs-dev] [PATCH v8 6/8] ovs-vsctl: Fix crash when routing is enabled

2023-05-02 Thread James Raphael Tiovalen
In the case where routing is enabled, the bridge member of the `vsctl_port` structs is not populated. This can cause a crash if we attempt to access it. This patch fixes the crash by checking if the bridge member is valid before attempting to access it. In the `check_conflicts` function, we print b

[ovs-dev] [PATCH v8 4/8] ovsdb: Assert and check return values of `ovsdb_table_schema_get_column`

2023-05-02 Thread James Raphael Tiovalen
This commit adds a few null pointer assertions and checks to some return values of `ovsdb_table_schema_get_column`. If a null pointer is encountered in these blocks, either the assertion will fail or the control flow will now be redirected to alternative paths which will output the appropriate erro

[ovs-dev] [PATCH v8 2/8] lib, ovs-vsctl: Add zero-initializations

2023-05-02 Thread James Raphael Tiovalen
This commit adds zero-initializations by changing `SFL_ALLOC` from `malloc` to `xzalloc`, adding a `memset` call to `sflAlloc`, initializing a `pollfd` struct variable with zeroes, and changing some calls to `xmalloc` to `xzalloc`. This is to prevent potential data leaks or undefined behavior from

[ovs-dev] [PATCH v8 3/8] shash, simap, smap: Add assertions to `*_count` functions

2023-05-02 Thread James Raphael Tiovalen
This commit adds assertions in the functions `shash_count`, `simap_count`, and `smap_count` to ensure that the corresponding input struct pointer is not NULL. This ensures that if the return values of `shash_sort`, `simap_sort`, or `smap_sort` are NULL, then the following for loops would not attem

[ovs-dev] [PATCH v8 1/8] lib: Add non-null assertions to some return values of `dp_packet_data`

2023-05-02 Thread James Raphael Tiovalen
This commit adds some `ovs_assert()` checks to some return values of `dp_packet_data()` to ensure that they are not NULL and to prevent null-pointer dereferences, which might lead to unwanted crashes. We use assertions since it should be impossible for these calls to `dp_packet_data()` to return NU

[ovs-dev] [PATCH v8 0/8] treewide: Fix multiple Coverity defects

2023-05-02 Thread James Raphael Tiovalen
This cleanup patchset addresses several high and medium-impact Coverity defects. Unit tests have been successfully executed via `make check` and they successfully passed. The list of revisions so far: v2: Fix some apply-robot checkpatch errors and warnings. v3: Fix some apply-robot checkpatch e

Re: [ovs-dev] OVN LTS/non-LTS bug fix backport strategy

2023-05-02 Thread Ilya Maximets
On 5/2/23 06:50, Han Zhou wrote: > > > On Fri, Apr 28, 2023 at 11:38 AM Mark Michelson > wrote: >> >> Sorry for the top-post, but trying to write my responses inline at this >> point is basically impossible for me if I want to actually make any >> salient points :) In

Re: [ovs-dev] [PATCH v7 5/8] file, monitor: Add null pointer checks for old and new ovsdb_rows

2023-05-02 Thread James R T
On Mon, Apr 24, 2023 at 7:57 PM Simon Horman wrote: > > I'd slightly prefer if this was at the top of the function. > Sure. I will move it. On Tue, Apr 25, 2023 at 4:20 AM Ilya Maximets wrote: > > This should be just ovs_assert(new || old). > Got it. I will substitute this with an assertion in

Re: [ovs-dev] [PATCH v7 4/8] ovsdb: Add more verbose logging in some null-pointer checks

2023-05-02 Thread James R T
On Tue, Apr 25, 2023 at 4:12 AM Ilya Maximets wrote: > > Every table must have a _uuid column, it's internal and should always be > there. > So, I'd replace this with just an assertion. > Sure, I will change this to an assertion. > > This changes behavior of ovsdb-server when user is sending co

Re: [ovs-dev] [PATCH ovn 1/2] tests: define fmt_pkt function to construct packets with scapy

2023-05-02 Thread Dumitru Ceara
On 4/20/23 16:28, Ihar Hrachyshka wrote: > I don't see how this is any better. Instead of calling to python that > imports GPL libraries, we now call to scapy that calls to python that > imports GPL libraries. In both cases we communicate through shell > pipes and the only "copyright"-able piece he