Re: [ovs-dev] [PATCH v6 2/2] ofproto-dpif-mirror: Add support for pre-selection filter.

2023-10-17 Thread Ilya Maximets
On 10/17/23 20:20, Mike Pattrick wrote:
> On Fri, Oct 13, 2023 at 9:06 AM Ilya Maximets  wrote:
>>
>> On 10/8/23 06:21, Mike Pattrick wrote:
>>> Currently a bridge mirror will collect all packets and tools like
>>> ovs-tcpdump can apply additional filters after they have already been
>>> duplicated by vswitchd. This can result in inefficient collection.
>>>
>>> This patch adds support to apply pre-selection to bridge mirrors, which
>>> can limit which packets are mirrored based on flow metadata. This
>>> significantly improves overall vswitchd performance during mirroring if
>>> only a subset of traffic is required.
>>>
>>> I benchmarked this with two setups. A netlink based test with two veth
>>> pairs connected to a single bridge, and a netdev based test involving a
>>> mix of DPDK nics, and netdev-linux interfaces. Both tests involved
>>> saturating the link with iperf3 and then sending an icmp ping every
>>> second. I then measured the throughput on the link with no mirroring,
>>> icmp pre-selected mirroring, and full mirroring. The results, below,
>>> indicate a significant reduction to impact of mirroring when only a
>>> subset of the traffic on a port is selected for collection.
>>>
>>>  Test No Mirror | No Filter |   Filter  | No Filter |  Filter  |
>>> +---+---+---+---+--+
>>> netlink | 39.0 Gbps | 36.1 Gbps | 38.2 Gbps | 7%|2%|
>>> netdev  | 7.39 Gbps | 4.95 Gbps | 6.24 Gbps |33%|   15%|
>>>
>>> The ratios above are the percent reduction in total throughput when
>>> mirroring is used either with or without a filter.
>>>
>>> Signed-off-by: Mike Pattrick 
>>>
>>
>> Hi, Mike.  Thanks for the patch!
>>
>> Not a full review, but see some comments inline.
>>
>> Best regards, Ilya Maximets.
>>
>>> ---
>>> v3:
>>>   - Added more tests
>>>   - Refactored mirror wildcard modification out of mirror_get
>>>   - Improved error handling
>>> v4:
>>>   - Refactored mirror_set and mirror_get functions to reduce function
>>>   parameters
>>> v5:
>>>   - Fixed formating issues
>>>   - Moved some code from patch 2 to patch 1 to fix compile
>>> v6:
>>>  - Clarified filter format in documentation
>>>  - Moved flow/mask operations to atomic set/get
>>>  - Cleaned up and improved test
>>>
>>> ---
>>>  Documentation/ref/ovs-tcpdump.8.rst |   8 +-
>>>  NEWS|   4 +
>>>  lib/flow.h  |   9 +++
>>>  ofproto/ofproto-dpif-mirror.c   |  68 +++-
>>>  ofproto/ofproto-dpif-mirror.h   |   8 +-
>>>  ofproto/ofproto-dpif-xlate.c|  16 +++-
>>>  ofproto/ofproto-dpif.c  |   9 +--
>>>  ofproto/ofproto-dpif.h  |   6 ++
>>>  ofproto/ofproto.h   |   3 +
>>>  tests/ofproto-dpif.at   | 116 
>>>  utilities/ovs-tcpdump.in|  13 +++-
>>>  vswitchd/bridge.c   |  13 +++-
>>>  vswitchd/vswitch.ovsschema  |   5 +-
>>>  vswitchd/vswitch.xml|  13 
>>>  14 files changed, 273 insertions(+), 18 deletions(-)
>>>
>>> diff --git a/Documentation/ref/ovs-tcpdump.8.rst 
>>> b/Documentation/ref/ovs-tcpdump.8.rst
>>> index b9f8cdf6f..e21e61211 100644
>>> --- a/Documentation/ref/ovs-tcpdump.8.rst
>>> +++ b/Documentation/ref/ovs-tcpdump.8.rst
>>> @@ -61,8 +61,14 @@ Options
>>>
>>>If specified, mirror all ports (optional).
>>>
>>> +* ``--filter ``
>>> +
>>> +  If specified, only mirror flows that match the provided OpenFlow filter.
>>> +  The available fields are documented in ``ovs-fields(7)``.
>>> +
>>>  See Also
>>>  
>>>
>>>  ``ovs-appctl(8)``, ``ovs-vswitchd(8)``, ``ovs-pcap(1)``,
>>> -``ovs-tcpundump(1)``, ``tcpdump(8)``, ``wireshark(8)``.
>>> +``ovs-fields(7)``, ``ovs-tcpundump(1)``, ``tcpdump(8)``,
>>> +``wireshark(8)``.
>>> diff --git a/NEWS b/NEWS
>>> index 6b45492f1..e95033b50 100644
>>> --- a/NEWS
>>> +++ b/NEWS
>>> @@ -6,6 +6,10 @@ Post-v3.2.0
>>> from older version is supported but it may trigger more leader 
>>> elections
>>> during the process, and error logs complaining unrecognized fields 
>>> may
>>> be observed on old nodes.
>>> + * Added a new filter column in the Mirror table which can be used to
>>> +   apply filters to mirror ports.
>>> +   - ovs-tcpdump:
>>> + * Added new --filter parameter to apply pre-selection on mirrored 
>>> flows.
>>>
>>>
>>>  v3.2.0 - 17 Aug 2023
>>> diff --git a/lib/flow.h b/lib/flow.h
>>> index a9d026e1c..f77d3553a 100644
>>> --- a/lib/flow.h
>>> +++ b/lib/flow.h
>>> @@ -939,6 +939,15 @@ flow_union_with_miniflow(struct flow *dst, const 
>>> struct miniflow *src)
>>>  flow_union_with_miniflow_subset(dst, src, src->map);
>>>  }
>>>
>>> +/* Perform a bitwise OR of minimask 'src' mask data with the equivalent
>>> + * fields in 'dst', storing the result in 'dst'. */
>>> +static inline void
>>> +flow_wildcards_union_with_minimask(struct flow_wildcards *dst,
>>> +   

Re: [ovs-dev] [PATCH v6 2/2] ofproto-dpif-mirror: Add support for pre-selection filter.

2023-10-17 Thread Mike Pattrick
On Fri, Oct 13, 2023 at 9:06 AM Ilya Maximets  wrote:
>
> On 10/8/23 06:21, Mike Pattrick wrote:
> > Currently a bridge mirror will collect all packets and tools like
> > ovs-tcpdump can apply additional filters after they have already been
> > duplicated by vswitchd. This can result in inefficient collection.
> >
> > This patch adds support to apply pre-selection to bridge mirrors, which
> > can limit which packets are mirrored based on flow metadata. This
> > significantly improves overall vswitchd performance during mirroring if
> > only a subset of traffic is required.
> >
> > I benchmarked this with two setups. A netlink based test with two veth
> > pairs connected to a single bridge, and a netdev based test involving a
> > mix of DPDK nics, and netdev-linux interfaces. Both tests involved
> > saturating the link with iperf3 and then sending an icmp ping every
> > second. I then measured the throughput on the link with no mirroring,
> > icmp pre-selected mirroring, and full mirroring. The results, below,
> > indicate a significant reduction to impact of mirroring when only a
> > subset of the traffic on a port is selected for collection.
> >
> >  Test No Mirror | No Filter |   Filter  | No Filter |  Filter  |
> > +---+---+---+---+--+
> > netlink | 39.0 Gbps | 36.1 Gbps | 38.2 Gbps | 7%|2%|
> > netdev  | 7.39 Gbps | 4.95 Gbps | 6.24 Gbps |33%|   15%|
> >
> > The ratios above are the percent reduction in total throughput when
> > mirroring is used either with or without a filter.
> >
> > Signed-off-by: Mike Pattrick 
> >
>
> Hi, Mike.  Thanks for the patch!
>
> Not a full review, but see some comments inline.
>
> Best regards, Ilya Maximets.
>
> > ---
> > v3:
> >   - Added more tests
> >   - Refactored mirror wildcard modification out of mirror_get
> >   - Improved error handling
> > v4:
> >   - Refactored mirror_set and mirror_get functions to reduce function
> >   parameters
> > v5:
> >   - Fixed formating issues
> >   - Moved some code from patch 2 to patch 1 to fix compile
> > v6:
> >  - Clarified filter format in documentation
> >  - Moved flow/mask operations to atomic set/get
> >  - Cleaned up and improved test
> >
> > ---
> >  Documentation/ref/ovs-tcpdump.8.rst |   8 +-
> >  NEWS|   4 +
> >  lib/flow.h  |   9 +++
> >  ofproto/ofproto-dpif-mirror.c   |  68 +++-
> >  ofproto/ofproto-dpif-mirror.h   |   8 +-
> >  ofproto/ofproto-dpif-xlate.c|  16 +++-
> >  ofproto/ofproto-dpif.c  |   9 +--
> >  ofproto/ofproto-dpif.h  |   6 ++
> >  ofproto/ofproto.h   |   3 +
> >  tests/ofproto-dpif.at   | 116 
> >  utilities/ovs-tcpdump.in|  13 +++-
> >  vswitchd/bridge.c   |  13 +++-
> >  vswitchd/vswitch.ovsschema  |   5 +-
> >  vswitchd/vswitch.xml|  13 
> >  14 files changed, 273 insertions(+), 18 deletions(-)
> >
> > diff --git a/Documentation/ref/ovs-tcpdump.8.rst 
> > b/Documentation/ref/ovs-tcpdump.8.rst
> > index b9f8cdf6f..e21e61211 100644
> > --- a/Documentation/ref/ovs-tcpdump.8.rst
> > +++ b/Documentation/ref/ovs-tcpdump.8.rst
> > @@ -61,8 +61,14 @@ Options
> >
> >If specified, mirror all ports (optional).
> >
> > +* ``--filter ``
> > +
> > +  If specified, only mirror flows that match the provided OpenFlow filter.
> > +  The available fields are documented in ``ovs-fields(7)``.
> > +
> >  See Also
> >  
> >
> >  ``ovs-appctl(8)``, ``ovs-vswitchd(8)``, ``ovs-pcap(1)``,
> > -``ovs-tcpundump(1)``, ``tcpdump(8)``, ``wireshark(8)``.
> > +``ovs-fields(7)``, ``ovs-tcpundump(1)``, ``tcpdump(8)``,
> > +``wireshark(8)``.
> > diff --git a/NEWS b/NEWS
> > index 6b45492f1..e95033b50 100644
> > --- a/NEWS
> > +++ b/NEWS
> > @@ -6,6 +6,10 @@ Post-v3.2.0
> > from older version is supported but it may trigger more leader 
> > elections
> > during the process, and error logs complaining unrecognized fields 
> > may
> > be observed on old nodes.
> > + * Added a new filter column in the Mirror table which can be used to
> > +   apply filters to mirror ports.
> > +   - ovs-tcpdump:
> > + * Added new --filter parameter to apply pre-selection on mirrored 
> > flows.
> >
> >
> >  v3.2.0 - 17 Aug 2023
> > diff --git a/lib/flow.h b/lib/flow.h
> > index a9d026e1c..f77d3553a 100644
> > --- a/lib/flow.h
> > +++ b/lib/flow.h
> > @@ -939,6 +939,15 @@ flow_union_with_miniflow(struct flow *dst, const 
> > struct miniflow *src)
> >  flow_union_with_miniflow_subset(dst, src, src->map);
> >  }
> >
> > +/* Perform a bitwise OR of minimask 'src' mask data with the equivalent
> > + * fields in 'dst', storing the result in 'dst'. */
> > +static inline void
> > +flow_wildcards_union_with_minimask(struct flow_wildcards *dst,
> > +   const struct minimask *src)
> 

