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 479F1A0C3F; Fri, 16 Apr 2021 05:20:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 148AB1624E1; Fri, 16 Apr 2021 05:20:12 +0200 (CEST) Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) by mails.dpdk.org (Postfix) with ESMTP id 9446E40140 for ; Fri, 16 Apr 2021 05:20:10 +0200 (CEST) Received: by mail-qv1-f46.google.com with SMTP id dp18so8179282qvb.5 for ; Thu, 15 Apr 2021 20:20:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=H28x7QGr9zMdKP8jfZf8n77jyuguz5TW8W3GVm5iY9s=; b=gIsbNKtURlDHiDMqz87ZPEEhAHbz0A2RHKm4MFutK6bD78VwUM48CJtjUgdW5lQSjL qKYt2lxwFbQScHt1W4swiu/QqUISX3ltMmqGyXkTBCgIujnRr1dYgXSXduaDM0KYM4qa IBKY2HPVAmVBCjaJ27TTMFAlKNufAXFExZQxk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=H28x7QGr9zMdKP8jfZf8n77jyuguz5TW8W3GVm5iY9s=; b=dOfM60u8RgTW2YR+Mlagf8gWafL88aUXsX1f8u0UtMH7JZ8tWploKjzlReWlBzbMuV SLSrGnLlGXU45ELTCn2J2SmcksJxRxEYXLQ0k4OGwgaIKGHb5tnBoQaf48NPeC8BCqAs /m/q1u7yQ7d1sk4e8hUgpUlzMpbU8aUIdHqiBdDunmeRS46ChaKcEWV56DRtye3qIa9Y N2d6ivZXzuSFeLgdwhDp1f2bMvfhWYuUULHSnwEe9HPE7eHY3bGYGcmlqm1NHOAgir/7 61akqM5MfW45kARvuYuvnvOZSLQnbbLDQbvZsvxVtrF9uvUOtg8hwo58L4rH21kbVtv5 ut1Q== X-Gm-Message-State: AOAM530VMG4j85CjNbC82JFBNRIunvCVr2/eaL3dQsmNTBXeHUsjVLtB NSpYSxtnhdksBkqH7vOf+cM4aNgyIRAIl6S2Wq60kQ== X-Google-Smtp-Source: ABdhPJz/MZ1B2ZG2Whpy29LKL5dz9X+H+THAwp9cHYOLeqyOS630D0Jf+SscpY8dqvqiE+FjyGJFlX0kktWLyWAObD8= X-Received: by 2002:ad4:4210:: with SMTP id k16mr6369888qvp.30.1618543209763; Thu, 15 Apr 2021 20:20:09 -0700 (PDT) MIME-Version: 1.0 References: <20210315192722.35490-1-stephen@networkplumber.org> <20210315192722.35490-2-stephen@networkplumber.org> <7106da73-95a1-30ae-f949-87ecca05b24d@intel.com> <14c8924a-24cc-b857-2a5c-260b0fcc02ef@intel.com> In-Reply-To: <14c8924a-24cc-b857-2a5c-260b0fcc02ef@intel.com> From: Ajit Khaparde Date: Thu, 15 Apr 2021 20:19:53 -0700 Message-ID: To: Ferruh Yigit Cc: Suanming Mou , Ori Kam , Andrew Rybchenko , NBU-Contact-Thomas Monjalon , "dev@dpdk.org" , Stephen Hemminger , Matan Azrad , Shahaf Shuler , Somnath Kotur Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="00000000000018d69205c00e7507" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: make flow API primary/secondary process safe 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" --00000000000018d69205c00e7507 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Apr 15, 2021 at 12:42 AM Ferruh Yigit wrot= e: > > On 4/15/2021 3:55 AM, Suanming Mou wrote: > > Hi, > > > >> -----Original Message----- > >> From: Ferruh Yigit > >> Sent: Wednesday, April 14, 2021 9:07 PM > >> To: Suanming Mou ; Ori Kam ; > >> Andrew Rybchenko ; NBU-Contact-Thomas > >> Monjalon > >> Cc: dev@dpdk.org; Stephen Hemminger > >> Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: make flow API primary/seco= ndary > >> process safe > >> > >> On 3/16/2021 11:48 PM, Suanming Mou wrote: > >>> Hi Stephen, > >>> > >>>> -----Original Message----- > >>>> From: Stephen Hemminger > >>>> Sent: Tuesday, March 16, 2021 3:27 AM > >>>> To: dev@dpdk.org > >>>> Cc: Stephen Hemminger ; Suanming Mou > >>>> > >>>> Subject: [PATCH 1/2] ethdev: make flow API primary/secondary process > >>>> safe > >>>> > >>>> Posix mutex are not by default safe for protecting for usage from > >>>> multiple processes. The flow ops mutex could be used by both primary > >>>> and secondary processes. > >>> > >>> Process safe is something more widely scope. I assume it should be an= other > >> feature but not a bugfix for thread-safe? > >>> And the fag RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE we have added is just > >> thread safe. > >>> > >> > >> Hi Suanming, > >> > >> I think 'RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE' flag and what this patch > >> address are different issues. > >> > >> 'RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE' is to add/remove synchronization > >> support for flow APIs, that is for thread safety as flag name suggests= . > >> > >> This patch is to solve the problem for multi process, where commit log= describes > >> as posix mutex is not safe for multiple process. > > > > So for PMDs which not set the RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE capabili= ty bit, they will have the process level protection in multi-process. > > For PMDs which set the RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE capability bit,= this change does not help with these PMDs. If the PMD with RTE_ETH_DEV_FLO= W_OPS_THREAD_SAFE capability bit internally does not support multi-process= , they may still suffer crash etc. > > Correct > > > (If I understand correctly, mlx PMD level now should support multi-proc= ess, but better to have the confirmation from maintainers with much deeper = level). > > I assume this patch solves the posix mutex for multi-process only, hard= to say the flow API primary/secondary process safe after that patch. > > > > I am also not quite sure how PMDs that doesn't require mutex at all, (mlx= 5, > bnxt, sfc) behave on multi process. Is calling flow APIs from both > primary/secondary safe? We have some level of tests on this and so far current code looks safe. But we will try to increase the coverage and see how it goes. > --00000000000018d69205c00e7507--