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 6549DA054F; Mon, 15 Mar 2021 20:46:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D64F92427B5; Mon, 15 Mar 2021 20:46:07 +0100 (CET) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mails.dpdk.org (Postfix) with ESMTP id F0A204069F for ; Mon, 15 Mar 2021 20:46:05 +0100 (CET) Received: by mail-pg1-f172.google.com with SMTP id 16so14667841pgo.13 for ; Mon, 15 Mar 2021 12:46:05 -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=x8EKXkKbroFaQw/RSf7UcbWrHDIQQWKfbQD4sDBgr48=; b=YjT8frZAFxEQFANi7T3jsaQ1FL7Z8ROI9PQjTcFbsSNzwqKJU3ZjhKgXgspxoLwfiY jTb0QPUtt8PQKCZXqrWXpxHFFoBisTuXk5TdnGVfA090C5mENDoxH9yAhPru8AWPj5sX hevkFgu6+mLErL51xatd6P/hQlvVmq4UkWKYV1HCXvcK0XL/ypg+62zWf74+jJzEozIA H2KyojfQeOCMUbXgKEDY8jq0d8/wQy9oArM0DGiFapnCSLMWVkYFqAv1XP38m6WvgGlC qwPiwHti3yb7WljbOKG7JlneZuzvt5vAJcNrU6XxjdwVE5oBWIa3ufJOrjNc5Homg5DV sYsA== 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=x8EKXkKbroFaQw/RSf7UcbWrHDIQQWKfbQD4sDBgr48=; b=WLtdns0AIo8fI+eLVeWgdPaj4N5oWI3wcJ6y7N/8KCU8ZIGC3lATp7HBsZP7yQWAdg 3QCms9TPv6DGJzF2Pu4a4hYnraHdjKPzInkIqWAVTKpnd1gdbeIFEE18lJ9XXT53L3wL HCGPAfprPvQoaJrLPWmNvze2Jw0SYq9laZdr8OMKZi79yXalfbtqUKjhTb6kQxRoq00b m/Xho1qefLvuhhfMNnRZOO5GMwtgqNdD0T7xkWo7CD3NsnVT9WAm6vqm7ZFPZiCC9MV9 87W1InPEVMJoaOvFpndmW5TBGmtP0qRkG8jNRQwy1hmXQnZkah2GvmbhB/kgiAUevPDv U0Gw== X-Gm-Message-State: AOAM530H+s9yTRCAx2jn7HI3ssx+wSkfINR9OcWsExYzCM2JxE2Z1Ypy m47aM87zp91J3CxRJR0h1YvE5A5EMsJMFg== X-Google-Smtp-Source: ABdhPJxN8FjWLnu8k7Knt8UauIzZ+DUcER378hSl0Yz5y8TAggA0nBgdKSojIOn2tUsT0ogeM76CTA== X-Received: by 2002:a63:f921:: with SMTP id h33mr589652pgi.419.1615837564616; Mon, 15 Mar 2021 12:46:04 -0700 (PDT) Received: from hermes.local (76-14-218-44.or.wavecable.com. [76.14.218.44]) by smtp.gmail.com with ESMTPSA id gz4sm470258pjb.0.2021.03.15.12.46.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 12:46:04 -0700 (PDT) Date: Mon, 15 Mar 2021 12:45:56 -0700 From: Stephen Hemminger To: dev@dpdk.org Message-ID: <20210315124556.3a071224@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(-) Side note: While looking at the code, many places are checking for error conditions that can never occur.. RETURN VALUE pthread_mutex_init always returns 0. The other mutex functions return 0 on success and a non-zero error code on error.