Re: [ovs-dev] [PATCH ovn 10/12] tests: Fixed some tests failing on (very) slow systems

2023-02-09 Thread Ales Musil
On Fri, Dec 2, 2022 at 2:53 PM Xavier Simonart wrote: > When running unit tests on a s390x VM with a x86 host, > many tests fail due to the very slow speed of the system. > > Signed-off-by: Xavier Simonart > --- > tests/atlocal.in | 3 +++ > tests/network-functions.at | 18 ++

Re: [ovs-dev] [PATCH v3] net: openvswitch: fix possible memory leak in ovs_meter_cmd_set()

2023-02-09 Thread Eelco Chaudron
On 10 Feb 2023, at 3:05, Hangyu Hua wrote: > old_meter needs to be free after it is detached regardless of whether > the new meter is successfully attached. > > Fixes: c7c4c44c9a95 ("net: openvswitch: expand the meters supported number") > Signed-off-by: Hangyu Hua Thanks for doing a v3. The

Re: [ovs-dev] [PATCH net-next v3 1/3] string_helpers: Move string_is_valid() to the header

2023-02-09 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (master) by Jakub Kicinski : On Wed, 8 Feb 2023 15:31:51 +0200 you wrote: > Move string_is_valid() to the header for wider use. > > While at it, rename to string_is_terminated() to be > precise about its semantics. > > Signed-off-by: Andy S

Re: [ovs-dev] [PATCHv2 net-next 0/5] net: move more duplicate code of ovs and tc conntrack into nf_conntrack_ovs

2023-02-09 Thread Jakub Kicinski
On Tue, 7 Feb 2023 17:52:05 -0500 Xin Long wrote: > We've moved some duplicate code into nf_nat_ovs in: > > "net: eliminate the duplicate code in the ct nat functions of ovs and tc" > > This patchset addresses more code duplication in the conntrack of ovs > and tc then creates nf_conntrack_ovs

[ovs-dev] 0day-bot system is shutting down for electrical work

2023-02-09 Thread Michael Santana
Hi all, We are shutting down 0day-bot for scheduled electrical work in the lab. We will be back online next week the latest Best ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

[ovs-dev] [PATCH v3] net: openvswitch: fix possible memory leak in ovs_meter_cmd_set()

2023-02-09 Thread Hangyu Hua
old_meter needs to be free after it is detached regardless of whether the new meter is successfully attached. Fixes: c7c4c44c9a95 ("net: openvswitch: expand the meters supported number") Signed-off-by: Hangyu Hua --- v2: use goto label and free old_meter outside of ovs lock. v3: add the label a

Re: [ovs-dev] [PATCH v2] net: openvswitch: fix possible memory leak in ovs_meter_cmd_set()

