Recently released Clang 21 has a few new warnings along with improved
thread-safety analysis.  All that results in many warnings (some are
reasonable, some not so much) while building OVS.  This patch set gets
rid of all the warnings in one way or another as well as fixing a
real thread-safety issue in ip fragmentation code.

There is no good way for now to run clang 21 in our CI, so not adding
any new jobs.  We may consider adding a new job or switching one of
the existing ones to Fedora 43 after it is released.

Tested locally with a Fedora 43 container.

First patch is a bug fix, others are changes required to fix warnings.
We'll need to backport the whole set though to ensure that OVS 3.3 LTS
builds normally with the new clang.  This is a slight change in the
exported API, but it should be compatible.


Ilya Maximets (5):
  ipf: Fix locking for lists and a deadlock with the clean thread.
  treewide: Remove OVS_GUARDED from RCU-based structure fields.
  treewide: Fix clang 21 thread-safety warnings for init/create/destroy.
  thread: Convert init/destroy lock functions to use non-const
    arguments.
  configure: Disable clang 21 warning for uninitialized const fields.

 configure.ac                     |  1 +
 include/openvswitch/thread.h     | 12 ++++++------
 lib/conntrack-private.h          |  8 ++++----
 lib/dpif-netdev-private-dpcls.h  |  2 +-
 lib/dpif-netdev-private-thread.h | 10 +++++-----
 lib/dpif-netdev.c                |  4 +++-
 lib/fat-rwlock.c                 |  2 ++
 lib/ipf.c                        | 33 +++++++++++---------------------
 lib/mac-learning.c               |  1 +
 lib/mcast-snooping.c             | 22 +++++++++++++--------
 lib/netdev-offload-tc.c          |  2 +-
 lib/ovs-thread.c                 | 33 +++++++++++++++-----------------
 lib/ovs-thread.h                 |  4 ++--
 lib/timeval.c                    |  2 ++
 ofproto/bond.c                   |  4 +++-
 ofproto/ofproto-dpif.c           | 10 ++++++++--
 ofproto/ofproto.c                |  3 +++
 17 files changed, 82 insertions(+), 71 deletions(-)

-- 
2.51.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to