Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp571456pxu; Thu, 26 Nov 2020 06:07:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJyM+glCFAl1Z+Gkdj9dZf/CI2FFcQA29kiPwY3NITZOFbF9EztoEx14KgSgm1T2YCyKoIJk X-Received: by 2002:a17:906:b0f:: with SMTP id u15mr2865563ejg.109.1606399648754; Thu, 26 Nov 2020 06:07:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606399648; cv=none; d=google.com; s=arc-20160816; b=XO7GwwL9olYMYddmIwLBzrzP5+CWdaETcCQSubNZE4o7FpntAytB5BUcXhmGYhhpe9 ZPCZ5VqNKBMDYAF1MZGkUCfSBxxfHZQAE50nRR+RSJaDhyiUa9sUJDSra/PNEjLDKZSz pAv2i9fGqTiR9JpEQWnPhC1st7O9CdvkdoM8Hl8l+1nkDrhxRvxahDaI+KRV7UUTqz4H SvrrRu2ieK4joGIpRkG4qHOp0/Sl7uEJrBu/wKbsyO6vfpMcXrCrGvPKW0dylEcdjfYd 9M8uQONrXrFgMBvN+EfMvzO6Cw0O472qqNDnD5IToD4M3VDQQ03RG91PEAP0V4VQRHW6 qeyQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=0lMQuVyeSLaCjUzlC/0+yjavvRfmhPNeL7CyRnFdi0I=; b=YD2AAJLObfwJGPwvqcjuZ3DVs4FlBTBLvFC4flJrjB6i47VErxY4yN0DN2ty8QKEB+ QyxALD3V0tj8c7V5oI5FflQzP2XVDNbbfZpciTPW9vgRMRaZzp1J9KEi1QhxuXHedJjU G4hrfOb9Nj11Ma/E2XD/aptgyZAvOYBIks5NomHxWruO5nSD1htt1ehiKdjTCMW/3QWb E2+oecIElfmr1+6rJhU7ns1c3gtuKOQwXHp1jWNyQq+byDdPqYQcq3TAd9nV69O8Rpjy 6Mx3dsadIDDK35kdMainBLH9Pl0A9L9h+bVP/UrgoQvBldHUaQr0cK2xBwVX2y3zUxBe 2wyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=WywXpOSx; 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 c3si3124605edm.45.2020.11.26.06.06.48; Thu, 26 Nov 2020 06:07:28 -0800 (PST) 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=WywXpOSx; 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 S2390121AbgKZODF (ORCPT + 99 others); Thu, 26 Nov 2020 09:03:05 -0500 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:47170 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389434AbgKZODD (ORCPT ); Thu, 26 Nov 2020 09:03:03 -0500 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 0AQE0K5q028820; Thu, 26 Nov 2020 06:02:57 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=0lMQuVyeSLaCjUzlC/0+yjavvRfmhPNeL7CyRnFdi0I=; b=WywXpOSx+ju9aqH//zsTOHRswTK8cC8ZTBBMl7jq08q17/XrMJZzaATU4dfmEVMnuA2O dEHIZzDguyXVHKx3WE1MeNByvHB00AXqPuuxjO6yFooXCyUnXAU4bMwWfzbbM9IXoABg hIHnB8xcgmnx60w4jmZ8CXOHlFkCqmNQL/ivSIZySsaACHvD0mvAgJoHLLtmU19FiNlZ e7f0w7mPHf2IsbFwJgZdsP7OobzwjgBfNLwhw4RLzTy/pssCp4fw5+pQLNwzJRHzsT7Q zgqKvrYJBxTHqyrSvo6pjzZfGcVkzcnrnIOdM+/bcddt5wss5wI6wGCr94VyaKOkIMJP XA== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 34y39rhnvc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 26 Nov 2020 06:02:57 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 26 Nov 2020 06:02:55 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 26 Nov 2020 06:02:55 -0800 Received: from hyd1584.caveonetworks.com (unknown [10.29.37.82]) by maili.marvell.com (Postfix) with ESMTP id 482203F7041; Thu, 26 Nov 2020 06:02:52 -0800 (PST) From: George Cherian To: , CC: , , , , , , , , , Subject: [PATCHv5 net-next 0/3] Add devlink and devlink health reporters to Date: Thu, 26 Nov 2020 19:32:48 +0530 Message-ID: <20201126140251.963048-1-george.cherian@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-11-26_04:2020-11-26,2020-11-26 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add basic devlink and devlink health reporters. Devlink health reporters are added for NPA and NIX blocks. These reporters report the error count in respective blocks. Address Jakub's comment to add devlink support for error reporting. https://www.spinics.net/lists/netdev/msg670712.html Change-log: v5 - Address Jiri's comment - use devlink_fmsg_arr_pair_nest_start() for NIX blocks v4 - Rebase to net-next (no logic changes). v3 - Address Saeed's comments on v2. - Renamed the reporter name as hw_*. - Call devlink_health_report() when an event is raised. - Added recover op too. v2 - Address Willem's comments on v1. - Fixed the sparse issues, reported by Jakub. George Cherian (3): octeontx2-af: Add devlink suppoort to af driver octeontx2-af: Add devlink health reporters for NPA octeontx2-af: Add devlink health reporters for NIX .../net/ethernet/marvell/octeontx2/Kconfig | 1 + .../ethernet/marvell/octeontx2/af/Makefile | 2 +- .../net/ethernet/marvell/octeontx2/af/rvu.c | 9 +- .../net/ethernet/marvell/octeontx2/af/rvu.h | 4 + .../marvell/octeontx2/af/rvu_devlink.c | 978 ++++++++++++++++++ .../marvell/octeontx2/af/rvu_devlink.h | 82 ++ .../marvell/octeontx2/af/rvu_struct.h | 33 + 7 files changed, 1107 insertions(+), 2 deletions(-) create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.h -- 2.25.1