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 7EFB1A0A0C; Thu, 15 Apr 2021 05:17:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 487D4161F33; Thu, 15 Apr 2021 05:17:48 +0200 (CEST) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id 4020A161F12 for ; Thu, 15 Apr 2021 05:17:47 +0200 (CEST) Received: by mail-pl1-f174.google.com with SMTP id w8so8931453plg.9 for ; Wed, 14 Apr 2021 20:17:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VFs1b7JZE5/+0tAQkNlMobr1MfCJdQHL8MiIc5Eecl8=; b=HYYZ7UATTTsfDumBjA2zkv2UrkCOzhOs+WvLS07VxG0xsr7+moPkkvjA11nL83YwSQ vAbBkjBfdsPrQmZdIF5oxCX5I+vfqLToJ6lQe0RzG2KK+9xZS4ubtPlBsNueWKP89yaH Vb85pvbQeiuZ0TcdNZTGvi/n3/QCkTqy8H/dYtTd4umiAfmnw/wjJR8EmTb5I+awAEo9 6OeJ0Ukje/kfU7kDhapMO8CyX4TxB9h04t1fuUraVF+MUJAHNCUM0GUnD7/PYb6TgJyu fV8ANDKc8cKBIUfIoDO9i0JopmatDL5DZQdN4yxKK+IFb3UN0ZVqLFgV/ZO/paiD7Rbz yKEw== 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:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VFs1b7JZE5/+0tAQkNlMobr1MfCJdQHL8MiIc5Eecl8=; b=jbaYe8IiIlzVNHte94FyOE2Oi13NgEGz+HUUCKIhsulPS8j2RR2jGyb01Ve3cCttEB 5S9/2b6eJycGZa1/QFB6eHtmCdv7d82rQbEY0+O1jKB9mxS5gze5ZEgYqy2RO2IOQ/dk vxR/QAMfiTH8jmF2LPtjGn4tdoZgZwbnJZedSkbvgoZtxb6Y47D+0iRX3Cv5PVBOvgvo qEnWsRPVkjRJe5lXc0e6xo+Cf8tDdl/2CyLAF123MpZcDrQaJbxYznj34f/6GNEA67Ws v6pxsN3bQLcqdZzJumwlCQPxU6RZdguL7qpMoyp9ncr6U9PCTbG79o6F6Awpzb2eHDcz 9X5g== X-Gm-Message-State: AOAM531V+0NYxs+FtasjmeSLyJWYxFx4GheuU4EHBkW+9duWm2aTB7nU CnwpbaabeqKEuEGggneVcsrFBA== X-Google-Smtp-Source: ABdhPJymY5l12wbdFtegI//edr2nh2Zs5qhPwPlQ+PA9KVsDI0fLjm1Q1Y8qyg9H1R7qWC2tPwZ1XQ== X-Received: by 2002:a17:902:5988:b029:ea:ac90:529b with SMTP id p8-20020a1709025988b02900eaac90529bmr1628908pli.78.1618456666343; Wed, 14 Apr 2021 20:17:46 -0700 (PDT) Received: from hermes.local (76-14-218-44.or.wavecable.com. [76.14.218.44]) by smtp.gmail.com with ESMTPSA id f17sm616585pfk.184.2021.04.14.20.17.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Apr 2021 20:17:46 -0700 (PDT) Date: Wed, 14 Apr 2021 20:17:42 -0700 From: Stephen Hemminger To: Suanming Mou Cc: Ferruh Yigit , Ori Kam , Andrew Rybchenko , NBU-Contact-Thomas Monjalon , "dev@dpdk.org" Message-ID: <20210414201742.72471c7c@hermes.local> In-Reply-To: References: <20210315192722.35490-1-stephen@networkplumber.org> <20210315192722.35490-2-stephen@networkplumber.org> <7106da73-95a1-30ae-f949-87ecca05b24d@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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" On Thu, 15 Apr 2021 02:55:17 +0000 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/secondary > > 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 another > > 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 capability 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_FLOW_OPS_THREAD_SAFE capability bit internally does not support multi-process, they may still suffer crash etc. (If I understand correctly, mlx PMD level now should support multi-process, 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. Maybe we need a FLOW_OPS_PROCESS_SAFE flag? and declare all existing drivers as not process safe?