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 61702A0C55; Fri, 5 Nov 2021 02:01:26 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3E12410E3; Fri, 5 Nov 2021 02:01:25 +0100 (CET) Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) by mails.dpdk.org (Postfix) with ESMTP id 8DC0140151 for ; Fri, 5 Nov 2021 02:01:24 +0100 (CET) Received: by mail-io1-f50.google.com with SMTP id n128so9012511iod.9 for ; Thu, 04 Nov 2021 18:01:24 -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=n5boNai1pt+SZUpcQ7CKhq5t4YO1RNPDJeW5Yy/OPTE=; b=AuJWZyB7ocHs6CnlHfUDTI/KKrxMz/7RFZ7Mz/vHiEtZdJegkh3RSOz8rXgis3PKY/ yxL8d82xtJQtSeErufrpdhb4eJTRY2sChAsSByFQZEX5QzAQqGdfHDEXs7Mx5xib/gR6 I3ASz8R7EulwhF0ubRqMDTU9aQCXWhI/cd+N4= 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=n5boNai1pt+SZUpcQ7CKhq5t4YO1RNPDJeW5Yy/OPTE=; b=gMIWlChGHp2Bz89CBBReBdZzvDq1qH1wh9deJDtrZUFf9TH5DetllhpieWnZRk4Rns saErVub6EGYzI+XfaDT9cPc9mO7cVjaS81r12tsE8DEHvTOkeibwRxjNR7d1radpRYty Zxl+MYi5Re5J4ljcgVtOcizGDfrj/0t27bsIWhXKACE2xy3Gs7DCIs9cgTs0invUfszS OCil/sECTL5RhGmfKyMlVyH36NNxiQjDAbKLi9LIWO9vmUQlpDpNQ1ImJFktAWpFWDOW k0D39sjmgxLPwhwOdulsIepCSA3CNq/J7z8pmeAoFVusDfCzkEJuIOEymJb/I5xr9uWG NvZQ== X-Gm-Message-State: AOAM533hSw2i4kXxgiQ4XUVSNltPZFoKxbiTGzHC1fvAfQ5qpg/7XD60 zN9V4E6HtTWF8lL0CXYarcAfedkJjfyRp3wzGQoI93nEN6g= X-Google-Smtp-Source: ABdhPJzuKuIdR7M0nvT/mlp2HC4m22WOdVfFStcCfzwRldPGS4dOuNp0DODBwfJrC0D6szfhJx0dxWnefrPWUGastVw= X-Received: by 2002:a05:6602:2dd5:: with SMTP id l21mr22583011iow.87.1636074083794; Thu, 04 Nov 2021 18:01:23 -0700 (PDT) MIME-Version: 1.0 References: <20211103160432.8052-1-somnath.kotur@broadcom.com> In-Reply-To: <20211103160432.8052-1-somnath.kotur@broadcom.com> From: Ajit Khaparde Date: Thu, 4 Nov 2021 18:01:07 -0700 Message-ID: To: Somnath Kotur Cc: dpdk-dev , Ferruh Yigit Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] net/bnxt: fix regression in non-vector mode Rx data path on Thor 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 Sender: "dev" On Wed, Nov 3, 2021 at 9:10 AM Somnath Kotur wrote: > > The patch introduced by > commit 657c2a7f1dd4 ("net/bnxt: create aggregation rings when needed") > ended up shortening the return code path from the function thereby > resulting in not executing the line of code at the end of the function > that was resetting the next consumer index to 0. > This would result in an application crash when error recovery or other > port stop/start scenarios were invoked on Thor which is what this > commit 61cd4384fabf ("net/bnxt: fix crash after port stop/start") > was addressing. > Fix it by moving the resetting line of code before the return path > in the case when aggregration rings are not used (default case). > > Fixes: 657c2a7f1dd4 ("net/bnxt: create aggregation rings when needed") > > Signed-off-by: Somnath Kotur Fixed typo in commit log. Patch applied to dpdk-next-net-brcm. > --- > drivers/net/bnxt/bnxt_rxr.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c > index 992f97388c..8bc8ddc353 100644 > --- a/drivers/net/bnxt/bnxt_rxr.c > +++ b/drivers/net/bnxt/bnxt_rxr.c > @@ -1369,6 +1369,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq) > rxr->rx_buf_ring[i] = &rxq->fake_mbuf; > } > > + /* Explicitly reset this driver internal tracker on a ring init */ > + rxr->rx_next_cons = 0; > + > if (!bnxt_need_agg_ring(rxq->bp->eth_dev)) > return 0; > > @@ -1407,9 +1410,6 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq) > } > PMD_DRV_LOG(DEBUG, "TPA alloc Done!\n"); > > - /* Explicitly reset this driver internal tracker on a ring init */ > - rxr->rx_next_cons = 0; > - > return 0; > } > > -- > 2.28.0.497.g54e85e7 >