Re: [ovs-dev] [PATCH ovn] nbctl: Add optional ha-chassis-group arg to ha-chassis-group-list

2023-10-17 Thread 0-day Robot
Bleep bloop.  Greetings Evgenii Kovalev, 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 lacks whitespace around operator
#110 FILE: utilities/ovn-nbctl.c:467:
  ha-chassis-group-add GRPCreate an HA chassis group GRP\n\

WARNING: Line lacks whitespace around operator
#111 FILE: utilities/ovn-nbctl.c:468:
  ha-chassis-group-del GRPDelete the HA chassis group GRP\n\

WARNING: Line is 92 characters long (recommended limit is 79)
WARNING: Line lacks whitespace around operator
#112 FILE: utilities/ovn-nbctl.c:469:
  ha-chassis-group-list [GRP] Print the supplied HA chassis group or all if 
none supplied\n\

WARNING: Line is 93 characters long (recommended limit is 79)
#130 FILE: utilities/ovn-nbctl.c:7309:
ha_ch_grp_info_print(struct ctl_context *ctx, const struct 
nbrec_ha_chassis_group *ha_ch_grp)

Lines checked: 194, Warnings: 5, Errors: 0


Please check this out.  If you feel there has been an error, please email 
acon...@redhat.com

Thanks,
0-day Robot
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH ovn] nbctl: Add optional ha-chassis-group arg to ha-chassis-group-list

2023-10-17 Thread Evgenii Kovalev
This commit adds support for optional ha-chassis-group argument to
ha-chassis-group-list command to show one record.

Also add few tests to validate output from ha-chassis-group-list.

Signed-off-by: Evgenii Kovalev 
---
 tests/ovn-nbctl.at| 53 +
 utilities/ovn-nbctl.8.xml |  8 +++---
 utilities/ovn-nbctl.c | 55 +++
 3 files changed, 96 insertions(+), 20 deletions(-)

diff --git a/tests/ovn-nbctl.at b/tests/ovn-nbctl.at
index fde3a28ee..7206d1fe5 100644
--- a/tests/ovn-nbctl.at
+++ b/tests/ovn-nbctl.at
@@ -2741,3 +2741,56 @@ cp $PKIDIR/$cert $cert
 OVS_WAIT_UNTIL([ovn-appctl -t ovn-nbctl run show])
 
 AT_CLEANUP
+
+dnl -
+
+AT_SETUP([ovn-nbctl - ha-chassis-group-list group])
+OVN_NBCTL_TEST_START daemon
+check ovn-nbctl ha-chassis-group-add chg1
+chg1uuid=$(fetch_column nb:HA_Chassis_Group _uuid name=chg1)
+check ovn-nbctl ha-chassis-group-add chg2
+chg2uuid=$(fetch_column nb:HA_Chassis_Group _uuid name=chg2)
+check ovn-nbctl ha-chassis-group-add-chassis chg1 hv1 1
+check ovn-nbctl ha-chassis-group-add-chassis chg1 hv2 2
+check ovn-nbctl ha-chassis-group-add-chassis chg2 hv3 3
+check ovn-nbctl ha-chassis-group-add-chassis chg2 hv4 4
+AT_CHECK([ovn-nbctl ha-chassis-group-list], [0], [ignore])
+
+AT_CHECK_UNQUOTED([ovn-nbctl ha-chassis-group-list $chg1uuid | grep chg1 | awk 
'{print $1}'], [0], [dnl
+$chg1uuid
+])
+AT_CHECK([ovn-nbctl ha-chassis-group-list chg1 | awk '{print $2}' | grep chg], 
[0], [dnl
+(chg1)
+])
+AT_CHECK([ovn-nbctl ha-chassis-group-list chg1 | awk '{print $2}' | grep -A1 
hv1], [0], [dnl
+(hv1)
+1
+])
+AT_CHECK([ovn-nbctl ha-chassis-group-list chg1 | awk '{print $2}' | grep -A1 
hv2], [0], [dnl
+(hv2)
+2
+])
+
+AT_CHECK_UNQUOTED([ovn-nbctl ha-chassis-group-list $chg2uuid | grep chg2 | awk 
'{print $1}'], [0], [dnl
+$chg2uuid
+])
+AT_CHECK([ovn-nbctl ha-chassis-group-list chg2 | awk '{print $2}' | grep chg], 
[0], [dnl
+(chg2)
+])
+AT_CHECK([ovn-nbctl ha-chassis-group-list chg2 | awk '{print $2}' | grep -A1 
hv3], [0], [dnl
+(hv3)
+3
+])
+AT_CHECK([ovn-nbctl ha-chassis-group-list chg2 | awk '{print $2}' | grep -A1 
hv4], [0], [dnl
+(hv4)
+4
+])
+
+AT_CHECK([ovn-nbctl ha-chassis-group-list negative], [1], [], [dnl
+ovn-nbctl: negative: ha_chassis_group name not found
+])
+AT_CHECK([ovn-nbctl ha-chassis-group-list 
----], [1], [], [dnl
+ovn-nbctl: ----: ha_chassis_group UUID not 
found
+])
+OVN_NBCTL_TEST_STOP "/terminating with signal 15/d"
+AT_CLEANUP
diff --git a/utilities/ovn-nbctl.8.xml b/utilities/ovn-nbctl.8.xml
index b4af43185..6f74bd557 100644
--- a/utilities/ovn-nbctl.8.xml
+++ b/utilities/ovn-nbctl.8.xml
@@ -1466,10 +1466,12 @@
 group does not exist.
   
 
