On Tue, Feb 7, 2023 at 11:45 AM David Marchand <david.march...@redhat.com> wrote: > > vhost internals involves multiple locks to protect data access by > multiple threads. > > This series uses clang thread safety checks [1] to catch issues during > compilation: EAL spinlock, seqlock and rwlock are annotated and vhost > code is instrumented so that clang can statically check correctness. > > Those annotations are quite heavy to maintain because the full path of > code must be annotated (as can be seen in the vhost datapath code), > but I think it is worth using. > > This has been tested against the whole tree and some fixes are already > flying on the mailing list (see [2] for a list). > > If this first series is merged, I will prepare a followup series for EAL > and other libraries. > > > 1: https://clang.llvm.org/docs/ThreadSafetyAnalysis.html > 2: > https://patchwork.dpdk.org/bundle/dmarchand/lock_fixes/?state=*&archive=both >
We have been discussing the annotations naming convention in another thread (I copied involved people). I saw no objection to the approach of simply prefixing with __rte the clang attributes. I'll stick to this de facto convention we have in dpdk. If any objection arises, I will do the necessary adjustments before -rc2. Series applied, thanks to all reviewers! -- David Marchand