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 658A9A0032; Tue, 13 Sep 2022 18:05:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 055A64021D; Tue, 13 Sep 2022 18:05:09 +0200 (CEST) Received: from mail-qv1-f44.google.com (mail-qv1-f44.google.com [209.85.219.44]) by mails.dpdk.org (Postfix) with ESMTP id 9DA6F40151; Tue, 13 Sep 2022 18:05:07 +0200 (CEST) Received: by mail-qv1-f44.google.com with SMTP id i15so9533114qvp.5; Tue, 13 Sep 2022 09:05:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=Mbv4RqmgmZMwEVHTqGz9DFm7E4h0dnELJ0hOIIQ77FM=; b=U5TRub9RGaJyXWA8Kzooe4BtLcjd6m1yeMYdoz+PE6EcXaDEffKq/+TPfz5D0lzISK JSWdK8/wtElHKpyJTYniMbha048o0IPTPdS5raK6abEcD+uqrnsy0IShnjXzfy+2kd18 RUp8OrkgiCx4S8DeDJVihMQBJY0Kpa8H6urQ1UcO/ZM50cSixdHds8OwaDtxpx0lgJxb 2K37TslGIHxb3xnUE7o+RHwr6nt2izaLQ1spN5DE/7jiP6e9ka4eyRqWPoQw5SU8vcSj 1zJ4KVUw2JJ2fC64vjVRP6hO71HJSRJq3fXkVYqMh56a6tKYtKdwq1HKq4seShRAxdwS rtpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=Mbv4RqmgmZMwEVHTqGz9DFm7E4h0dnELJ0hOIIQ77FM=; b=lCnzOZDYs/Qqtwe5cb4kky5N5QRD+xojqqi+yO//3SPxWr/FnoBj6HZ4w5Q5IzFcTY HFb3Fllp7V7RkDeheHeTK7VXBnx8CvZGYX2/Kp6Q2RQf9XkaBjUy3R3she4hhuAMcQJL lp3ZxyPA44HlD2KC85O5vX3LBrpdzfFvvECWx9h5RDmzkDcj/KdrvCh4wtWeJ8j48Kay /RZUjqYavG61XI6RIeqh7LSf/pl0ibAU5wcit/ohEVDf71EruPecxJboCjEYXfwIueeB SEDaRvGXgJ1Q8x1Ah4NUYlCCaa2opFRk6X3Nyfk/Cj5uqfYvG83WCarCXbHnqc0x9raC qc2g== X-Gm-Message-State: ACgBeo0rstyxsJuGMumCQh+Vegfe9478zXNdZoVtiBngIO+clJMfzh1J oUbyFKENt9dTr2k9uxWZ9DyaKn+Ki212tdALBO6W1Pti7PrqVw== X-Google-Smtp-Source: AA6agR4xar8TRtGgWt4e/wetGB4I3eI0boDZ5fq84EZ/h0NoHcvVf9np9yRPC/TZTTgN1TrJeil765rrXp5CGvejzrQ= X-Received: by 2002:a05:6214:4005:b0:474:3c94:cdc2 with SMTP id kd5-20020a056214400500b004743c94cdc2mr27151165qvb.17.1663085106950; Tue, 13 Sep 2022 09:05:06 -0700 (PDT) MIME-Version: 1.0 References: <20220726042211.1018326-1-s.v.naga.harish.k@intel.com> In-Reply-To: From: Jerin Jacob Date: Tue, 13 Sep 2022 21:34:40 +0530 Message-ID: Subject: Re: [PATCH 1/2] eventdev/eth_tx: add spinlock for adapter start/stop To: "Naga Harish K, S V" Cc: "Jayatheerthan, Jay" , "jerinj@marvell.com" , "dev@dpdk.org" , "stable@dpdk.org" Content-Type: text/plain; charset="UTF-8" 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 On Fri, Sep 9, 2022 at 11:09 AM Naga Harish K, S V wrote: > > Hi Jerin, > This patch set is acked by maintainers. > Please review and do the needful. Series applied to dpdk-next-net-eventdev/for-main. Thanks > > -Harish > > > -----Original Message----- > > From: Jayatheerthan, Jay > > Sent: Monday, August 1, 2022 12:23 PM > > To: Naga Harish K, S V ; jerinj@marvell.com > > Cc: dev@dpdk.org; stable@dpdk.org > > Subject: RE: [PATCH 1/2] eventdev/eth_tx: add spinlock for adapter > > start/stop > > > > > -----Original Message----- > > > From: Naga Harish K, S V > > > Sent: Tuesday, July 26, 2022 9:52 AM > > > To: Jayatheerthan, Jay ; > > > jerinj@marvell.com > > > Cc: dev@dpdk.org; stable@dpdk.org > > > Subject: [PATCH 1/2] eventdev/eth_tx: add spinlock for adapter > > > start/stop > > > > > > add spinlock protection for tx adapter stop and start APIs add null > > > check for tx adapter service pointer in adapter start/stop apis. > > > > > > Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation") > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Naga Harish K S V > > > --- > > > lib/eventdev/rte_event_eth_tx_adapter.c | 7 +++++-- > > > 1 file changed, 5 insertions(+), 2 deletions(-) > > > > > > diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c > > > b/lib/eventdev/rte_event_eth_tx_adapter.c > > > index a237e8edba..3251dad61f 100644 > > > --- a/lib/eventdev/rte_event_eth_tx_adapter.c > > > +++ b/lib/eventdev/rte_event_eth_tx_adapter.c > > > @@ -44,7 +44,7 @@ > > > #define RTE_EVENT_ETH_TX_ADAPTER_ID_VALID_OR_ERR_RET(id, retval) > > \ > > > do { \ > > > if (!txa_valid_id(id)) { \ > > > - RTE_EDEV_LOG_ERR("Invalid eth Rx adapter id = %d", id); \ > > > + RTE_EDEV_LOG_ERR("Invalid eth Tx adapter id = %d", id); \ > > > return retval; \ > > > } \ > > > } while (0) > > > @@ -468,10 +468,13 @@ txa_service_ctrl(uint8_t id, int start) > > > struct txa_service_data *txa; > > > > > > txa = txa_service_id_to_data(id); > > > - if (txa->service_id == TXA_INVALID_SERVICE_ID) > > > + if (txa == NULL || txa->service_id == TXA_INVALID_SERVICE_ID) > > > return 0; > > > > > > + rte_spinlock_lock(&txa->tx_lock); > > > ret = rte_service_runstate_set(txa->service_id, start); > > > + rte_spinlock_unlock(&txa->tx_lock); > > > + > > > if (ret == 0 && !start) { > > > while (rte_service_may_be_active(txa->service_id)) > > > rte_pause(); > > > -- > > > 2.23.0 > > > > There are three different changes in this patch. But since they are quite > > small, it should be ok. > > > > Acked-by: Jay Jayatheerthan >