-  ha-chassis-group-list
+  ha-chassis-group-list [ha-chassis-group]
   
-Lists the HA chassis group group along with the
-HA chassis if any associated with it.
+Lists all HA chassis groups along with the HA chassis
+if any associated with it.
+If ha-chassis-group is also specified, then only the
+specified ha-chassis-group will be listed.
   
 
   ha-chassis-group-add-chassis group
diff --git a/utilities/ovn-nbctl.c b/utilities/ovn-nbctl.c
index 444fbd2fe..9029e8133 100644
--- a/utilities/ovn-nbctl.c
+++ b/utilities/ovn-nbctl.c
@@ -464,9 +464,9 @@ Port group commands:\n\
   pg-set-ports PG PORTS   Set PORTS on port group PG\n\
   pg-del PG   Delete port group PG\n\
 HA chassis group commands:\n\
-  ha-chassis-group-add GRP  Create an HA chassis group GRP\n\
-  ha-chassis-group-del GRP  Delete the HA chassis group GRP\n\
-  ha-chassis-group-list List the HA chassis groups\n\
+  ha-chassis-group-add GRPCreate an HA chassis group GRP\n\
+  ha-chassis-group-del GRPDelete the HA chassis group GRP\n\
+  ha-chassis-group-list [GRP] Print the supplied HA chassis group or all if 
none supplied\n\
   ha-chassis-group-add-chassis GRP CHASSIS PRIORITY Adds an HA\
 chassis with mandatory PRIORITY to the HA chassis group GRP\n\
   ha-chassis-group-remove-chassis GRP CHASSIS Removes the HA chassis\
@@ -7260,7 +7260,7 @@ ha_chassis_group_by_name_or_uuid(struct ctl_context *ctx, 
const char *id,
 }
 
 if (!ha_ch_grp && must_exist) {
-ctx->error = xasprintf("%s: ha_chassi_group %s not found",
+ctx->error = xasprintf("%s: ha_chassis_group %s not found",
id, is_uuid ? "UUID" : "name");
 }
 
@@ -7306,23 +7306,44 @@ pre_ha_ch_grp_list(struct ctl_context *ctx)
 }
 
 static void
-cmd_ha_ch_grp_list(struct ctl_context *ctx)
+ha_ch_grp_info_print(struct ctl_context *ctx, const struct 
nbrec_ha_chassis_group *ha_ch_grp)
+{
+ds_put_format(>output, UUID_FMT " (%s)\n",
+  UUID_ARGS(_ch_grp->header_.uuid), ha_ch_grp->name);
+const struct 

Re: [ovs-dev] [ovs-build] |fail| pw1850128 [ovs-dev, branch-2.17, 1/2] Set release date for 2.17.8.

2023-10-17 Thread Phelan, Michael


> -Original Message-
> From: Ilya Maximets 
> Sent: Tuesday, October 17, 2023 2:06 PM
> To: Phelan, Michael ; ovs-dev  d...@openvswitch.org>
> Cc: i.maxim...@ovn.org; Aaron Conole ; Stokes, Ian
> 
> Subject: Re: [ovs-build] |fail| pw1850128 [ovs-dev,branch-2.17,1/2] Set
> release date for 2.17.8.
> 
> On 10/17/23 15:02, ovs_jenk...@intel.com wrote:
> > Test-Label: intel-ovs-compilation
> > Test-Status: fail
> > http://patchwork.ozlabs.org/api/patches/1850128/
> >
> > AVX-512_compilation: failed
> > DPLCS Test: fail
> > DPIF Test: fail
> > MFEX Test: fail
> > Actions Test: fail
> > Errors in DPCLS test:
> > None
> >
> > Errors in DPIF test:
> > None
> >
> > Errors in MFEX test:
> > None
> >
> > Errors in Actions test:
> > None
> 
> Still something is not quite right with older branch builds.
Hi Ilya,
Sorry about that, it should be fixed now. I've restarted the builds for the 
recent release patches.

Kind regards,
Michael.
> 
> Best regards, Ilya Maximets.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2 1/2] net: openvswitch: Use struct_size()

2023-10-17 Thread patchwork-bot+netdevbpf
Hello:

This series was applied to netdev/net-next.git (main)
by Paolo Abeni :

On Sat, 14 Oct 2023 08:34:52 +0200 you wrote:
> Use struct_size() instead of hand writing it.
> This is less verbose and more robust.
> 
> Signed-off-by: Christophe JAILLET 
> ---
> v2: No change
> 
> [...]

Here is the summary with links:
  - [v2,1/2] net: openvswitch: Use struct_size()
https://git.kernel.org/netdev/net-next/c/df3bf90fef28
  - [v2,2/2] net: openvswitch: Annotate struct mask_array with __counted_by
https://git.kernel.org/netdev/net-next/c/7713ec844756

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html


___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH 4/4] general: Fix Clang's static analyzer 'Division by zero' warnings.

2023-10-17 Thread Eelco Chaudron
Signed-off-by: Eelco Chaudron 
---
 lib/dpif-netdev.c   |4 
 tests/test-id-fpool.c   |2 +-
 tests/test-mpsc-queue.c |2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 157694bcf..b8f065d1d 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -4748,6 +4748,10 @@ dpif_netdev_offload_stats_get(struct dpif *dpif,
 }
 
 nb_thread = netdev_offload_thread_nb();
+if (!nb_thread) {
+return EINVAL;
+}
+
 /* nb_thread counters for the overall total as well. */
 stats->size = ARRAY_SIZE(hwol_stats) * (nb_thread + 1);
 stats->counters = xcalloc(stats->size, sizeof *stats->counters);
diff --git a/tests/test-id-fpool.c b/tests/test-id-fpool.c
index 27800aa9b..7bdb8154d 100644
--- a/tests/test-id-fpool.c
+++ b/tests/test-id-fpool.c
@@ -237,7 +237,7 @@ print_result(const char *prefix)
 for (i = 0; i < n_threads; i++) {
 avg += thread_working_ms[i];
 }
