From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A99BEA04BC; Wed, 7 Oct 2020 01:18:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 612BD25B3; Wed, 7 Oct 2020 01:18:46 +0200 (CEST) Received: from mail-ot1-f65.google.com (mail-ot1-f65.google.com [209.85.210.65]) by dpdk.org (Postfix) with ESMTP id 4970C11A4 for ; Wed, 7 Oct 2020 01:18:45 +0200 (CEST) Received: by mail-ot1-f65.google.com with SMTP id m13so488648otl.9 for ; Tue, 06 Oct 2020 16:18:45 -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=Y8wy5TPZF5fnu/zHgMRgyeIaRWDcY+cJ3JIo/qna3ys=; b=VcYxGuO1Qid4wyOVj6w7znT8+DdQMptzQVZ84kc1kRlogfcTeMufzytpHV4GJIxFcI iSGF8Pw2f12NaCTkbFIk1bs3Lr9mTHDdiJi7Dq885YZ2pg1ZhV9Dnj7oWm1fw5ZRA1NO xqIHPRWPjoIO1T291zo4HKBQrughl/Hjc3oow= 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=Y8wy5TPZF5fnu/zHgMRgyeIaRWDcY+cJ3JIo/qna3ys=; b=FLLok8bXy/P1gY9oyJMwdwmvNmiBolFclwomCt+pF1k/BO5EmAfsKeFGTuYdZeOV5T /DmkA32MZb2nvbFIcAY2AOMvNTJNLC6QMvSvIesHG2ZB1PtMkMEjXsN8/tLf3dKwh+65 Q/1hmba8QvXb7uL1wz+o/apE2cguwO7kGIyQObjuJ0d7+KLXa9GQXYEcxRBsr9etjaeQ DPiWyFh/tLKXhnPnNfv+68oknNtlBno7xCWQyABQQzVT7eAafqAg9gaPQpxzo5kMZzhW v6h7qoGogQqRkeSco6PRQyRYZnRup0x6CiRYvgJZXRbXaFX2FSh57OQxRqrsT+c300uj RFWg== X-Gm-Message-State: AOAM531T+AUoyhO9SUVMhF767y0Zl+URi1kVbz8M8LD/37j9wmtIlqhk V2UwCvSokZcBdWUg5pn2ShHHOQ/rdQMG7LBLsupVVg== X-Google-Smtp-Source: ABdhPJzuVwX8BnIAJC6MUEWKgvKqlmO4CItK9RIWGQd/z47YQUmXpS8pE9jHY6eZBkAwI7PKZbG5u5mhw91AhbdiDnk= X-Received: by 2002:a9d:5509:: with SMTP id l9mr207231oth.154.1602026323336; Tue, 06 Oct 2020 16:18:43 -0700 (PDT) MIME-Version: 1.0 References: <1601194817-208834-1-git-send-email-suanmingm@nvidia.com> <1601855286-81511-1-git-send-email-suanmingm@nvidia.com> <1601855286-81511-3-git-send-email-suanmingm@nvidia.com> In-Reply-To: From: Ajit Khaparde Date: Tue, 6 Oct 2020 16:18:27 -0700 Message-ID: To: Ori Kam Cc: Suanming Mou , Ori Kam , John McNamara , Marko Kovacevic , NBU-Contact-Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , "dev@dpdk.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2 2/2] ethdev: make rte_flow API thread safe X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" > > +static inline void > > +flow_lock(struct rte_eth_dev *dev) > > Maybe change the name to flow_safe_enter > Since this function doesn't always lock. I feel fts_enter() sounds better. > > > +{ > > + if (!(dev->data->dev_flags & > > RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE)) > > + pthread_mutex_lock(&dev->data->fts_mutex); > > +} > > + > > +static inline void > > +flow_unlock(struct rte_eth_dev *dev) > > Maybe change the name flow_safe_leave > Same reason as above. On the same lines.. fts_exit()