mbox series

[v3,00/16] Enable lock annotations on most libraries and drivers

Message ID 20230404124840.1898-1-david.marchand@redhat.com (mailing list archive)
Headers
Series Enable lock annotations on most libraries and drivers |

Message

David Marchand April 4, 2023, 12:48 p.m. UTC
  This is a followup of the series that introduced lock annotations.
I reworked and made annotations work in what seemed the easier cases.
In most cases, I chose to convert inline wrappers around the EAL lock
API to simple macro: I did not see much value in those wrappers and this
is way simpler than adding __rte_*lock_function tags everywhere.

A list of libraries and drivers still need more work as their code have
non obvious locks handling. For those components, the check is opted
out.
I leave it to their respective maintainers to enable the checks later.

FreeBSD libc pthread API has lock annotations while Linux glibc has
none. Until we get a proper abstraction for mutexes, the simpler is
to disable the check on FreeBSD.

Maintainers, please review.
  

Comments

Thomas Monjalon April 23, 2023, 8:09 p.m. UTC | #1
04/04/2023 14:48, David Marchand:
> This is a followup of the series that introduced lock annotations.
> I reworked and made annotations work in what seemed the easier cases.
> In most cases, I chose to convert inline wrappers around the EAL lock
> API to simple macro: I did not see much value in those wrappers and this
> is way simpler than adding __rte_*lock_function tags everywhere.
> 
> A list of libraries and drivers still need more work as their code have
> non obvious locks handling. For those components, the check is opted
> out.
> I leave it to their respective maintainers to enable the checks later.

Some drivers require some effort to enable the lock checks at compilation:
	bnx2x, bnxt, cnxk, dpaa, enic, failsafe, hinic, hns3, mlx5

> FreeBSD libc pthread API has lock annotations while Linux glibc has
> none. Until we get a proper abstraction for mutexes, the simpler is
> to disable the check on FreeBSD.
> 
> Maintainers, please review.

Applied, thanks.