-avg /= n_threads;
+avg /= n_threads ? n_threads : 1;
 printf("%s: ", prefix);
 for (i = 0; i < n_threads; i++) {
 if (thread_working_ms[i] >= TIMEOUT_MS) {
diff --git a/tests/test-mpsc-queue.c b/tests/test-mpsc-queue.c
index 16aa804a0..86a223caf 100644
--- a/tests/test-mpsc-queue.c
+++ b/tests/test-mpsc-queue.c
@@ -315,7 +315,7 @@ print_result(const char *prefix, int reader_elapsed)
 for (i = 0; i < n_threads; i++) {
 avg += thread_working_ms[i];
 }
-avg /= n_threads;
+avg /= n_threads ? n_threads : 1;
 printf("%s:  %6d", prefix, reader_elapsed);
 for (i = 0; i < n_threads; i++) {
 printf(" %6" PRIu64, thread_working_ms[i]);

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH 2/4] general: Fix Clang's static analyzer 'Dead assignment' warnings.

2023-10-17 Thread Eelco Chaudron
This patch fixes two 'Dead assignment' warnings, where the one in
count_common_prefix_run() is actually a bug where the set is in reverse order.

Signed-off-by: Eelco Chaudron 
---
 lib/ofp-monitor.c |5 ++---
 lib/ofp-table.c   |2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/lib/ofp-monitor.c b/lib/ofp-monitor.c
index c27733a52..aed5f0497 100644
--- a/lib/ofp-monitor.c
+++ b/lib/ofp-monitor.c
@@ -962,13 +962,12 @@ ofputil_decode_flow_update(struct ofputil_flow_update 
*update,
 return 0;
 } else if (update->event == OFPFME_PAUSED
|| update->event == OFPFME_RESUMED) {
-struct ofp_flow_update_paused *ofup;
 
-if (length != sizeof *ofup) {
+if (length != sizeof(struct ofp_flow_update_paused)) {
 goto bad_len;
 }
 
-ofup = ofpbuf_pull(msg, sizeof *ofup);
+ofpbuf_pull(msg, sizeof(struct ofp_flow_update_paused));
 return 0;
 } else if (update->event == OFPFME_INITIAL
|| update->event == OFPFME_ADDED
diff --git a/lib/ofp-table.c b/lib/ofp-table.c
index a956754f2..f9bd3b7f9 100644
--- a/lib/ofp-table.c
+++ b/lib/ofp-table.c
@@ -1416,7 +1416,7 @@ count_common_prefix_run(const char *ids[], size_t n,
 if (!next) {
 break;
 } else if (next < extra_prefix_len) {
-next = extra_prefix_len;
+extra_prefix_len = next;
 }
 i++;
 }

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH 3/4] ovsdb: Fix Clang's static analyzer 'func null dereference' warnings.

2023-10-17 Thread Eelco Chaudron
Rather than crashing when a mod_double is requested, return
`Operation not supported`.

Signed-off-by: Eelco Chaudron 
---
 ovsdb/mutation.c |   14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/ovsdb/mutation.c b/ovsdb/mutation.c
index cbc71bc49..794560019 100644
--- a/ovsdb/mutation.c
+++ b/ovsdb/mutation.c
@@ -236,7 +236,8 @@ ovsdb_mutation_set_destroy(struct ovsdb_mutation_set *set)
 enum ovsdb_mutation_scalar_error {
 ME_OK,
 ME_DOM,
-ME_RANGE
+ME_RANGE,
+ME_NOTSUP
 };
 
 struct ovsdb_scalar_mutation {
@@ -267,6 +268,9 @@ ovsdb_mutation_scalar_error(enum 
ovsdb_mutation_scalar_error error,
"Result of \"%s\" operation is out of range.",
ovsdb_mutator_to_string(mutator));
 
+case ME_NOTSUP:
+return ovsdb_error(NULL, "Operation not supported.");
+
 default:
 return OVSDB_BUG("unexpected error");
 }
@@ -514,6 +518,12 @@ div_double(double *x, double y)
 }
 }
 
+static int
+mod_double(double *x OVS_UNUSED, double y OVS_UNUSED)
+{
+return ME_NOTSUP;
+}
+
 static const struct ovsdb_scalar_mutation add_mutation = {
 add_int, add_double, OVSDB_M_ADD
 };
@@ -531,5 +541,5 @@ static const struct ovsdb_scalar_mutation div_mutation = {
 };
 
 static const struct ovsdb_scalar_mutation mod_mutation = {
-mod_int, NULL, OVSDB_M_MOD
+mod_int, mod_double, OVSDB_M_MOD
 };

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH 0/4] Fix some of Clang's static analyzer warnings.

2023-10-17 Thread Eelco Chaudron
This series fixes some of Clang's scan-build warnings reported.

Eelco Chaudron (4):
  general: Fix Clang's static analyzer 'Dead initialization' warnings.
  general: Fix Clang's static analyzer 'Dead assignment' warnings.
  ovsdb: Fix Clang's static analyzer 'func null dereference' warnings.
  general: Fix Clang's static analyzer 'Division by zero' warnings.


 lib/dpif-netdev.c   |  4 
 lib/meta-flow.c |  4 ++--
 lib/ofp-actions.c   |  8 +---
 lib/ofp-monitor.c   |  5 ++---
 lib/ofp-table.c |  2 +-
 ovsdb/mutation.c| 14 --
 tests/test-id-fpool.c   |  2 +-
 tests/test-mpsc-queue.c |  2 +-
 8 files changed, 28 insertions(+), 13 deletions(-)

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH 1/4] general: Fix Clang's static analyzer 'Dead initialization' warnings.

2023-10-17 Thread Eelco Chaudron
Signed-off-by: Eelco Chaudron 
---
 lib/meta-flow.c   |4 ++--
 lib/ofp-actions.c |8 +---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/meta-flow.c b/lib/meta-flow.c
index 474344194..aa7cf1fcb 100644
--- a/lib/meta-flow.c
+++ b/lib/meta-flow.c
@@ -2751,8 +2751,8 @@ static char *
 mf_from_integer_string(const struct mf_field *mf, const char *s,
uint8_t *valuep, uint8_t *maskp)
 {
+const char *err_str;
 char *tail;
-const char *err_str = "";
 int err;
 
 err = parse_int_string(s, valuep, mf->n_bytes, );
@@ -2785,8 +2785,8 @@ syntax_error:
 static char *
 mf_from_packet_type_string(const char *s, ovs_be32 *packet_type)
 {
+const char *err_str;
 char *tail;
-const char *err_str = "";
 int err;
 
 if (*s != '(') {
diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c
index d7e5f542a..da7b1dd31 100644
--- a/lib/ofp-actions.c
+++ b/lib/ofp-actions.c
@@ -4230,10 +4230,12 @@ encode_DELETE_FIELD(const struct ofpact_delete_field 
*delete_field,
 enum ofp_version ofp_version OVS_UNUSED,
 struct ofpbuf *out)
 {
-struct nx_action_delete_field *nadf = put_NXAST_DELETE_FIELD(out);
-size_t size = out->size;
+size_t size;
 
-out->size = size - sizeof nadf->pad;
+put_NXAST_DELETE_FIELD(out);
+size = out->size;
+
+out->size = size - MEMBER_SIZEOF(struct nx_action_delete_field, pad);
 nx_put_mff_header(out, delete_field->field, 0, false);
 out->size = size;
 }

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH branch-3.2 0/2] Release patches for v3.2.1.

2023-10-17 Thread Eelco Chaudron


On 17 Oct 2023, at 15:34, Ilya Maximets wrote:

> On 10/17/23 15:24, Eelco Chaudron wrote:
>>
>>
>> On 17 Oct 2023, at 14:16, Ilya Maximets wrote:
>>
>>> First stable release for OVS 3.2, 2 months after the initial release.
>>>
>>> Ilya Maximets (2):
>>>   Set release date for 3.2.1.
>>>   Prepare for 3.2.2.
>>>
>>>  NEWS | 6 +-
>>>  configure.ac | 2 +-
>>>  debian/changelog | 8 +++-
>>>  3 files changed, 13 insertions(+), 3 deletions(-)
>>
>> Ack for the series:
>>
>> Acked-by: Eelco Chaudron 
>>
>
> Thanks, Kevin and Eelco!  I'll apply the patches and tag releases now.

Thanks for getting this done…

//Eelco

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH branch-3.2 0/2] Release patches for v3.2.1.

2023-10-17 Thread Ilya Maximets
On 10/17/23 15:24, Eelco Chaudron wrote:
> 
> 
> On 17 Oct 2023, at 14:16, Ilya Maximets wrote:
> 
>> First stable release for OVS 3.2, 2 months after the initial release.
>>
>> Ilya Maximets (2):
>>   Set release date for 3.2.1.
>>   Prepare for 3.2.2.
>>
>>  NEWS | 6 +-
>>  configure.ac | 2 +-
>>  debian/changelog | 8 +++-
>>  3 files changed, 13 insertions(+), 3 deletions(-)
> 
> Ack for the series:
> 
> Acked-by: Eelco Chaudron 
> 

Thanks, Kevin and Eelco!  I'll apply the patches and tag releases now.

Best regards, Ilya Maximets.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH branch-3.0 0/2] Release patches for v3.0.5.

2023-10-17 Thread Eelco Chaudron



On 17 Oct 2023, at 14:16, Ilya Maximets wrote:

> It's been 3+ months since the last raound of stable releases
> and we accumulated quite a few important fixes.
>
> Ilya Maximets (2):
>   Set release date for 3.0.5.
>   Prepare for 3.0.6.
>
>  NEWS | 6 +-
>  configure.ac | 2 +-
>  debian/changelog | 8 +++-
>  3 files changed, 13 insertions(+), 3 deletions(-)

Ack for the series:

Acked-by: Eelco Chaudron 

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH branch-3.1 0/2] Release patches for v3.1.3.

2023-10-17 Thread Eelco Chaudron



On 17 Oct 2023, at 14:16, Ilya Maximets wrote:

> It's been 3+ months since the last raound of stable releases
> and we accumulated quite a few important fixes.
>
> Ilya Maximets (2):
>   Set release date for 3.1.3.
>   Prepare for 3.1.4.
>
>  NEWS | 6 +-
>  configure.ac | 2 +-
>  debian/changelog | 8 +++-
>  3 files changed, 13 insertions(+), 3 deletions(-)

Ack for the series:

Acked-by: Eelco Chaudron 

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH branch-2.17 0/2] Release patches for v2.17.8.

