Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1705564pxb; Thu, 16 Sep 2021 13:29:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxq4lnBnk/Fms9RhQhEmnZRCSvbFJF0VcAUKdpvIvUDp6tuqM0mD0daHkpyPT+fOQlhXyT7 X-Received: by 2002:a17:906:659:: with SMTP id t25mr8002773ejb.372.1631824162744; Thu, 16 Sep 2021 13:29:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631824162; cv=none; d=google.com; s=arc-20160816; b=02a20A1FyzrcMJ2y7OtjvPu0EDcOzINd3bcdneOLviEOhPEjkvIa0AT5qfq1T9VJeu GjBxe417lRZNTfwZX0hvq8wygt0NQNZQLZDck85DZ9NohFywq07G85x++FGOAm0LKWQ2 vp2DOkdXr3LwlKMfH7dplj9VEfUc1z5FC1u/tx7NQn9R2YNIc0jHm5gRva52cvJySdm/ HfqIsLrRQEcsKkx91brVcvFgGzSY8fBDEYVAv0MdSt/wZld//9NGQ2Ic/52w7vyhmJ+L XspoeBFql4/uWmWVUlpRTLwQC/j1tzxlGvl9EudgVt/HLwIZhUvnM8ps0RH6aottIKNu jBHw== 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=Hql+kd79lVCvAYWtKnXpG81QuAggNyetZnFXvVUEXuA=; b=IdfCUjtCQ7oNwYyrR51WZVs3bX4NOjFAE5PgYGXU+PrnMODy1XXgz/CM8qw6sx0JQ4 mJbZs2KuTSM6GR+w0YLyGlySrzIOE5mlrwC1uR9uZOc6AAbwICs2g4a95NrGF0uOQcia TxCnctdgDwrVl/uMNgk1mOzMKv/9UKaNp9qjPStlVsUV+dC+fJVWYGDHJdqRfCoY+T5d 1pRrvdBw2QJBvcoP4lQVn49qLUgv3eTCqtbFi85ppRvd/Ze6CDfjkdQ0WYFXBumRsEe/ dRVf6AkHyZThD6+586aeCMsN79PhzWgS0VqyIPJa6wrjwhnOkylUkFjvAXX0zK83fAYE D5Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MGigyVbx; 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 g8si3920846edq.535.2021.09.16.13.28.56; Thu, 16 Sep 2021 13:29:22 -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=MGigyVbx; 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 S242154AbhIPQ2s (ORCPT + 99 others); Thu, 16 Sep 2021 12:28:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:59260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241663AbhIPQT6 (ORCPT ); Thu, 16 Sep 2021 12:19:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 17E64613A2; Thu, 16 Sep 2021 16:13:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808839; bh=XTR+57XDiazcQFmw/EHVZma+L7sw9PT7OT1TmqBITX0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MGigyVbxHwukrWpBQZBzAVbXN26BF4LKDysrdeIJhiMdjRMBIE670J3tDILGmv6aQ iEzTSE6neJD5y1xtWY0OllAq0A3FomTiP5Ud1TPT5aAizefaCtAR6MHYtYPWyJjtP7 P3xTw/ZXbZGcxTGQa1z4qMjqVeCsL5oXhbqxZX7M= 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.10 240/306] octeontx2-pf: Fix NIX1_RX interface backpressure Date: Thu, 16 Sep 2021 17:59:45 +0200 Message-Id: <20210916155802.243413967@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@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 df238e46e2ae..b062ed06235d 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c @@ -1129,7 +1129,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) { 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