Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3285369ybb; Tue, 31 Mar 2020 02:06:10 -0700 (PDT) X-Google-Smtp-Source: ADFU+vulIFcKt9430OqGUeDtTvxCA78JezBoValPT1Ii+UWxlmDriUR1tvJ2oaj6bQH81RcPjtTP X-Received: by 2002:aca:d78a:: with SMTP id o132mr1410738oig.60.1585645570355; Tue, 31 Mar 2020 02:06:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585645570; cv=none; d=google.com; s=arc-20160816; b=oJhaP0vx4Gex1RsYyGwUXr4mN1gdZt/X5eB5E14qecSR1dtMLsF3oly3pkWh5axFbr sdKwPCtmTIRyM7Fu+AI+AWFQXj/TWQj1f4rk8+edl4AkrIy/YftZOooD2xf9zw0abwQx 6lZJUMfx1iBFuzwRnVdr0hnHBof0lSd4uq9HgOJcXCo53IX4mSHHcl5a6LWgBva+CCrl ZhrNuXTmm3RJZTZ8Jm/Bnv+w3jAu+ZQ5kpA5BsakbW3Jpk6EN0ke31HfDK5aqHK/iGl2 TVM9JgXSGcVLRKfAZFNIGBS8hvRr5VBEc5wVbKIauC7GSOnpG/yfRNtL63EAq7PVt/wZ Jatw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=50SR2niWQ7ScZCFlCaeofaGcaja1zhtqiVpWgoRM+dM=; b=ZoNllO88OvwVSF1F00M95f39hADZa1BP+nDegIIrGKEE07/cknZAXzz/jdYG/3/Ori 7LVBQRVZ4/05UMeNiW0yk3TF2zV1CNoQt/VeZ+v7cjV9SNH7WXuP1NSaE3nmE1SwinSh iTyTNlBZR5jZO59JTMBjCB7LZFqd2d0Ca4C54zqSid0XuP+DAjxuxvHKFBWjc64gokYU +XocR+4PDGjLhmJW4PN5icbflPpynheZc/6xk76iCAuvhI2penZuEe6Dr1a/cip2V+3p 11depIqAT8pCfE5lxrLNF5+knNz43cRyM/5zsf8u5gAZaU3WDEA24WGAJVSUoE2cnx4E efYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="HxaD/Xtc"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c7si6987767ooa.65.2020.03.31.02.05.58; Tue, 31 Mar 2020 02:06:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="HxaD/Xtc"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730595AbgCaJEX (ORCPT + 99 others); Tue, 31 Mar 2020 05:04:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:44120 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730929AbgCaJEP (ORCPT ); Tue, 31 Mar 2020 05:04:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9188E20848; Tue, 31 Mar 2020 09:04:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585645455; bh=FMoj8vQ3CJQ28E34Ty/KO3Y1PzfJBJMcuwGYh4c7THc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HxaD/Xtc9uiyL5nzAEXT5X1wZSAnEmeZnXc3wTE9PuEt5zkLwfx9Q35iiiZKFvFcA gOMD/8ar1ersFAI6eMJ3bdmUKtYDb+k1Fc1XO3zIAEWJhP91TYfgDd77Wy8c/jSpba NJ/3jPBhT5ees/S0+F7r+gqDdVBcrBLHAfoPAdXM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aya Levin , Tariq Toukan , Saeed Mahameed , "David S. Miller" Subject: [PATCH 5.5 058/170] net/mlx5e: Fix missing reset of SW metadata in Striding RQ reset Date: Tue, 31 Mar 2020 10:57:52 +0200 Message-Id: <20200331085430.749617384@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200331085423.990189598@linuxfoundation.org> References: <20200331085423.990189598@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Aya Levin [ Upstream commit 39369fd536d485a99a59d8e357c0d4d3ce19a3b8 ] When resetting the RQ (moving RQ state from RST to RDY), the driver resets the WQ's SW metadata. In striding RQ mode, we maintain a field that reflects the actual expected WQ head (including in progress WQEs posted to the ICOSQ). It was mistakenly not reset together with the WQ. Fix this here. Fixes: 8276ea1353a4 ("net/mlx5e: Report and recover from CQE with error on RQ") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h @@ -181,10 +181,12 @@ mlx5e_tx_dma_unmap(struct device *pdev, static inline void mlx5e_rqwq_reset(struct mlx5e_rq *rq) { - if (rq->wq_type == MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ) + if (rq->wq_type == MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ) { mlx5_wq_ll_reset(&rq->mpwqe.wq); - else + rq->mpwqe.actual_wq_head = 0; + } else { mlx5_wq_cyc_reset(&rq->wqe.wq); + } } /* SW parser related functions */