2023-10-17 Thread Eelco Chaudron



On 17 Oct 2023, at 14:16, Ilya Maximets wrote:

> It's been 3+ months since the last raound of stable releases
> and we accumulated quite a few important fixes.
>
> Ilya Maximets (2):
>   Set release date for 2.17.8.
>   Prepare for 2.17.9.
>
>  NEWS | 6 +-
>  configure.ac | 2 +-
>  debian/changelog | 8 +++-
>  3 files changed, 13 insertions(+), 3 deletions(-)

Ack for the series:

Acked-by: Eelco Chaudron 

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH branch-3.2 0/2] Release patches for v3.2.1.

2023-10-17 Thread Eelco Chaudron



On 17 Oct 2023, at 14:16, Ilya Maximets wrote:

> First stable release for OVS 3.2, 2 months after the initial release.
>
> Ilya Maximets (2):
>   Set release date for 3.2.1.
>   Prepare for 3.2.2.
>
>  NEWS | 6 +-
>  configure.ac | 2 +-
>  debian/changelog | 8 +++-
>  3 files changed, 13 insertions(+), 3 deletions(-)

Ack for the series:

Acked-by: Eelco Chaudron 

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [ovs-build] |fail| pw1850128 [ovs-dev, branch-2.17, 1/2] Set release date for 2.17.8.

2023-10-17 Thread Ilya Maximets
On 10/17/23 15:02, ovs_jenk...@intel.com wrote:
> Test-Label: intel-ovs-compilation
> Test-Status: fail 
> http://patchwork.ozlabs.org/api/patches/1850128/ 
> 
> AVX-512_compilation: failed 
> DPLCS Test: fail 
> DPIF Test: fail 
> MFEX Test: fail 
> Actions Test: fail
> Errors in DPCLS test: 
> None
> 
> Errors in DPIF test: 
> None
> 
> Errors in MFEX test: 
> None
> 
> Errors in Actions test: 
> None

Still something is not quite right with older branch builds.

Best regards, Ilya Maximets.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH branch-3.0 0/2] Release patches for v3.0.5.

2023-10-17 Thread Kevin Traynor

On 17/10/2023 13:16, Ilya Maximets wrote:

It's been 3+ months since the last raound of stable releases
and we accumulated quite a few important fixes.

Ilya Maximets (2):
   Set release date for 3.0.5.
   Prepare for 3.0.6.

  NEWS | 6 +-
  configure.ac | 2 +-
  debian/changelog | 8 +++-
  3 files changed, 13 insertions(+), 3 deletions(-)



Acked-by: Kevin Traynor 

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH branch-2.17 0/2] Release patches for v2.17.8.

2023-10-17 Thread Kevin Traynor

On 17/10/2023 13:16, Ilya Maximets wrote:

It's been 3+ months since the last raound of stable releases
and we accumulated quite a few important fixes.

Ilya Maximets (2):
   Set release date for 2.17.8.
   Prepare for 2.17.9.

  NEWS | 6 +-
  configure.ac | 2 +-
  debian/changelog | 8 +++-
  3 files changed, 13 insertions(+), 3 deletions(-)



Acked-by: Kevin Traynor 

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH branch-3.1 0/2] Release patches for v3.1.3.

2023-10-17 Thread Kevin Traynor

On 17/10/2023 13:16, Ilya Maximets wrote:

It's been 3+ months since the last raound of stable releases
and we accumulated quite a few important fixes.

Ilya Maximets (2):
   Set release date for 3.1.3.
   Prepare for 3.1.4.

  NEWS | 6 +-
  configure.ac | 2 +-
  debian/changelog | 8 +++-
  3 files changed, 13 insertions(+), 3 deletions(-)



Acked-by: Kevin Traynor 

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH branch-3.2 0/2] Release patches for v3.2.1.

2023-10-17 Thread Kevin Traynor

On 17/10/2023 13:16, Ilya Maximets wrote:

First stable release for OVS 3.2, 2 months after the initial release.

Ilya Maximets (2):
   Set release date for 3.2.1.
   Prepare for 3.2.2.

  NEWS | 6 +-
  configure.ac | 2 +-
  debian/changelog | 8 +++-
  3 files changed, 13 insertions(+), 3 deletions(-)



Acked-by: Kevin Traynor 

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH branch-3.2 0/2] Release patches for v3.2.1.

2023-10-17 Thread Ilya Maximets
First stable release for OVS 3.2, 2 months after the initial release.

Ilya Maximets (2):
  Set release date for 3.2.1.
  Prepare for 3.2.2.

 NEWS | 6 +-
 configure.ac | 2 +-
 debian/changelog | 8 +++-
 3 files changed, 13 insertions(+), 3 deletions(-)

-- 
2.41.0

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH branch-3.2 2/2] Prepare for 3.2.2.

2023-10-17 Thread Ilya Maximets
Signed-off-by: Ilya Maximets 
---
 NEWS | 3 +++
 configure.ac | 2 +-
 debian/changelog | 6 ++
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index dbdc2f03c..eb7a9b1ba 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+v3.2.2 - xx xxx 
+
+
 v3.2.1 - 17 Oct 2023
 
- Bug fixes
diff --git a/configure.ac b/configure.ac
index 5857ac8e6..764479514 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 AC_PREREQ(2.63)
-AC_INIT(openvswitch, 3.2.1, b...@openvswitch.org)
+AC_INIT(openvswitch, 3.2.2, b...@openvswitch.org)
 AC_CONFIG_SRCDIR([vswitchd/ovs-vswitchd.c])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR([build-aux])
diff --git a/debian/changelog b/debian/changelog
index aa8f3b25c..780d1e2d8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+openvswitch (3.2.2-1) unstable; urgency=low
+   [ Open vSwitch team ]
+   * New upstream version
+
+ -- Open vSwitch team   Tue, 17 Oct 2023 13:02:27 +0200
+
 openvswitch (3.2.1-1) unstable; urgency=low
[ Open vSwitch team ]
* New upstream version
-- 
2.41.0

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH branch-3.2 1/2] Set release date for 3.2.1.

2023-10-17 Thread Ilya Maximets
Signed-off-by: Ilya Maximets 
---
 NEWS | 3 ++-
 debian/changelog | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 790cab495..dbdc2f03c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
-v3.2.1 - xx xxx 
+v3.2.1 - 17 Oct 2023
 
+   - Bug fixes
 
 v3.2.0 - 17 Aug 2023
 
diff --git a/debian/changelog b/debian/changelog
index 385fe9716..aa8f3b25c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,7 @@ openvswitch (3.2.1-1) unstable; urgency=low
[ Open vSwitch team ]
* New upstream version
 
- -- Open vSwitch team   Thu, 17 Aug 2023 15:20:36 +0200
+ -- Open vSwitch team   Tue, 17 Oct 2023 13:02:27 +0200
 
 openvswitch (3.2.0-1) unstable; urgency=low
 
-- 
2.41.0

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH branch-3.1 2/2] Prepare for 3.1.4.

2023-10-17 Thread Ilya Maximets
Signed-off-by: Ilya Maximets 
---
 NEWS | 3 +++
 configure.ac | 2 +-
 debian/changelog | 6 ++
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index f7636135b..13229cb3a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+v3.1.4 - xx xxx 
+
+
 v3.1.3 - 17 Oct 2023
 
- Bug fixes
diff --git a/configure.ac b/configure.ac
index f4fb551ae..cd50adcb2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 AC_PREREQ(2.63)
-AC_INIT(openvswitch, 3.1.3, b...@openvswitch.org)
+AC_INIT(openvswitch, 3.1.4, b...@openvswitch.org)
 AC_CONFIG_SRCDIR([vswitchd/ovs-vswitchd.c])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR([build-aux])
diff --git a/debian/changelog b/debian/changelog
index e6381c993..a47e46242 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+openvswitch (3.1.4-1) unstable; urgency=low
+   [ Open vSwitch team ]
+   * New upstream version
+
+ -- Open vSwitch team   Tue, 17 Oct 2023 13:02:17 +0200
+
 openvswitch (3.1.3-1) unstable; urgency=low
[ Open vSwitch team ]
* New upstream version
-- 
2.41.0

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH branch-3.1 0/2] Release patches for v3.1.3.

2023-10-17 Thread Ilya Maximets
It's been 3+ months since the last raound of stable releases
and we accumulated quite a few important fixes.

