[dpdk-dev] [PATCH 0/2] Mark shared pthread mutex

Stephen Hemminger stephen at networkplumber.org
Tue Mar 16 17:28:05 CET 2021


On Mon, 15 Mar 2021 12:27:20 -0700
Stephen Hemminger <stephen at networkplumber.org> wrote:

> This fixes two places where pthread_mutex was being unsafely
> used between primary secondary process.
> 
> These patches are necessary but not sufficient to address Bug 662
> 
> Stephen Hemminger (2):
>   ethdev: make flow API primary/secondary process safe
>   net/failsafe: fix primary/secondary mutex
> 
>  drivers/net/failsafe/failsafe.c | 5 +++++
>  lib/librte_ethdev/rte_ethdev.c  | 6 +++++-
>  2 files changed, 10 insertions(+), 1 deletion(-)
> 

The following drivers have the same kind of issue.

Drivers with unsafe pthread_mutex:

net/
	af_xdp
	atlantic
	axgbe
	bnxt
	ena
	failsafe (see patch #2)
	hinic
	mlx5
	qede
	vhost
	virtio

raw/	
	ifpga
vdpa/
	ifc
	mlx5


Another alternative would be to create a DPDK wrapper (rte_mutex?)
which had the proper semantics. That might make the Windows port easier.
But it would make backport to stable harder.


If this does not get fixed in April, we should change documentation
to warn users.




More information about the dev mailing list