From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EF78EA054F; Tue, 16 Mar 2021 17:28:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C8422428D7; Tue, 16 Mar 2021 17:28:17 +0100 (CET) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mails.dpdk.org (Postfix) with ESMTP id 6ABCD40A4B for ; Tue, 16 Mar 2021 17:28:16 +0100 (CET) Received: by mail-pf1-f175.google.com with SMTP id x7so9163984pfi.7 for ; Tue, 16 Mar 2021 09:28:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=bavJDbsiNB25YrAuo6Qu+kLgYThTMBzAY3FwX8wRPYM=; b=DtBcvJ9Omp9ro6DVQ8LzH0/sxDdeiWJGi5WoiWaINLqRsMtRj4rj0smLMAI7fqYuhb KtB9lgvEMwEQT/AIKQR8YdBZXyK+NYhY6hU6zZrPrKcoHIILAGqvnvD167GfC9pg89Tj L3y7fRf5ilnz6tCd+MscoMkxdMAZV2Dg1ABHYPEtMgbZjRa4yJEvhr2QtKPnKdN2JHoX QHFO6sOYW0YjJW4A/eJiLDqUAxabbXvvfXi3DLa3Ai8BkJQ0+R6Ny6cTsDzEy6YJs7wD mIfAJt4QPOHPFSrXWQNXcQY1fOw4RVlEsOV6KxsB65cHJxI9UvKgR3yJo457SG1g0F2b TnJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bavJDbsiNB25YrAuo6Qu+kLgYThTMBzAY3FwX8wRPYM=; b=sy+99RZZ2kxu+HOcPCsMBWgGc945St1DlV3+yRJNYazNpyuHPa8XzOq4UgxDPIE4M2 LYQYG8NqsGb2ELptcQP3aw9AUa4dqlv4zrCtlgP3T4mnis5WAGpFzswlEYFzf/oo5829 fGGFz112SfEm4LkHdsmdLPOdvYyUkUrne9GZKnQ79j5aZ8JopH1c5k42iiNjS6Xhi6GP hp8C09ka6ypOG2ivMbZzarEPYzCCQ/dRbrJZf9XaN0aY7JK19v/8wjptAafAUit2QZpj rgnihNKvDwrWO7/rxyJ10q4BxUfsKhvYMxl05vfkslNi/tnHrskbqrmS3nN4FbBt/cKG luVw== X-Gm-Message-State: AOAM532LkQ1g9i+JJM+pq8yLnGrz7PuLtD4LZ2gheEGX6l1iSOtmFu27 WlrhCNcsf2Pcf5KY++CmW4KXwcynwwsr8g== X-Google-Smtp-Source: ABdhPJxsIC8mLf1FlyzHzxENaikMNq89mvjkq1OX1dBXqoKIKAFevtU8M9w+UDCbBKNdzo8kgvRJ8w== X-Received: by 2002:aa7:956d:0:b029:1f1:5ba6:2a58 with SMTP id x13-20020aa7956d0000b02901f15ba62a58mr192039pfq.63.1615912094826; Tue, 16 Mar 2021 09:28:14 -0700 (PDT) Received: from hermes.local (76-14-218-44.or.wavecable.com. [76.14.218.44]) by smtp.gmail.com with ESMTPSA id y20sm17278817pfo.210.2021.03.16.09.28.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 09:28:14 -0700 (PDT) Date: Tue, 16 Mar 2021 09:28:05 -0700 From: Stephen Hemminger To: dev@dpdk.org Message-ID: <20210316092805.0168dfb7@hermes.local> In-Reply-To: <20210315192722.35490-1-stephen@networkplumber.org> References: <20210315192722.35490-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 0/2] Mark shared pthread mutex X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 15 Mar 2021 12:27:20 -0700 Stephen Hemminger 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.