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 DAB4BA0C45 for ; Wed, 17 Nov 2021 05:05:28 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C6A8D41150; Wed, 17 Nov 2021 05:05:28 +0100 (CET) Received: from mail-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.176]) by mails.dpdk.org (Postfix) with ESMTP id 1DB4C41144 for ; Wed, 17 Nov 2021 05:05:26 +0100 (CET) Received: by mail-il1-f176.google.com with SMTP id l19so1423674ilk.0 for ; Tue, 16 Nov 2021 20:05:26 -0800 (PST) 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=TH+Qkra5i51ggQsGeUglTiLb8vAzW8KBVLGVtLZcFSM=; b=KF/75tvvesglhllNn1NwG+h8Kkm3EpluGbsTskAe2IM16Ss2iGDPF+aS3UPbfmzcFG 3x+0gllf9gC2Kimut3CyjNC5Sp11kK1qunJtWLXLHsh1Itb5k3zNWxpCosVQgkqaVlX9 ciyK5n9V+MyLCYKMi5MDlI8YxGS2DETJGHB14= 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=TH+Qkra5i51ggQsGeUglTiLb8vAzW8KBVLGVtLZcFSM=; b=oAOpql2F0U0J9EsdHYrbSplZzp65hvK3FL+aj985CYv6+jKTa0fBLz5O+wH17xBxI5 3zxlf7eNiP8HF8MuZiV1TaGalO16Puc5/gJzqmLIAqc++bpg60Kz5gbNm25aYbukP960 z/Kzpz2Ma4vlMqfrisRC+k1bs5hXOQavnNmdBxrVqlUWo2hTpqGhjDd608YWoRr0+mBy na9w/Q0bs3Y9bod/HJJiRCP1qVUgIjxOndEi+ffrNOOwsaF7QJON/ty35NohBPrbsBak IIWAR0kH8oEbE0NtCjCfbeIFY35jiEy2nqF4Ct+9x+auJpwvDNXDZX9Gln0HKXZV1oTj b0jg== X-Gm-Message-State: AOAM531pmuGNjqMUCC+M0z1LGA8fsYQSLshNE7q6FuwrLIpmJo33PvOa GgELFT7d/I1qQJNOaoBupqgxJnymZy+OGpsKR8GryYJF1ik= X-Google-Smtp-Source: ABdhPJwiEeOWcW0kSS0Fs7YP8t8wOJh6x8JtBV/J2jkUwL0snZY48yWQ/mjmEq0I+6xEEtM5r+WYetteXJlrpGUxF64= X-Received: by 2002:a92:d5c1:: with SMTP id d1mr8373792ilq.311.1637121925407; Tue, 16 Nov 2021 20:05:25 -0800 (PST) MIME-Version: 1.0 References: <20211117031206.11727-1-somnath.kotur@broadcom.com> In-Reply-To: <20211117031206.11727-1-somnath.kotur@broadcom.com> From: Ajit Khaparde Date: Tue, 16 Nov 2021 20:05:09 -0800 Message-ID: Subject: Re: [PATCH] net/bnxt: fix to set Rx next cons in mbuf alloc fail case To: Somnath Kotur Cc: dpdk-dev , Ferruh Yigit , dpdk stable , Kalesh Anakkur Purayil 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 Tue, Nov 16, 2021 at 7:18 PM Somnath Kotur wrote: > > The driver internal variable to track the next consumer index on > the Rx ring was not being set if there was an mbuf allocation > failure. In that scenario, eventually it would fall out of sync > with the actual consumer index and raise a false alarm on Thor > needlessly causing a segmentation fault with testpmd > > Fixes: 03c8f2fe111c ("net/bnxt: detect bad opaque in Rx completion") > Cc: stable@dpdk.org > > Signed-off-by: Somnath Kotur > Signed-off-by: Ajit Khaparde > Reviewed-by: Ajit Khaparde > Reviewed-by: Kalesh Anakkur Purayil Patch applied to dpdk-next-net-brcm. Thanks > --- > drivers/net/bnxt/bnxt_rxr.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c > index 8bc8ddc353..e461500ceb 100644 > --- a/drivers/net/bnxt/bnxt_rxr.c > +++ b/drivers/net/bnxt/bnxt_rxr.c > @@ -1008,6 +1008,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt, > goto rx; > } > rxr->rx_raw_prod = raw_prod; > +rx: > rxr->rx_next_cons = RING_IDX(rxr->rx_ring_struct, RING_NEXT(cons)); > > if (BNXT_TRUFLOW_EN(bp) && (BNXT_VF_IS_TRUSTED(bp) || BNXT_PF(bp)) && > @@ -1026,7 +1027,6 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt, > * All MBUFs are allocated with the same size under DPDK, > * no optimization for rx_copy_thresh > */ > -rx: > *rx_pkt = mbuf; > > next_rx: > -- > 2.28.0.497.g54e85e7 >