Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1570229pxb; Thu, 16 Sep 2021 10:07:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCSE/Ix1dC0siaxp7aN5uaotx1/3EK+gJVGElQOFBEcXoQtbeSYm51tBoNcNsTPc/36qVV X-Received: by 2002:a17:906:35d8:: with SMTP id p24mr7274246ejb.292.1631812028747; Thu, 16 Sep 2021 10:07:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631812028; cv=none; d=google.com; s=arc-20160816; b=i/qaqEVIi+IEmykZ98YOjt3Zy5Cmsauctnm6Ya1HZGNeHxU9qckID0NXlzEnSW2b9H 55PFWc6GWwgULi7SzIfyMLl7KejjNcF1UUfliHb7Br2PW2HU7aQr4eo5i9Cfx0/Fqx+G hP71/I48tYEo4Wsxjupze/kLt9TRM/2oRrCIqz9PuXaii7I9cnzazeB8HedifWjLX16s M9mAr7rl31FcA95J/ZJPCHTn0bbP9hoo6cED1P3rEbtEcVKmhFbgDXdy0bDQ7UuH2PC2 BRcSZkGf67EEYiJffiM4Z5az1BPaSOnHOnm+16PsMbyWOwTnu9bOlOeafzZ30vcW294s RNVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LFCW8A1LurRERcQTztYmSr5zfKSqIeg2Yq0N94hNxYw=; b=o2Ys1g/AjF5oy9h3WS8v/99pQQBHTV8yaeS40pbOByxDt2Wnp/NiLDmw1Kms6wNOcV pbmYFWFS9XWzVK6cGfdXrJltosM27iw8wa4XTh8EX/3GK3twu9l4gHj0/yYy+WLc+EOd +9a7naZIbZMTTc8NK0bkEG2trm3WdgG8ETOYTJ+TRdOkxcL3vAAPGo59VRrX79JILzoy 39fB2fe5imHlwIO0ZDXGlhcp0OrQFV+KR/ooCPb17whDjBBgaA+zvhCoZKfeYwzWUSRd QcNgqJR+yCkt+FQkDqKsxxWha9cmcuscfi2Z1stswqU3xA+QGa7SQTNIWT0i2jqb75cZ a1Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HThpL04e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i11si5247686edb.471.2021.09.16.10.06.43; Thu, 16 Sep 2021 10:07:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HThpL04e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348598AbhIPRDD (ORCPT + 99 others); Thu, 16 Sep 2021 13:03:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:52252 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346545AbhIPQzA (ORCPT ); Thu, 16 Sep 2021 12:55:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7A8EA613AB; Thu, 16 Sep 2021 16:30:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631809832; bh=8LZEJQtrtWy5w2bYAQcyCjP4Njlb9gk133v3duhkGhM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HThpL04eN2gf3PYLkl/lgCG+0P0pV2asXJbof7iDEvBP8NIo7lTavoF7wA7z1DxDo 4Wpb5M+GBxgFADhkZzHyCFFqm1rtXYBDcRq7/AHg4MZhhp1q0gRXn4U2/wpklJ1DZl +q8mDEYIW4q92CBA0HdaRgyyRr5Qd5IdcWE5emYE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Subbaraya Sundeep , Hariprasad Kelam , Sunil Goutham , "David S. Miller" , Sasha Levin Subject: [PATCH 5.13 299/380] octeontx2-pf: Fix NIX1_RX interface backpressure Date: Thu, 16 Sep 2021 18:00:56 +0200 Message-Id: <20210916155814.234325100@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155803.966362085@linuxfoundation.org> References: <20210916155803.966362085@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Subbaraya Sundeep [ Upstream commit e8fb4df1f5d84bc08dd4f4827821a851d2eab241 ] 'bp_ena' in Aura context is NIX block index, setting it zero will always backpressure NIX0 block, even if NIXLF belongs to NIX1. Hence fix this by setting it appropriately based on NIX block address. Signed-off-by: Subbaraya Sundeep Signed-off-by: Hariprasad Kelam Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- .../ethernet/marvell/octeontx2/nic/otx2_common.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c index e0d1af9e7770..6c64fdbef0df 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c @@ -1201,7 +1201,22 @@ static int otx2_aura_init(struct otx2_nic *pfvf, int aura_id, /* Enable backpressure for RQ aura */ if (aura_id < pfvf->hw.rqpool_cnt && !is_otx2_lbkvf(pfvf->pdev)) { aq->aura.bp_ena = 0; + /* If NIX1 LF is attached then specify NIX1_RX. + * + * Below NPA_AURA_S[BP_ENA] is set according to the + * NPA_BPINTF_E enumeration given as: + * 0x0 + a*0x1 where 'a' is 0 for NIX0_RX and 1 for NIX1_RX so + * NIX0_RX is 0x0 + 0*0x1 = 0 + * NIX1_RX is 0x0 + 1*0x1 = 1 + * But in HRM it is given that + * "NPA_AURA_S[BP_ENA](w1[33:32]) - Enable aura backpressure to + * NIX-RX based on [BP] level. One bit per NIX-RX; index + * enumerated by NPA_BPINTF_E." + */ + if (pfvf->nix_blkaddr == BLKADDR_NIX1) + aq->aura.bp_ena = 1; aq->aura.nix0_bpid = pfvf->bpid[0]; + /* Set backpressure level for RQ's Aura */ aq->aura.bp = RQ_BP_LVL_AURA; } -- 2.30.2