Ilya Maximets (2):
  Set release date for 3.1.3.
  Prepare for 3.1.4.

 NEWS | 6 +-
 configure.ac | 2 +-
 debian/changelog | 8 +++-
 3 files changed, 13 insertions(+), 3 deletions(-)

-- 
2.41.0

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH branch-3.1 1/2] Set release date for 3.1.3.

2023-10-17 Thread Ilya Maximets
Signed-off-by: Ilya Maximets 
---
 NEWS | 3 ++-
 debian/changelog | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 8fbf7219d..f7636135b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
-v3.1.3 - xx xxx 
+v3.1.3 - 17 Oct 2023
 
+   - Bug fixes
 
 v3.1.2 - 27 Jun 2023
 
diff --git a/debian/changelog b/debian/changelog
index b2f60255c..e6381c993 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,7 @@ openvswitch (3.1.3-1) unstable; urgency=low
[ Open vSwitch team ]
* New upstream version
 
- -- Open vSwitch team   Tue, 27 Jun 2023 14:09:46 +0200
+ -- Open vSwitch team   Tue, 17 Oct 2023 13:02:17 +0200
 
 openvswitch (3.1.2-1) unstable; urgency=low
[ Open vSwitch team ]
-- 
2.41.0

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH branch-3.0 2/2] Prepare for 3.0.6.

2023-10-17 Thread Ilya Maximets
Signed-off-by: Ilya Maximets 
---
 NEWS | 3 +++
 configure.ac | 2 +-
 debian/changelog | 6 ++
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 7469f835f..33b982886 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+v3.0.6 - xx xxx 
+
+
 v3.0.5 - 17 Oct 2023
 
- Bug fixes
diff --git a/configure.ac b/configure.ac
index 0ca1d9933..ab65b607f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 AC_PREREQ(2.63)
-AC_INIT(openvswitch, 3.0.5, b...@openvswitch.org)
+AC_INIT(openvswitch, 3.0.6, b...@openvswitch.org)
 AC_CONFIG_SRCDIR([vswitchd/ovs-vswitchd.c])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR([build-aux])
diff --git a/debian/changelog b/debian/changelog
index 7d1031dcf..219e7af9a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+openvswitch (3.0.6-1) unstable; urgency=low
+   [ Open vSwitch team ]
+   * New upstream version
+
+ -- Open vSwitch team   Tue, 17 Oct 2023 13:02:10 +0200
+
 openvswitch (3.0.5-1) unstable; urgency=low
[ Open vSwitch team ]
* New upstream version
-- 
2.41.0

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH branch-3.0 0/2] Release patches for v3.0.5.

2023-10-17 Thread Ilya Maximets
It's been 3+ months since the last raound of stable releases
and we accumulated quite a few important fixes.

Ilya Maximets (2):
  Set release date for 3.0.5.
  Prepare for 3.0.6.

 NEWS | 6 +-
 configure.ac | 2 +-
 debian/changelog | 8 +++-
 3 files changed, 13 insertions(+), 3 deletions(-)

-- 
2.41.0

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH branch-3.0 1/2] Set release date for 3.0.5.

2023-10-17 Thread Ilya Maximets
Signed-off-by: Ilya Maximets 
---
 NEWS | 3 ++-
 debian/changelog | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 05fc07e4f..7469f835f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
-v3.0.5 - xx xxx 
+v3.0.5 - 17 Oct 2023
 
+   - Bug fixes
 
 v3.0.4 - 06 Apr 2023
 
diff --git a/debian/changelog b/debian/changelog
index 7d505f0d1..7d1031dcf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,7 @@ openvswitch (3.0.5-1) unstable; urgency=low
[ Open vSwitch team ]
* New upstream version
 
- -- Open vSwitch team   Thu, 06 Apr 2023 15:10:09 +0200
+ -- Open vSwitch team   Tue, 17 Oct 2023 13:02:10 +0200
 
 openvswitch (3.0.4-1) unstable; urgency=low
[ Open vSwitch team ]
-- 
2.41.0

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH branch-2.17 2/2] Prepare for 2.17.9.

2023-10-17 Thread Ilya Maximets
Signed-off-by: Ilya Maximets 
---
 NEWS | 3 +++
 configure.ac | 2 +-
 debian/changelog | 6 ++
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 1cbda6032..7d4a8c081 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+v2.17.9 - xx xxx 
+-
+
 v2.17.8 - 17 Oct 2023
 -
- Bug fixes
diff --git a/configure.ac b/configure.ac
index 81ba56599..3c9562a44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 AC_PREREQ(2.63)
-AC_INIT(openvswitch, 2.17.8, b...@openvswitch.org)
+AC_INIT(openvswitch, 2.17.9, b...@openvswitch.org)
 AC_CONFIG_SRCDIR([datapath/datapath.c])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR([build-aux])
diff --git a/debian/changelog b/debian/changelog
index cb16203e5..8edbcad89 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+openvswitch (2.17.9-1) unstable; urgency=low
+   [ Open vSwitch team ]
+   * New upstream version
+
+ -- Open vSwitch team   Tue, 17 Oct 2023 13:01:45 +0200
+
 openvswitch (2.17.8-1) unstable; urgency=low
[ Open vSwitch team ]
* New upstream version
-- 
2.41.0

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH branch-2.17 1/2] Set release date for 2.17.8.

2023-10-17 Thread Ilya Maximets
Signed-off-by: Ilya Maximets 
---
 NEWS | 3 ++-
 debian/changelog | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 673f22720..1cbda6032 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
-v2.17.8 - xx xxx 
+v2.17.8 - 17 Oct 2023
 -
+   - Bug fixes
 
 v2.17.7 - 27 Jun 2023
 -
diff --git a/debian/changelog b/debian/changelog
index e5de002d3..cb16203e5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,7 @@ openvswitch (2.17.8-1) unstable; urgency=low
[ Open vSwitch team ]
* New upstream version
 
- -- Open vSwitch team   Tue, 27 Jun 2023 14:08:41 +0200
+ -- Open vSwitch team   Tue, 17 Oct 2023 13:01:45 +0200
 
 openvswitch (2.17.7-1) unstable; urgency=low
[ Open vSwitch team ]
-- 
2.41.0

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH branch-2.17 0/2] Release patches for v2.17.8.

2023-10-17 Thread Ilya Maximets
It's been 3+ months since the last raound of stable releases
and we accumulated quite a few important fixes.

Ilya Maximets (2):
  Set release date for 2.17.8.
  Prepare for 2.17.9.

 NEWS | 6 +-
 configure.ac | 2 +-
 debian/changelog | 8 +++-
 3 files changed, 13 insertions(+), 3 deletions(-)

-- 
2.41.0

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH] db-ctl-base: Fix memory leak of db commands.

2023-10-17 Thread Zengyuan Wang via dev
Variable "want_key" in function check_condition and variable "key" in function 
set_column were not destroyed in exception branch.

This patch calls ovsdb_atom_destroy to release resources to avoid memory leak.

