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 DF30AA0C4C for ; Wed, 1 Dec 2021 11:32:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D90DE40140; Wed, 1 Dec 2021 11:32:03 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 37D8A411FE for ; Wed, 1 Dec 2021 11:32:02 +0100 (CET) Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id C5A893F1B0 for ; Wed, 1 Dec 2021 10:32:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638354721; bh=UfCQr9PV3G8/F8EnHM5/4rLZfMOSftws0ikg7dmWd+U=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=l3Au2QRewl8PaLhUHBEHobN5TjJxquplFA7autk7F4zCriAgqhIfJ/fsdtpAKjShJ THA+434s3m/N7uH8Zh3qKWCG23NxTLOaZSuGPSSzSwFxMo7GZeg5W6Nu3eQ/S0hDLt mReHIiUbb40no1UdsDbiP3wTZK9UwCVoUwpaHHVKwXplqnrJlyIF2fFd6pbY5WtMeC 3JVp0q44Hm5E5/d2baWVKvSC6+jzv0s9kC/YJQnI2b98bavDszyibMrxfaOkQNGBuT NnTORz+hpLkWljyP+pUG5i0MHFx7GjV4XqB2Rv8BN+iip6L2QjbJxm0qm1aBupuu2Z yHw0Lqs8nEApg== Received: by mail-qt1-f198.google.com with SMTP id d18-20020a05622a15d200b002acc9aa3e0cso31030066qty.17 for ; Wed, 01 Dec 2021 02:32:01 -0800 (PST) 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=UfCQr9PV3G8/F8EnHM5/4rLZfMOSftws0ikg7dmWd+U=; b=Yblcscu8NXiYSpPGmQxtRtBNXrEuYmXqHWGCD3hF1NS/biztOdMMmeDRgCeDb7+Kjq cC8Yfhhid0JKi2zN6V1VskGGlarQO+1qUM9Y5ZHXb8q2ITj/4QaLKj1Uf7lBxK8Fhv81 FVWd3nJ6PzejQqAVglFdvF9GeIfWgUd3JFIR5t49ZOuOqpdG6t5i+nEvcljUeMOeMneQ UB/WhL3qM+KUBBHpxcouPZA7c5H0OB+QV8wori48MYG+9gZOuK2FEVCsblUAXHE5S5OK sa0QJnmki7rPHLWM8+4m3q6bh+JuvfWYGEMoxyzPEsUpwHwidNJfpcLTKTkU6CUXvrCY mdAg== X-Gm-Message-State: AOAM531sBW8E5gPerjdBZUnQWuAFXIjgrBHaoScqzc63eg6JaEJrtYy+ WXMrGbjUsmw19V094o3YLs3sY5cWoHLWLwxpvgWk4iRC0MM779XiNpT5Q3Q4g+HVzCeo65+dcgw kP4+Zsj12ClQ78eBBpagRdXghxo3/0HT2qJqfd7ka X-Received: by 2002:ac8:5542:: with SMTP id o2mr5473818qtr.670.1638354721017; Wed, 01 Dec 2021 02:32:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxtfhmFObsp30/IAcfyRJhABOZfK3oBfI2siDtNxlE9q/ToIqQNn2SSljZTBW0KQeMMFP3aZIL8Dt575OV0y6U= X-Received: by 2002:ac8:5542:: with SMTP id o2mr5473797qtr.670.1638354720852; Wed, 01 Dec 2021 02:32:00 -0800 (PST) MIME-Version: 1.0 References: <20211201055516.24523-1-somnath.kotur@broadcom.com> In-Reply-To: <20211201055516.24523-1-somnath.kotur@broadcom.com> From: Christian Ehrhardt Date: Wed, 1 Dec 2021 11:31:35 +0100 Message-ID: Subject: Re: [PATCH 19.11] net/bnxt: fix Rx next consumer index in mbuf alloc fail To: Somnath Kotur Cc: stable@dpdk.org, Ajit Khaparde , Kalesh AP 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 Wed, Dec 1, 2021 at 7:02 AM Somnath Kotur wrote: > > [ upstream commit a7e21843f0f6067ebe36eafff9b8319092db3fc4 ] > Thanks, applied > 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: Kalesh AP > --- > 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 f830bb6702..1e0640829f 100644 > --- a/drivers/net/bnxt/bnxt_rxr.c > +++ b/drivers/net/bnxt/bnxt_rxr.c > @@ -684,12 +684,12 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt, > goto rx; > } > rxr->rx_prod = prod; > +rx: > rxr->rx_next_cons = RING_NEXT(rxr->rx_ring_struct, cons); > /* > * 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 > -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd