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 0B0B2A0C4C for ; Fri, 16 Jul 2021 13:08:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED29F41371; Fri, 16 Jul 2021 13:08:44 +0200 (CEST) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mails.dpdk.org (Postfix) with ESMTP id 83ED54134C for ; Fri, 16 Jul 2021 13:08:43 +0200 (CEST) Received: by mail-wm1-f52.google.com with SMTP id n4so5596575wms.1 for ; Fri, 16 Jul 2021 04:08:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=V+nHmVcCc8MSwfh4rq+k6OJzdL4T11Sai+QEIZaWhSY=; b=cqNpRdK+uSlhMZbRjzwE9d+CV1v1TYtrdEy8WjCHoMxRTzgPXMMQ9nXhYCtE6nPxgM CEa1BIfoGPbIMaKaX1hm+deiqrUHOjmSTUlpb30EuYHqHcvUoBxSuRP1LOtIE13SYiEK z1KgFmIKoqY7k2LaiXfPDkJpujRQO4ooVDxDrdugKvexfMVw2VRBFCvXOzKKjfR7MO7N 62d2msmBDCBeU/VojzrMG050XP7IyOMaWQ4KwgX/jQWv1MF0x8HRRju5DVfLOS1JRR5t ZhikDlNxqfoZBNsfT32ZzRelX1z8gCWlRrMLSPESYtijYVTReiNza/dw0PAUXM+u0RJT C7/A== X-Gm-Message-State: AOAM530PnXoOfqodXLb3ZK9/lxYxrYGT1TAGyV0qni5hSfdIqb0/rmo+ /Et+c/pJDxHNF6bexYw69Q4= X-Google-Smtp-Source: ABdhPJykzExvRBxfWLPQE69mFiLQ3sZ/xt7ZVobae/TKmTGWXdN8JgDTRYV85Ugb4WQjkC5y84q05g== X-Received: by 2002:a7b:c042:: with SMTP id u2mr9808293wmc.86.1626433723334; Fri, 16 Jul 2021 04:08:43 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id o11sm10709061wmc.2.2021.07.16.04.08.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jul 2021 04:08:42 -0700 (PDT) Message-ID: <31ef0f72260a7da4dcb6acc0cebeb057523e9c58.camel@debian.org> From: Luca Boccassi To: Somnath Kotur , stable@dpdk.org Cc: Ajit Khaparde Date: Fri, 16 Jul 2021 12:08:41 +0100 In-Reply-To: <20210716062911.15394-1-somnath.kotur@broadcom.com> References: <20210716062911.15394-1-somnath.kotur@broadcom.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.30.5-1.2 MIME-Version: 1.0 Subject: Re: [dpdk-stable] [PATCH 20.11] net/bnxt: detect bad opaque in Rx completion 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 Sender: "stable" On Fri, 2021-07-16 at 11:59 +0530, Somnath Kotur wrote: > [ upstream commit 03c8f2fe111c2b4c4fddc960dc82253ac7e6c5c5 ] >=20 > There is a rare hardware bug that can cause a bad opaque value in the RX > or TPA start completion. When this happens, the hardware may have used th= e > same buffer twice for 2 Rx packets. In addition, the driver might also > crash later using the bad opaque as an index into the ring. >=20 > The Rx opaque value is predictable and is always monotonically increasing= . > The workaround is to keep track of the expected next opaque value and > compare it with the one returned by hardware during RX and TPA start > completions. If they miscompare, log it, discard the completion, > schedule a ring reset and move on to the next one. >=20 > Fixes: 0958d8b6435d ("net/bnxt: support LRO") >=20 > Signed-off-by: Somnath Kotur > Reviewed-by: Ajit Khaparde > --- > drivers/net/bnxt/bnxt_hwrm.c | 19 +++++++ > drivers/net/bnxt/bnxt_hwrm.h | 1 + > drivers/net/bnxt/bnxt_rxq.h | 1 + > drivers/net/bnxt/bnxt_rxr.c | 99 +++++++++++++++++++++++++++++++++++- > drivers/net/bnxt/bnxt_rxr.h | 1 + > 5 files changed, 119 insertions(+), 2 deletions(-) Thanks, applied and pushed. --=20 Kind regards, Luca Boccassi