Fixes: 79c1a00fb5a5 ("db-ctl-base: Don't die in set_column() on error.")
Fixes: e09b3af3e249 ("db-ctl-base: Don't die in is_condition_satisfied() on 
error")
Signed-off-by: Zengyuan Wang 
---
 lib/db-ctl-base.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/db-ctl-base.c b/lib/db-ctl-base.c
index 5d2635946..3a8068b12 100644
--- a/lib/db-ctl-base.c
+++ b/lib/db-ctl-base.c
@@ -820,6 +820,7 @@ check_condition(const struct ovsdb_idl_table_class *table,
 type.value.type = OVSDB_TYPE_VOID;
 error = ovsdb_datum_from_string(, , value_string, symtab);
 if (error) {
+ovsdb_atom_destroy(_key, column->type.key.type);
 goto out;
 }
 
@@ -1374,6 +1375,7 @@ set_column(const struct ovsdb_idl_table_class *table,
 error = ovsdb_atom_from_string(, NULL, >type.value,
value_string, symtab);
 if (error) {
+ovsdb_atom_destroy(, column->type.key.type);
 goto out;
 }
 
-- 
2.22.0.windows.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH] db-ctl-base: fix memory leak of db commands

2023-10-17 Thread 0-day Robot
Bleep bloop.  Greetings Zengyuan Wang, 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: The subject summary should start with a capital.
WARNING: The subject summary should end with a dot.
Subject: db-ctl-base: fix memory leak of db commands
Lines checked: 40, Warnings: 2, Errors: 0


Please check this out.  If you feel there has been an error, please email 
acon...@redhat.com

Thanks,
0-day Robot
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH] db-ctl-base: fix memory leak of db commands

2023-10-17 Thread Zengyuan Wang via dev
Variable "want_key" in function check_condition and variable "key" in function 
set_column were not destroyed in exception branch.

This patch calls ovsdb_atom_destroy to release resources to avoid memory leak.

Fixes: 79c1a00fb5a5 ("db-ctl-base: Don't die in set_column() on error.")
Fixes: e09b3af3e249 ("db-ctl-base: Don't die in is_condition_satisfied() on 
error")
Signed-off-by: Zengyuan Wang 
---
 lib/db-ctl-base.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/db-ctl-base.c b/lib/db-ctl-base.c
index 5d2635946..3a8068b12 100644
--- a/lib/db-ctl-base.c
+++ b/lib/db-ctl-base.c
@@ -820,6 +820,7 @@ check_condition(const struct ovsdb_idl_table_class *table,
 type.value.type = OVSDB_TYPE_VOID;
 error = ovsdb_datum_from_string(, , value_string, symtab);
 if (error) {
+ovsdb_atom_destroy(_key, column->type.key.type);
 goto out;
 }
 
@@ -1374,6 +1375,7 @@ set_column(const struct ovsdb_idl_table_class *table,
 error = ovsdb_atom_from_string(, NULL, >type.value,
value_string, symtab);
 if (error) {
+ovsdb_atom_destroy(, column->type.key.type);
 goto out;
 }
 
-- 
2.22.0.windows.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2 2/2] net: openvswitch: Annotate struct mask_array with __counted_by

2023-10-17 Thread Simon Horman
On Sat, Oct 14, 2023 at 07:29:57PM -0700, Kees Cook wrote:
> On Sat, Oct 14, 2023 at 08:34:53AM +0200, Christophe JAILLET wrote:
> > Prepare for the coming implementation by GCC and Clang of the __counted_by
> > attribute. Flexible array members annotated with __counted_by can have
> > their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
> > (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
> > functions).
> > 
> > Signed-off-by: Christophe JAILLET 
> > ---
> > v2: Fix the subject  [Ilya Maximets]
> > fix the field name used with __counted_by  [Ilya Maximets]
> > 
> > v1: 
> > https://lore.kernel.org/all/f66ddcf1ef9328f10292ea75a17b584359b6cde3.1696156198.git.christophe.jail...@wanadoo.fr/
> > 
> > 
> > This patch is part of a work done in parallel of what is currently worked
> > on by Kees Cook.
> > 
> > My patches are only related to corner cases that do NOT match the
> > semantic of his Coccinelle script[1].
> > 
> > In this case, in tbl_mask_array_alloc(), several things are allocated with
> > a single allocation. Then, some pointer arithmetic computes the address of
> > the memory after the flex-array.
> > 
> > [1] 
> > https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci
> > ---
> >  net/openvswitch/flow_table.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/net/openvswitch/flow_table.h b/net/openvswitch/flow_table.h
> > index 9e659db78c05..f524dc3e4862 100644
> > --- a/net/openvswitch/flow_table.h
> > +++ b/net/openvswitch/flow_table.h
> > @@ -48,7 +48,7 @@ struct mask_array {
> > int count, max;
> > struct mask_array_stats __percpu *masks_usage_stats;
> > u64 *masks_usage_zero_cntr;
> > -   struct sw_flow_mask __rcu *masks[];
> > +   struct sw_flow_mask __rcu *masks[] __counted_by(max);
> >  };
> 
> Yup, this looks correct to me. Thanks!
> 
> Reviewed-by: Kees Cook 
> 

Likewise, I agree this is correct.

Reviewed-by: Simon Horman 
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2 1/2] net: openvswitch: Use struct_size()

2023-10-17 Thread Simon Horman
On Sat, Oct 14, 2023 at 08:34:52AM +0200, Christophe JAILLET wrote:
> Use struct_size() instead of hand writing it.
> This is less verbose and more robust.
> 
> Signed-off-by: Christophe JAILLET 
> ---
> v2: No change
> 
> v1: 
> https://lore.kernel.org/all/8be59c9e06fca8eff2f264abb4c2f74db0b19a9e.1696156198.git.christophe.jail...@wanadoo.fr/
> 
> 
> This is IMHO more readable, even if not perfect.
> 
> However (untested):
> + new = kzalloc(size_add(struct_size(new, masks, size),
>  size_mul(sizeof(u64), size)), GFP_KERNEL);
> looks completely unreadable to me.

Thanks, this looks correct (and more readable) to me.

Reviewed-by: Simon Horman 
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn v2 2/2] ci: Apply the ASAN workaround only for Clang <16

2023-10-17 Thread Simon Horman
On Tue, Oct 17, 2023 at 08:19:40AM +0200, Ales Musil wrote:
> The clang from version 16 and further fixes
> the issue which was causing the slowness.
> Remove the workaround for version with the fix
> applied which allows the leak sanitizers to
> run on ARM64 as well.
> 
> Signed-off-by: Ales Musil 
> ---
> v2: Check the clang version instead of removing the whole workaround.

Acked-by: Simon Horman 

...
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn v2 1/2] ci: Use proper uname argument to get the HW type

2023-10-17 Thread Simon Horman
On Tue, Oct 17, 2023 at 08:19:39AM +0200, Ales Musil wrote:
> The -i option is not portable and doesn't work
> on all platforms. Use -m instead.
> 
> Fixes: 87f3c2364a5b ("utilities: Add simple container automation")
> Signed-off-by: Ales Musil 
> ---
> v2: Add Fixes tag.

Thanks!

Acked-by: Simon Horman 

> ---
>  .ci/ci.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/.ci/ci.sh b/.ci/ci.sh
> index 10f11939c..6bb211f2c 100755
> --- a/.ci/ci.sh
> +++ b/.ci/ci.sh
> @@ -23,7 +23,7 @@ CONTAINER_WORKDIR="/workspace/ovn-tmp"
>  IMAGE_NAME=${IMAGE_NAME:-"ovn-org/ovn-tests"}
>  
>  # Test variables
> -ARCH=${ARCH:-$(uname -i)}
> +ARCH=${ARCH:-$(uname -m)}
>  CC=${CC:-gcc}
>  
>  
> -- 
> 2.41.0
> 
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> 
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v3 1/3] ofproto-dpif-upcall: Fix redundant mirror on geneve tunnel options.

2023-10-17 Thread Roi Dayan via dev

On 16/10/2023 19:27, Mike Pattrick wrote:
> On Mon, Oct 16, 2023 at 4:08 AM Roi Dayan via dev
>  wrote:
>>
>>
>> On 16/10/2023 11:00, Roi Dayan wrote:
>>>
>>> On 16/10/2023 10:42, Eelco Chaudron wrote:


 On 16 Oct 2023, at 9:09, Roi Dayan wrote:

> On 09/10/2023 15:05, Roi Dayan wrote:
>> The cited commit fixed missing mirror packets by reset mirror when
>> packets are modified but setting geneve options was also treated as
>> a modified packet but should be treated as a part of set_tunnel
>> which doesn't reset mirror.
>>
>> Fixes: feed7f677505 ("ofproto-dpif-upcall: Mirror packets that are 
>> modified.")
>> Signed-off-by: Roi Dayan 
>> Acked-by: Simon Horman 
>> Acked-by: Eelco Chaudron 
>> ---
>>
>> Notes:
>> v2:
>> - user correct sha in fixes line.
>>
>>  ofproto/ofproto-dpif-xlate.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
>> index be4bd6657688..e243773307b7 100644
>> --- a/ofproto/ofproto-dpif-xlate.c
>> +++ b/ofproto/ofproto-dpif-xlate.c
>> @@ -7097,7 +7097,7 @@ reset_mirror_ctx(struct xlate_ctx *ctx, const 
>> struct flow *flow,
>>
>>  set_field = ofpact_get_SET_FIELD(a);
>>  mf = set_field->field;
>> -if (mf_are_prereqs_ok(mf, flow, NULL)) {
>> +if (mf_are_prereqs_ok(mf, flow, NULL) && 
>> !mf_is_tun_metadata(mf)) {
>>  ctx->mirrors = 0;
>>  }
>>  return;
>
>
> Hi,
>
> I would like to consult another related issue to the original commit.
>
> feed7f677505 ("ofproto-dpif-upcall: Mirror packets that are modified.")
>
> Now with geneve options the redundant mirror is removed but if there will 
> be
> a real modification there will still be a mirror output but in an 
> incorrect place.
>
> For example adding dec_ttl, the action list will be like this:
>
> actions:enp8s0f0_1,set(tunnel(tun_id=0x2a,src=7.7.7.7,dst=7.7.7.8,ttl=64,tp_dst=6081,geneve({class=0x,type=0x80,len=4,0x1234}),flags(df|key))),set(ipv4(ttl=63)),genev_sys_6081,enp8s0f0_1
>
> A mirror output enp8s0f0_1 added at the end but the second mirror is with 
> the tunnel header already.
>
> When not using tunnels the mirror is fine and the action list will look 
> like this:
>
> actions:port1,dec_ttl,port2,port1
>
> So with tunnel the second mirror shouldn't have been somehow with the 
> dec_ttl action but without the tunnel header?
>
> Should the actions list somehow be like this
>
> actions:enp8s0f0_1,set(ipv4(ttl=63),enp8s0f0_1,set(tunnel(...),genev_sys_6081

 Not sure I follow you, but do you think the dect ttl and set tunnel should 
 have been swapped? I guess this would depend on your OpenFlow rule. Can 
 you show an ofproto trace on your example, which might help clarify OVS’s 
 reasoning?

 //Eelco

>>>
>>> yes. but not just dec_ttl. any header modification beside encap.
>>> after all original commit explains users could reverse the packet with 
>>> rules so
>>> there won't be a real packet coming so add mirror after modification.
>>> but mirror is usually before encap or on recv after decap.
>>>
>>> I expected action list to be, maybe: mirrorPort, header mod like replace 
>>> src/dst and ping type, mirrorPort, encap, tunnelPort.
>>>
>>> i'll check about the ofproto trace
>>>

>
> Am I looking at this wrong? What do you think?
>
> Thanks,
> Roi

>>>
>>>
>>
>>
>> #  ovs-ofctl dump-flows br-ovs
>>  cookie=0x0, duration=317.989s, table=0, n_packets=8, n_bytes=376, arp 
>> actions=NORMAL
>>  cookie=0x0, duration=317.982s, table=0, n_packets=21, n_bytes=2058, 
>> ip,in_port=geneve1 
>> actions=set_field:0x1234->tun_metadata0,dec_ttl,output:"enp8s0f0_0"
>>  cookie=0x0, duration=317.975s, table=0, n_packets=21, n_bytes=2058, 
>> ip,in_port="enp8s0f0_0" 
>> actions=set_field:0x1234->tun_metadata0,dec_ttl,output:geneve1
>>  cookie=0x0, duration=318.117s, table=0, n_packets=11, n_bytes=846, 
>> priority=0 actions=NORMAL
>>
>>
>>
>> #   ovs-appctl ofproto/trace br-ovs 
>> in_port=enp8s0f0_0,tcp,nw_ttl=64,nw_src=1.1.1.7,tcp_dst=22
>> Flow: 
>> tcp,in_port=1,vlan_tci=0x,dl_src=00:00:00:00:00:00,dl_dst=00:00:00:00:00:00,nw_src=1.1.1.7,nw_dst=0.0.0.0,nw_tos=0,nw_ecn=0,nw_ttl=64,nw_frag=no,tp_src=0,tp_dst=22,tcp_flags=0
>>
>> bridge("br-ovs")
>> 
>>  0. ip,in_port=1, priority 32768
>> set_field:0x1234->tun_metadata0
>> dec_ttl
>> output:3
>>  -> output to kernel tunnel
>>
>> Final flow: 
>> tcp,in_port=1,vlan_tci=0x,dl_src=00:00:00:00:00:00,dl_dst=00:00:00:00:00:00,nw_src=1.1.1.7,nw_dst=0.0.0.0,nw_tos=0,nw_ecn=0,nw_ttl=63,nw_frag=no,tp_src=0,tp_dst=22,tcp_flags=0
>> Megaflow: 

[ovs-dev] [PATCH ovn v2 1/2] ci: Use proper uname argument to get the HW type

2023-10-17 Thread Ales Musil
The -i option is not portable and doesn't work
on all platforms. Use -m instead.

Fixes: 87f3c2364a5b ("utilities: Add simple container automation")
Signed-off-by: Ales Musil 
---
v2: Add Fixes tag.
---
 .ci/ci.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.ci/ci.sh b/.ci/ci.sh
index 10f11939c..6bb211f2c 100755
--- a/.ci/ci.sh
+++ b/.ci/ci.sh
@@ -23,7 +23,7 @@ CONTAINER_WORKDIR="/workspace/ovn-tmp"
 IMAGE_NAME=${IMAGE_NAME:-"ovn-org/ovn-tests"}
 
 # Test variables
-ARCH=${ARCH:-$(uname -i)}
+ARCH=${ARCH:-$(uname -m)}
 CC=${CC:-gcc}
 
 
-- 
2.41.0

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH ovn v2 2/2] ci: Apply the ASAN workaround only for Clang <16

2023-10-17 Thread Ales Musil
The clang from version 16 and further fixes
the issue which was causing the slowness.
Remove the workaround for version with the fix
applied which allows the leak sanitizers to
run on ARM64 as well.

Signed-off-by: Ales Musil 
---
v2: Check the clang version instead of removing the whole workaround.
---
 .ci/ci.sh | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/.ci/ci.sh b/.ci/ci.sh
index 6bb211f2c..3f1b41ead 100755
--- a/.ci/ci.sh
+++ b/.ci/ci.sh
@@ -105,6 +105,16 @@ function run_tests() {
 "
 }
 
+function check_clang_version_ge() {
+lower=$1
+version=$(clang --version | head -n1 | cut -d' ' -f3)
+if ! echo -e "$lower\n$version" | sort -CV; then
+  return 1
+fi
+
+return 0
+}
+
 options=$(getopt --options "" \
 --long help,shell,archive-logs,jobs:,ovn-path:,ovs-path:,image-name:\
 -- "${@}")
@@ -149,7 +159,7 @@ while true; do
 done
 
 # Workaround for https://bugzilla.redhat.com/2153359
-if [ "$ARCH" = "aarch64" ]; then
+if [ "$ARCH" = "aarch64" ] && ! check_clang_version_ge "16.0.0"; then
 ASAN_OPTIONS="detect_leaks=0"
 fi
 
-- 
2.41.0

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn 2/2] ci: Remove the ASAN ARM64 ASAN workaround

2023-10-17 Thread Ales Musil
On Tue, Oct 17, 2023 at 7:08 AM Ales Musil  wrote:

> On Mon, Oct 16, 2023 at 10:20 PM Mark Michelson 
> wrote:
> >
> > Hi Ales,
> >
> > The patch makes sense to me. Is there something that guarantees that
> > clang >= 16 is installed when running CI?
>
> Yeah, clang 16 is default on Fedora 38 which we use for ARM64 runs.
>

On the other hand, thinking about it I'll post v2 which will check the
clang version, in case there is anyone using it with different combinations.


>
> >
> > Thanks,
> > Mark Michelson
> >
> > On 10/16/23 04:08, Ales Musil wrote:
> > > The clang from version 16 and further fixes
> > > the issue which was causing the slowness.
> > > Remove the workaround which allows
> > > the leak sanitizers to run on ARM64 as well.
> > >
> > > Signed-off-by: Ales Musil 
> > > ---
> > >   .ci/ci.sh | 5 -
> > >   1 file changed, 5 deletions(-)
> > >
> > > diff --git a/.ci/ci.sh b/.ci/ci.sh
> > > index 6bb211f2c..282d30b84 100755
> > > --- a/.ci/ci.sh
> > > +++ b/.ci/ci.sh
> > > @@ -148,11 +148,6 @@ while true; do
> > >   shift
> > >   done
> > >
> > > -# Workaround for https://bugzilla.redhat.com/2153359
> > > -if [ "$ARCH" = "aarch64" ]; then
> > > -ASAN_OPTIONS="detect_leaks=0"
> > > -fi
> > > -
> > >   if [ -z "$DPDK" ]; then
> > >  mkdir -p "$DPDK_PATH"
> > >   fi
> >
>
> Thanks,
> Ales
>
> --
>
> Ales Musil
>
> Senior Software Engineer - OVN Core
>
> Red Hat EMEA
>
> amu...@redhat.com
>

Thanks,
Ales
-- 

Ales Musil

Senior Software Engineer - OVN Core

Red Hat EMEA 

amu...@redhat.com

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev