Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp889406pxb; Wed, 27 Oct 2021 14:32:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUWOwK/Sit8YWDhkV/OkXWFeEdmRcyS5qpvqYyyCtKQWR04PPpzlZBPjalEDukxRwlqJky X-Received: by 2002:a05:6402:26d6:: with SMTP id x22mr483544edd.165.1635370333522; Wed, 27 Oct 2021 14:32:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635370333; cv=none; d=google.com; s=arc-20160816; b=sp5LavvFrexJSHpYMxT6kepxV8mubnCBkHfC8ZK/w8FC+CD5hv6h4pzlfsnh8zslfr uSNZBX6NkmsKZGsKtObPEb8Jn6PHnSdxlfUEypHhx8EIg45tD1dNz3Xc6O6rHCXQkud8 qFes9dbTEJSq59Keat7gCb/qo65UgS5OCIcSP4YjlseretBNrqqggaOlOucuIKBJqUMI 3LxgQ+vb6IGPfeAJO7RKCJj2RAu0IRpxPvAse7Eacmx/0XYI3WpsAU6GvZ5/wbHeGAtx E9vR7bkfU+9FVfK0cdC/WdM82Xsd4U+GsWFZN0q3SERqSdA6ChXax4qcTbViZP/pv1WG Ioug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Fq7rkFnyF49XDIrXhiWhXP6g7fddIB/mpQ9VvtCOYz0=; b=GvmabPSnjn2KoT2im99vGRQd6GKZCz0iBix8vHOB1TVENRdP55fkJIybMRWvIiL7sK stav+xy6ARZnoqA+WXsWCvPbSmAXDx+LhFRwRbltZl4EJpsXTUKwY5Xm2mQjN0tpx1Os Q61o2Szk3WZNx1w6UqEhsZw9g4cTYLZMapKq0RRdjAJAcv1g7k5Hl/fqRXOs9L74+/62 4/0TStZIzd4jDTy+KKDIkZdDqDduXJQF5ngTLowoX3GvvSyBIHeeJjrU6UkHKEsAY4OI 6KXJUVqxLV2eRUIlBmCqNFxPfCpFV+gQWxm1f9nre1q+LOSwa+P7mdbLtipJV2OdSD6g X10Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=JhubMZJf; 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=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b23si1382237edt.585.2021.10.27.14.31.51; Wed, 27 Oct 2021 14:32:13 -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=@marvell.com header.s=pfpt0220 header.b=JhubMZJf; 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=REJECT dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243265AbhJ0Rfx (ORCPT + 97 others); Wed, 27 Oct 2021 13:35:53 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:5446 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229612AbhJ0Rfw (ORCPT ); Wed, 27 Oct 2021 13:35:52 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19RFW64B032300; Wed, 27 Oct 2021 10:33:24 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=Fq7rkFnyF49XDIrXhiWhXP6g7fddIB/mpQ9VvtCOYz0=; b=JhubMZJfcB6droJIZYTuZAewdpdl2U3FJmIxiMueGWWFWgl8Or5nfb5pf/5ndod5nays VTzVtckEYVoNPceKgoX2hPkpnbHeVIRhEBPmjkCA8wQWP2CZhgdosioN09Ax5OAJsfTm t+ZtBgnduhvBil2BELc9Iuq9Vb59TSdirBgh7cN6RDZKnKkI6flKLeqg9utxcwTBLdSJ rYU24B03NCsC8wwutBTRYbgSPnkQzts6Kkzk8KX2ymnFSh0qp+SFOelVQOeqUax5TmRK v24SBLFXRKugC9Tq8G8KCETv40Ah05zWsqoXPpg/bH/YPZB7zNOVE6YwqCB17wonnlMr Zw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com with ESMTP id 3by1caaptu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 27 Oct 2021 10:33:24 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 27 Oct 2021 10:33:22 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Wed, 27 Oct 2021 10:33:22 -0700 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 9EE963F709D; Wed, 27 Oct 2021 10:33:16 -0700 (PDT) From: Rakesh Babu Saladi To: , , , CC: , , , , Rakesh Babu Subject: [net PATCH v3 1/3] octeontx2-af: Check whether ipolicers exists Date: Wed, 27 Oct 2021 23:02:32 +0530 Message-ID: <20211027173234.23559-2-rsaladi2@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211027173234.23559-1-rsaladi2@marvell.com> References: <20211027173234.23559-1-rsaladi2@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-GUID: T2JFx6orsHzy2FGd-mWjokpuF3H0AoY7 X-Proofpoint-ORIG-GUID: T2JFx6orsHzy2FGd-mWjokpuF3H0AoY7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-27_05,2021-10-26_01,2020-04-07_01 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Subbaraya Sundeep While displaying ingress policers information in debugfs check whether ingress policers exist in the hardware or not because some platforms(CN9XXX) do not have this feature. Fixes: e7d8971763f3 ("octeontx2-af: cn10k: Debugfs support for bandwidth") Signed-off-by: Subbaraya Sundeep Signed-off-by: Rakesh Babu Signed-off-by: Sunil Kovvuri Goutham --- drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c index 9338765da048..6c589ca9b577 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c @@ -1719,6 +1719,10 @@ static int rvu_dbg_nix_band_prof_ctx_display(struct seq_file *m, void *unused) u16 pcifunc; char *str; + /* Ingress policers do not exist on all platforms */ + if (!nix_hw->ipolicer) + return 0; + for (layer = 0; layer < BAND_PROF_NUM_LAYERS; layer++) { if (layer == BAND_PROF_INVAL_LAYER) continue; @@ -1768,6 +1772,10 @@ static int rvu_dbg_nix_band_prof_rsrc_display(struct seq_file *m, void *unused) int layer; char *str; + /* Ingress policers do not exist on all platforms */ + if (!nix_hw->ipolicer) + return 0; + seq_puts(m, "\nBandwidth profile resource free count\n"); seq_puts(m, "=====================================\n"); for (layer = 0; layer < BAND_PROF_NUM_LAYERS; layer++) { -- 2.17.1