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 D4660A0540; Mon, 4 Jul 2022 18:08:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 33147427F0; Mon, 4 Jul 2022 18:08:35 +0200 (CEST) Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by mails.dpdk.org (Postfix) with ESMTP id A61E640E09; Mon, 4 Jul 2022 18:08:33 +0200 (CEST) Received: by mail-qt1-f180.google.com with SMTP id c13so10392464qtq.10; Mon, 04 Jul 2022 09:08:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Cb7Afv4jfcJFOgWQ81ap+XKhSjIJpfq9M4m1IVfcy3I=; b=pQucHqU5Nbqha2NdC5L3wQkUHTh+Kx1G/thXibRQGtMIwCnpOPEFHOfBEbRRlzvvi+ 65b1Um4jaKCqX0Lzc6fqTgvkjz7yYWODAAM30xn7ZuFCNCybpNmaJ9wsOZH0hEk1Ug8N iC/Hr0VAdc36eXmyvnAcPmD1Mfbda9MF3qRQrewehFTSMO53KhNsXPdKUMxoF6i6CXAx znYEy92F9n6+k68bKGG6ucDSNuvZqRGDAd+vpvey3WT6rCaLIcOzieYc7Oi8r0DecrCO kcbM13VQe/6LQFC0R3QC48FasVgcsitT6wMIxOTLqu1eOnv6AQpbdoqKhKBEKmew0YMj JQlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Cb7Afv4jfcJFOgWQ81ap+XKhSjIJpfq9M4m1IVfcy3I=; b=abJhV2r1l/bnKo2cxRrdgFQV60STMI9oZleCllTtL0i0cfTWfOa0A5PJnwvc6e+e5G LePCWAtZQLZVuYIOD0aoF+Tt//b88zBhWxccIWdPMK5DoK0uzvg2q2tKTjdeCwtMS/Hc IqLoK3HullT9Ihhdw4v5HaqN8Bmqc6YiQy2+Yhc6HztgDZ6jOMRUV42X6eGqhipRYzGB 1gomxvzYwC/HmZ+i9789EGXk191e8OYqcl6fGW0yNeJkhTTaP1d7AHhFjeYb8Si55iko hWebN1vwGo5Ivu4+4mHfaxNA8ae89BFgYfaUJ/M30UyhViQEdllt+Layhf9c1g3Q2/+u 0E2g== X-Gm-Message-State: AJIora8lCY4KgB+iDHATtgghhG1soHddlCkMoKTCXCsGBUCHBocgXPja cv50Omix6agX8YiYp+urUu+1VqtVvml25XfY2xE= X-Google-Smtp-Source: AGRyM1s0wLfB/Wg4EIjqe4zKIzBnqmnA0KqyBRlFt3LQInUbRpBM94jtVX6YpkN9D1fh5Rx7ydH0rA/Susm9rVwV9Qg= X-Received: by 2002:a0c:ef0d:0:b0:470:4656:faf2 with SMTP id t13-20020a0cef0d000000b004704656faf2mr27329094qvr.16.1656950912971; Mon, 04 Jul 2022 09:08:32 -0700 (PDT) MIME-Version: 1.0 References: <20220623100511.2388739-1-s.v.naga.harish.k@intel.com> In-Reply-To: From: Jerin Jacob Date: Mon, 4 Jul 2022 21:38:07 +0530 Message-ID: Subject: Re: [PATCH] eventdev/eth_tx: fix queue delete To: "Jayatheerthan, Jay" Cc: "Naga Harish K, S V" , "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 Thu, Jun 23, 2022 at 8:29 PM Jayatheerthan, Jay wrote: > > Looks good to me. > > Acked-by: Jay Jayatheerthan Applied to dpdk-next-net-eventdev/for-main. Thanks > > -Jay > > > > > -----Original Message----- > > From: Naga Harish K, S V > > Sent: Thursday, June 23, 2022 3:35 PM > > To: Jayatheerthan, Jay ; jerinj@marvell.com > > Cc: dev@dpdk.org; stable@dpdk.org > > Subject: [PATCH] eventdev/eth_tx: fix queue delete > > > > Add spinlock protection in queue delete function. > > This protects the data path while the queue delete operation > > is in progress. > > > > 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 | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c > > index c700fb7b1f..b4b37f1cae 100644 > > --- a/lib/eventdev/rte_event_eth_tx_adapter.c > > +++ b/lib/eventdev/rte_event_eth_tx_adapter.c > > @@ -891,9 +891,10 @@ txa_service_queue_del(uint8_t id, > > > > txa = txa_service_id_to_data(id); > > > > + rte_spinlock_lock(&txa->tx_lock); > > tqi = txa_service_queue(txa, port_id, tx_queue_id); > > if (tqi == NULL || !tqi->added) > > - return 0; > > + goto ret_unlock; > > > > tb = tqi->tx_buf; > > tqi->added = 0; > > @@ -903,6 +904,9 @@ txa_service_queue_del(uint8_t id, > > txa->txa_ethdev[port_id].nb_queues--; > > > > txa_service_queue_array_free(txa, port_id); > > + > > +ret_unlock: > > + rte_spinlock_unlock(&txa->tx_lock); > > return 0; > > } > > > > -- > > 2.25.1 >