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 9E6DFA04A2; Thu, 3 Mar 2022 18:33:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 24FAC42719; Thu, 3 Mar 2022 18:33:32 +0100 (CET) Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) by mails.dpdk.org (Postfix) with ESMTP id D3D8240687 for ; Thu, 3 Mar 2022 18:33:30 +0100 (CET) Received: by mail-io1-f42.google.com with SMTP id 195so6709244iou.0 for ; Thu, 03 Mar 2022 09:33:30 -0800 (PST) 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=NDMl5rQPAdVZvnsMA5GkIHcje24PniFvV3R6gwAj9g4=; b=EPot1+L41jKD1ROeg8nWG0ixyJZDg0xOXl/UQ/O3jBNmd5j5FaBoVVEmFp1KHf0uDO IBBgCHPazQk6phv9EUreTM9hRaob3AmDUqYPOLk5V2KHZL26pP7b90tV0aGuvXJhgMs3 8rMDW+1AtQrvu8T2aX205N8W82JPQyoQAHm6PO5BgVYWTU+ADw5MHTbiE9dgfrIVXBB5 6IIAIcfdC0nWLt/qmasKRCsMBAJigpZuAK0FofR/1o8BbncPUbjzwBzfGSiMT4liCkMz umxDkmHp0BO/xfoHtXYY1fVbO45zZY/OMR6ZykCmOyINRp44y4DJfh5bi+zrsW+cjr17 IBrA== 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=NDMl5rQPAdVZvnsMA5GkIHcje24PniFvV3R6gwAj9g4=; b=PiTvqPzoOLHc5y7U0wiu92olZRku6+1mRvqrMVxflYpUPXDMjdEgFP6Z1h9luBWHYl r/RR60SiDo1qHF4NN5kWnpT6Q5DucEmQyNlhYYTOrlKiEW49X5d5rSwLObFhRhNOm4gF sNHbKoOcbvl9oDupt4A6Zbnepfb8Vc9l9gJwmQHFdS7DUFwSpH+3NEl9NDivGeYQ5u4E Tt479JXxxhAfPd3BYNH89CTt5Nuv7y1SN03hpIXkUOtZGHjEv36dOU7/76fCXTYY6AhZ QoEChpefn9/jGmfWBRTKMBqXST1ejY7RcufK464wX0zIJFCkc24STal2rVt8NkFTzrT9 Fy4Q== X-Gm-Message-State: AOAM530wRp3G92hrP5264IEf0v/iwcFbHcA844GpRUjucvMWLnnmvCCv 856nnOAvaYGIVYPedFAzaGcwSKlHmED1sP1xmU8= X-Google-Smtp-Source: ABdhPJzCXwuFitDkV6a8HPCmeHdb+PioLj0u19N66PCP6Ta3RafdljLw3EuDhkH6iw7rlVAZtam45ihN7w/HYR7pKAQ= X-Received: by 2002:a02:c609:0:b0:314:cfc7:94fe with SMTP id i9-20020a02c609000000b00314cfc794femr28928960jan.79.1646328809965; Thu, 03 Mar 2022 09:33:29 -0800 (PST) MIME-Version: 1.0 References: <20220303070042.29075-1-ndabilpuram@marvell.com> In-Reply-To: <20220303070042.29075-1-ndabilpuram@marvell.com> From: Jerin Jacob Date: Thu, 3 Mar 2022 23:03:03 +0530 Message-ID: Subject: Re: [PATCH 1/2] common/cnxk: revert check on bitmap for tm To: Nithin Dabilpuram , Ferruh Yigit Cc: Jerin Jacob , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , dpdk-dev , Gowrishankar Muthukrishnan 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, Mar 3, 2022 at 12:30 PM Nithin Dabilpuram wrote: > > Revert change to return error on case where no slab of free > resources is found. That error check break's a case where > there is a spare schq to be reused that was just allocated > for sake of contiguous static TM nodes. > > Fixes: 14f7e5d4bf2d ("common/cnxk: add missing checks of return values") > Cc: gmuthukrishn@marvell.com > > Signed-off-by: Nithin Dabilpuram Acked-by: Jerin Jacob Updated the git commit as follows and applied to dpdk-next-net-mrvl/for-next-net. Thanks common/cnxk: fix bitmap usage for TM Revert change [1] to return error on case where no slab of free resources is found. That error check break's a case where there is a spare schedule queue to be reused that was just allocated for sake of contiguous static TM nodes. [1] Fixes: 14f7e5d4bf2d ("common/cnxk: add missing checks of return values") Signed-off-by: Nithin Dabilpuram Acked-by: Jerin Jacob > --- > drivers/common/cnxk/roc_nix_tm.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/common/cnxk/roc_nix_tm.c b/drivers/common/cnxk/roc_nix_tm.c > index 7a17780..5b70c7b 100644 > --- a/drivers/common/cnxk/roc_nix_tm.c > +++ b/drivers/common/cnxk/roc_nix_tm.c > @@ -1042,10 +1042,8 @@ nix_tm_assign_hw_id(struct nix *nix, struct nix_tm_node *parent, > return -EFAULT; > } > > - if (!slab) { > - if (!plt_bitmap_scan(bmp, &pos, &slab)) > - return -ENOENT; > - } > + if (!slab) > + plt_bitmap_scan(bmp, &pos, &slab); > > if (child->priority == parent->rr_prio && spare_schq != -1) { > /* Use spare schq first if present */ > -- > 2.8.4 >