2023-02-09 Thread Hangyu Hua
On 9/2/2023 21:42, Eelco Chaudron wrote: On 9 Feb 2023, at 11:58, Simon Horman wrote: On Thu, Feb 09, 2023 at 05:32:40PM +0800, Hangyu Hua wrote: old_meter needs to be free after it is detached regardless of whether the new meter is successfully attached. Fixes: c7c4c44c9a95 ("net: openvswi

Re: [ovs-dev] [PATCH ovn v1 0/6] drop sampling: Fixes and optimizations

2023-02-09 Thread Mark Michelson
Hi Adrian, Thanks for these patches. They all look good to me. For the series, Acked-by: Mark Michelson On 1/24/23 10:16, Adrián Moreno wrote: While testing, I discovered some problems with drop sampling (first 4 patches). Also, this series introduces an optimization. In order to avoid addin

[ovs-dev] [PATCH ovn v3 8/8] northd: Don't collect datapath groups for LB affinity if disabled.

2023-02-09 Thread Ilya Maximets
If affinity timeout is not set, these datapath groups will not be used, so no need to collect them. Acked-by: Mark Michelson Signed-off-by: Ilya Maximets --- northd/northd.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/northd/northd.c b/northd/northd.c index

[ovs-dev] [PATCH ovn v3 7/8] northd: Create metered flows with dp groups if CoPP is not configured.

2023-02-09 Thread Ilya Maximets
Previous change introduced the ovn_lflow_add_with_dp_group() wrapper and applied it to all the non-metered logical flows. Metered ones are a bit more complex, but still can be optimized to use the new wrapper in cases where CoPP is not enabled or enabled only on some datapaths. Iterating over all

[ovs-dev] [PATCH ovn v3 6/8] northd: Create logical flows with datapath groups.

2023-02-09 Thread Ilya Maximets
The same pattern of logical flow creation is repeated multiple times in the code: 1. Calculate the hash. 2. Lock the hash. 3. Iterate over all datapaths in a group. 4. Create an lflow with ovn_lflow_add_at_with_hash() for the first time. 5. Add all other datapaths with ovn_dp_group_add_with_r

[ovs-dev] [PATCH ovn v3 5/8] northd: Use bitmaps for LB lists of switches and routers.

2023-02-09 Thread Ilya Maximets
Lists of switches and routers to which a certain load balancer is applied are frequently iterated in order to add all these datapaths into datapath group bitmap. They would be easier to operate with, if they were bitmaps themselves in the first place. This change also lays out the infrastructure

[ovs-dev] [PATCH ovn v3 3/8] northd: Optimize locking pattern for GW LR NAT flows for LB.

2023-02-09 Thread Ilya Maximets
build_gw_lrouter_nat_flows_for_lb() function generates or adds one datapath to a group for two logical flows for one of 3 different flow types. This means that if we don't want to lock/unlcok for every operation on every call, we need to hold 6 different lflow hash locks. But hash locks can not be

[ovs-dev] [PATCH ovn v3 4/8] northd: Use bitmaps for LB affinity flows.

2023-02-09 Thread Ilya Maximets
Previous commit used bitmaps to collect datapath groups for LR NAT LB flows. The same pattern can be applied to LB affinity flows in the same function. Signed-off-by: Ilya Maximets --- northd/northd.c | 144 1 file changed, 71 insertions(+), 73 d

[ovs-dev] [PATCH ovn v3 2/8] northd: Add thread safety analysis to lflow hash locks.

2023-02-09 Thread Ilya Maximets
Even though it's not possible to enable a full thread-safety analysis due to conditional mutex taking and unpredictable order [1], we can add most of the functionality with a fake mutex. It can detect nesting of hash locks, incorrect locking sequences and some other issues. More details are given

[ovs-dev] [PATCH ovn v3 1/8] northd: Use larger hash bucket locks instead of dp group ones.

2023-02-09 Thread Ilya Maximets
Datapath group locks are taken very frequently while generating logical flows. Every time one new datapath is added to the group, northd takes a mutex, updates a bitmap and unlocks the mutex. The chances for contention on a datapath group lock are very low, but even without any contention these c

[ovs-dev] [PATCH ovn v3 0/8] northd: Hash locks and lflow creation with dp groups.

2023-02-09 Thread Ilya Maximets
While running tests with ovn-heater it was observed that locking and unlocking dpg_lock can take more than 20% of CPU cycles in northd even without any contention. This series is trying to address that issue and add thread safety static analysis. While doing that, the code is re-worked to use and

Re: [ovs-dev] [PATCH v3] dpif-netdev: Optimize flushing of output packet buffers

2023-02-09 Thread Ilya Maximets
On 2/9/23 18:32, dheeraj wrote: > > Hi Ilya Maximets , > > I have few more queries on your tests . > What is the traffic rate ? Maximum that OVS can handle. Basically, testpmd app generates as many packets as OVS is able to receive. On my setup this is about 8 Mpps. > Please provide some more

Re: [ovs-dev] [PATCH v3] dpif-netdev: Optimize flushing of output packet buffers

2023-02-09 Thread dheeraj via dev
Hi Ilya Maximets , I have few more queries on your tests . What is the traffic rate ? Please provide some more details on traffic type . tcp or udp , packet size , traffic duration Is OVS started with dpdk mode or kernel mode ? How are you measuring the performance ? Regards , Dheeraj -O

Re: [ovs-dev] [PATCH v3] dpif-netdev: Optimize flushing of output packet buffers

2023-02-09 Thread Ilya Maximets
On 2/9/23 17:57, dheeraj wrote: > Hi Ilya Maximets , > > I did internal performance benchmarking tests with this patch . I tried with > different traffic (udp and vxlan) and with different packet size (64 and > 1024) . I don’t observe any performance degradation by applying the patch . > Even

Re: [ovs-dev] [PATCH v3] dpif-netdev: Optimize flushing of output packet buffers

2023-02-09 Thread dheeraj via dev
Hi Ilya Maximets , I did internal performance benchmarking tests with this patch . I tried with different traffic (udp and vxlan) and with different packet size (64 and 1024) . I don’t observe any performance degradation by applying the patch . Even from the code changes , it doesn't look like

[ovs-dev] [PATCH] netdev-dpdk: Check rx/tx descriptor sizes for device.

2023-02-09 Thread Kevin Traynor
By default OVS configures 2048 descriptors for tx and rx queues on DPDK devices. It also allows the user to configure those values. If the values used are not acceptable to the device than queue setup will fail. The device exposes it's max/min/alignment requirements, so use those to ensure that a

Re: [ovs-dev] [PATCH 1/1] daemon-unix: Support OVS-DPDK HW offloads for non-root user

2023-02-09 Thread Eelco Chaudron
On 9 Feb 2023, at 10:41, Gaetan Rivet wrote: >> -Original Message- >> From: dev > > on behalf of Eelco Chaudron >> mailto:echau...@redhat.com>> >> Date: Monday 23 January 2023 at 10:44 >> To: Gaetan Rivet mailto:gaet...@nvidia.com>> >> Cc: ovs dev

Re: [ovs-dev] [PATCHv2 net-next 5/5] net: extract nf_ct_handle_fragments to nf_conntrack_ovs

2023-02-09 Thread Aaron Conole
Xin Long writes: > Now handle_fragments() in OVS and TC have the similar code, and > this patch removes the duplicate code by moving the function > to nf_conntrack_ovs. > > Note that skb_clear_hash(skb) or skb->ignore_df = 1 should be > done only when defrag returns 0, as it does in other places

Re: [ovs-dev] [PATCHv2 net-next 3/5] openvswitch: move key and ovs_cb update out of handle_fragments

2023-02-09 Thread Aaron Conole
Xin Long writes: > This patch has no functional changes and just moves key and ovs_cb update > out of handle_fragments, and skb_clear_hash() and skb->ignore_df change > into handle_fragments(), to make it easier to move the duplicate code > from handle_fragments() into nf_conntrack_ovs later. > >

Re: [ovs-dev] [PATCHv2 net-next 2/5] net: extract nf_ct_skb_network_trim function to nf_conntrack_ovs

2023-02-09 Thread Aaron Conole
Xin Long writes: > There are almost the same code in ovs_skb_network_trim() and > tcf_ct_skb_network_trim(), this patch extracts them into a function > nf_ct_skb_network_trim() and moves the function to nf_conntrack_ovs. > > Signed-off-by: Xin Long > --- Reviewed-by: Aaron Conole

Re: [ovs-dev] [PATCHv2 net-next 1/5] net: create nf_conntrack_ovs for ovs and tc use

2023-02-09 Thread Aaron Conole
Xin Long writes: > Similar to nf_nat_ovs created by Commit ebddb1404900 ("net: move the > nat function to nf_nat_ovs for ovs and tc"), this patch is to create > nf_conntrack_ovs to get these functions shared by OVS and TC only. > > There are nf_ct_helper() and nf_ct_add_helper() from nf_conntrak_

Re: [ovs-dev] [PATCH 1/1] daemon-unix: Support OVS-DPDK HW offloads for non-root user

2023-02-09 Thread Aaron Conole
Aaron Conole writes: > Gaetan Rivet via dev writes: > >>>-Original Message- >>>From: dev >> > on behalf of Eelco >>> Chaudron mailto:echau...@redhat.com>> >>>Date: Monday 23 January 2023 at 10:44 >>>To: Gaetan Rivet mailto:gaet...@nvidia.com>> >>>C

Re: [ovs-dev] [PATCH 1/1] daemon-unix: Support OVS-DPDK HW offloads for non-root user

2023-02-09 Thread Aaron Conole
Gaetan Rivet via dev writes: >>-Original Message- >>From: dev > > on behalf of Eelco >> Chaudron mailto:echau...@redhat.com>> >>Date: Monday 23 January 2023 at 10:44 >>To: Gaetan Rivet mailto:gaet...@nvidia.com>> >>Cc: ovs dev mailto:d...@openvswitc

Re: [ovs-dev] [PATCH v2] net: openvswitch: fix possible memory leak in ovs_meter_cmd_set()

2023-02-09 Thread Eelco Chaudron
On 9 Feb 2023, at 11:58, Simon Horman wrote: > On Thu, Feb 09, 2023 at 05:32:40PM +0800, Hangyu Hua wrote: >> old_meter needs to be free after it is detached regardless of whether >> the new meter is successfully attached. >> >> Fixes: c7c4c44c9a95 ("net: openvswitch: expand the meters supported

Re: [ovs-dev] [PATCH v11 00/11] tests: Add system-traffic.at tests to check-offloads.

2023-02-09 Thread Eelco Chaudron
On 9 Feb 2023, at 13:45, Ilya Maximets wrote: > On 2/7/23 15:03, Eelco Chaudron wrote: >> This series makes it possible to include system-traffic.at tests into >> "make check-offloads" tests. >> >> The last patch of the series explains which tests are still not passing >> and might need some mo

Re: [ovs-dev] [PATCH ovn v2 0/8] northd: Hash locks and lflow creation with dp groups.

2023-02-09 Thread Ilya Maximets
On 2/8/23 22:55, Mark Michelson wrote: > Hi Ilya, > > Aside from the finding you made in patch 3, I couldn't find anything wrong > with the series. I have a minor suggestion on patch 7, but it's nothing that > should hold up merging the series. > > For the series, > Acked-by: Mark Michelson >

[ovs-dev] [PATCH v2] sparse: Fix build with DPDK and GCC 12.

2023-02-09 Thread David Marchand
rte_vect.h pulls some AVX512 instrinsics headers added in GCC 12 [1] trigger a lot of warnings: libtool: compile: env "REAL_CC=ccache gcc" "CHECK=sparse -Wsparse-error -I ../include/sparse -I ../include -m64 -I /usr/local/include " cgcc -target=x86_64 -target=host_os_specs -D__MMX

Re: [ovs-dev] [PATCH v11 00/11] tests: Add system-traffic.at tests to check-offloads.

2023-02-09 Thread Ilya Maximets
On 2/7/23 15:03, Eelco Chaudron wrote: > This series makes it possible to include system-traffic.at tests into > "make check-offloads" tests. > > The last patch of the series explains which tests are still not passing > and might need some more work. > > I'll try to work on the remaining failing

Re: [ovs-dev] [PATCH v6] conntrack: Properly unNAT inner header of related traffic

2023-02-09 Thread Ales Musil
On Thu, Feb 9, 2023 at 1:17 PM Paolo Valerio wrote: > Hi Ales, > > I just have two small nits, but other than that the patch LGTM. > Hi Paolo, I've addressed both comments and added your ack to the patch. Thanks, Ales > > Acked-by: Paolo Valerio > > Ales Musil writes: > > > The inner header

[ovs-dev] [PATCH v7] conntrack: Properly unNAT inner header of related traffic

2023-02-09 Thread Ales Musil
The inner header was not handled properly. Simplify the code which allows proper handling of the inner headers. Reported-at: https://bugzilla.redhat.com/2137754 Acked-by: Paolo Valerio Signed-off-by: Ales Musil --- v7: Rebase on top of current master. Address comments from Paolo: - Remov

Re: [ovs-dev] [PATCH v6] conntrack: Properly unNAT inner header of related traffic

2023-02-09 Thread Paolo Valerio
Hi Ales, I just have two small nits, but other than that the patch LGTM. Acked-by: Paolo Valerio Ales Musil writes: > The inner header was not handled properly. > Simplify the code which allows proper handling > of the inner headers. > > Reported-at: https://bugzilla.redhat.com/2137754 > Sign

Re: [ovs-dev] [PATCH v2] net: openvswitch: fix possible memory leak in ovs_meter_cmd_set()

2023-02-09 Thread Simon Horman
On Thu, Feb 09, 2023 at 05:32:40PM +0800, Hangyu Hua wrote: > old_meter needs to be free after it is detached regardless of whether > the new meter is successfully attached. > > Fixes: c7c4c44c9a95 ("net: openvswitch: expand the meters supported number") > Signed-off-by: Hangyu Hua > --- > > v2:

[ovs-dev] [PATCH ovn] northd: prevents sending packet to conntrack for router ports

2023-02-09 Thread Xavier Simonart
As commented in northd.c, we should not use ct() for router ports. When there are no stateful_acl, this patch prevents sending packet to conntrack for router ports. However, this patch does not change the behavior for ACLs such as allow-related: packets are still sent to conntrack, even for router

[ovs-dev] [PATCH ovn] tests: Fix Flaky system-tests "omit connection tracking ..."

2023-02-09 Thread Xavier Simonart
While conntrack entries were flushed between the sub-tests, flows from previous tests might still be present, causing conntrack entries to be re-created. Fixes: a0f82efdd9df ("northd: bypass connection tracking for stateless flows when there are LB flows present") Signed-off-by: Xavier Simonart

Re: [ovs-dev] [PATCH 1/1] daemon-unix: Support OVS-DPDK HW offloads for non-root user

2023-02-09 Thread Gaetan Rivet via dev
>-Original Message- >From: dev > on behalf of Eelco Chaudron >mailto:echau...@redhat.com>> >Date: Monday 23 January 2023 at 10:44 >To: Gaetan Rivet mailto:gaet...@nvidia.com>> >Cc: ovs dev mailto:d...@openvswitch.org>>, Eli >Britstein mailto:el...@n

[ovs-dev] [PATCH v2] net: openvswitch: fix possible memory leak in ovs_meter_cmd_set()

2023-02-09 Thread Hangyu Hua
old_meter needs to be free after it is detached regardless of whether the new meter is successfully attached. Fixes: c7c4c44c9a95 ("net: openvswitch: expand the meters supported number") Signed-off-by: Hangyu Hua --- v2: use goto label and free old_meter outside of ovs lock. net/openvswitch/me

Re: [ovs-dev] [PATCH v11 11/11] tests: Comment currently failing TC system-traffic tests.

2023-02-09 Thread Simon Horman
On Tue, Feb 07, 2023 at 03:07:56PM +0100, Eelco Chaudron wrote: > I commented the three remaining failures when running tc with the > system-traffic tests. In addition I ran the following test to verify > we did not see any failures with recheck enabled: > > for i in {1..50}; do make check-offlo

Re: [ovs-dev] [PATCH v11 10/11] tests: Fix reading of OpenFlow byte counters in GRE test cases.

2023-02-09 Thread Simon Horman
On Thu, Feb 09, 2023 at 09:42:03AM +0100, Eelco Chaudron wrote: > > > On 8 Feb 2023, at 17:50, Simon Horman wrote: > > > On Tue, Feb 07, 2023 at 03:07:24PM +0100, Eelco Chaudron wrote: > >> With some datapaths, read TC, it takes a bit longer to update the > >> OpenFlow statistics. Rather than ad

Re: [ovs-dev] [PATCH] net: openvswitch: fix possible memory leak in ovs_meter_cmd_set()

2023-02-09 Thread Hangyu Hua
On 9/2/2023 16:26, Eelco Chaudron wrote: On 8 Feb 2023, at 8:16, Hangyu Hua wrote: old_meter needs to be free after it is detached regardless of whether the new meter is successfully attached. Fixes: c7c4c44c9a95 ("net: openvswitch: expand the meters supported number") Signed-off-by: Hang

Re: [ovs-dev] [PATCH v11 10/11] tests: Fix reading of OpenFlow byte counters in GRE test cases.

2023-02-09 Thread Eelco Chaudron
On 8 Feb 2023, at 17:50, Simon Horman wrote: > On Tue, Feb 07, 2023 at 03:07:24PM +0100, Eelco Chaudron wrote: >> With some datapaths, read TC, it takes a bit longer to update the >> OpenFlow statistics. Rather than adding an additional delay, try >> to read the counters multiple times until we

Re: [ovs-dev] [PATCH] net: openvswitch: fix possible memory leak in ovs_meter_cmd_set()

2023-02-09 Thread Eelco Chaudron
On 8 Feb 2023, at 8:16, Hangyu Hua wrote: > old_meter needs to be free after it is detached regardless of whether > the new meter is successfully attached. > > Fixes: c7c4c44c9a95 ("net: openvswitch: expand the meters supported number") > Signed-off-by: Hangyu Hua > --- > net/openvswitch/mete