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 A3A1FA0032 for ; Fri, 21 Oct 2022 11:32:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9823A42BDE; Fri, 21 Oct 2022 11:32:36 +0200 (CEST) Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) by mails.dpdk.org (Postfix) with ESMTP id 82CA342836; Fri, 21 Oct 2022 11:32:34 +0200 (CEST) Received: by mail-qt1-f182.google.com with SMTP id hh9so1246089qtb.13; Fri, 21 Oct 2022 02:32:34 -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:message-id:reply-to; bh=q0Sjb3buVi9m5OHinFUu4gcutRy6IMMT3ukSM+5wXZc=; b=BVy8nkqh50XB+3wR0olzF/iqp7G1VxJldYngNwRZssICTwsZrac1bb9gAmfteYLbtH UnShwLNjmmPAzzPLKeUZK4ILYILqycDGgk58Ya2dEnMAY0b+exMTJjCwYnk5yFrZBm75 naJeN1gt73+mbHKAvXofrJvpK4QlsDZgvooKCY7SOdWBth2YG0RZtbhexm1/p0HCqJ3C CKJI1lqJHIwH/mqxW+4+/JwzjWmpt6ksD/l3Z7z9sgs14Z6Fc8EXK8mxN26/og5Is0kI gGNgQpw2np4avQ2mUxyZUhaqS2m3PfLa7nDh1p2P0NCgEnksxNNe3GyXeZdHZUiiUWc0 O9jA== 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:message-id :reply-to; bh=q0Sjb3buVi9m5OHinFUu4gcutRy6IMMT3ukSM+5wXZc=; b=NEbJexG1gFRGPx0WA0tYDYdt4bJ1Xu97g3GXyKXhfiO26NWpj1sJj2xYO+fT+6hXOj 2aSKPW0cdvgNBMDu9F9r2fsKJ7Xo/+eIXL1Exa/87p/sMICeZGK0mmauBkCZmH9FCgQI gL5I+usSkYRYK+/2yMSaZRGUJMdnqhuVuvnT2FbROCoLzAeFBKTEWgj/0Q8K4MD/04+m btDdwya+bySU/ExZ1Wbq9Qm/8CJgtVGoWcKbQrKeGUds7YPADA9ZOQQVw9pNw7hZ8QDL fYDxrh58TWCtis05zkljuSFp5ryVFF+cvZE3p0JehTuli8xx5JEk/HAjwxPFnRL6c9Zh BcIA== X-Gm-Message-State: ACrzQf0Ci2ZWfbImhv40KJsS9j5co3HGfhlBBGjBBI/YIwnQ6zOcQ219 lha1IKs+29L+Sh3JDH/ja39PUIKJ71UP5tYItho= X-Google-Smtp-Source: AMsMyM4nTM3UIWbmreNc+dvTjkGnl+dhMjuXavGFyNPjEzLWvwc8kF8K+vyRdVhav0Yc33zgMKGBmBDyWm1FWVhwITU= X-Received: by 2002:a05:622a:14ce:b0:39e:55d0:3adb with SMTP id u14-20020a05622a14ce00b0039e55d03adbmr1078412qtx.173.1666344753864; Fri, 21 Oct 2022 02:32:33 -0700 (PDT) MIME-Version: 1.0 References: <20221020162849.1645281-1-s.v.naga.harish.k@intel.com> <20221021064314.1937897-1-s.v.naga.harish.k@intel.com> In-Reply-To: <20221021064314.1937897-1-s.v.naga.harish.k@intel.com> From: Jerin Jacob Date: Fri, 21 Oct 2022 15:02:07 +0530 Message-ID: Subject: Re: [PATCH v2] eventdev/eth_tx: fix queue delete logic To: Naga Harish K S V Cc: jay.jayatheerthan@intel.com, jerinj@marvell.com, dev@dpdk.org, stable@dpdk.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Fri, Oct 21, 2022 at 12:16 PM Naga Harish K S V wrote: > > To delete all the queues of a ethernet device associated with > adapter instance the queue_id can be passed as -1 to the queue > delete API. > > When a subset of queues of a ethernet device are associated, > the queue delete logic is exiting without deleting the queues > in some cases (higher numbered associated queues) for above > scenario as the queue delete logic is not checking all the > queue association status. > > This patch fixes this issue by checking the queue association > status of all the queues of the ethernet device. > > Fixes: 741b499e642 ("eventdev/eth_tx: fix queue delete logic") > Cc: stable@dpdk.org > > Signed-off-by: Naga Harish K S V > --- > v2: > * fix segfault during unit test and modify logic Fixed following issue: ### eventdev/eth_tx: fix queue delete logic WARNING:BAD_FIXES_TAG: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("")' - ie: 'Fixes: 741b499e6421 ("eventdev/eth_tx: fix queue delete logic")' #19: Updated the git commit as follows and applied to dpdk-next-net-eventdev/for-main. Thanks eventdev/eth_tx: fix queue delete logic To delete all the queues of a ethdev device associated with adapter instance the queue_id can be passed as -1 to the queue delete API. When a subset of queues of a ethdev device are associated, the queue delete logic is exiting without deleting the queues in some cases (higher numbered associated queues) for above scenario as the queue delete logic is not checking all the queue association status. This patch fixes this issue by checking the queue association status of all the queues of the ethernet device. Fixes: 741b499e6421 ("eventdev/eth_tx: fix queue delete logic") Cc: stable@dpdk.org Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com> > --- > --- > lib/eventdev/rte_event_eth_tx_adapter.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c > index c2a848103b..88309d2aaa 100644 > --- a/lib/eventdev/rte_event_eth_tx_adapter.c > +++ b/lib/eventdev/rte_event_eth_tx_adapter.c > @@ -934,6 +934,8 @@ txa_service_queue_del(uint8_t id, > uint16_t i, q, nb_queues; > int ret = 0; > > + if (txa->txa_ethdev == NULL) > + return 0; > nb_queues = txa->txa_ethdev[port_id].nb_queues; > if (nb_queues == 0) > return 0; > @@ -946,10 +948,10 @@ txa_service_queue_del(uint8_t id, > > if (tqi[q].added) { > ret = txa_service_queue_del(id, dev, q); > + i++; > if (ret != 0) > break; > } > - i++; > q++; > } > return ret; > -- > 2.25.1 >