Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0E30C433E5 for ; Tue, 28 Jul 2020 08:59:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AD77220809 for ; Tue, 28 Jul 2020 08:59:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marvell.com header.i=@marvell.com header.b="Jo08mZcF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728442AbgG1I7H (ORCPT ); Tue, 28 Jul 2020 04:59:07 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:64288 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728195AbgG1I7H (ORCPT ); Tue, 28 Jul 2020 04:59:07 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06S8tMnZ022930; Tue, 28 Jul 2020 01:59:05 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=FoGAkKnChF5K0jer7gQvXi1INXEksmEaHYRyP9u4bdU=; b=Jo08mZcFPGJhntBLZ60sIWozDkGfh8HW92A8pNCBYNk9G19k3AZYInv+WIYmpjJvaRcT nGWmMpTcugnQ1JKG0q48+NbFZS5hLuqo9XrtJCgInohtkb2HiSzYFVGNis8ZdXp4gpHi 3jGL21weiuO26yiFpVIV9JzYrao91kuaMt3gVHGJzbQN4J6b8DV6LEppqoyrJmoIsM+k n8q3VV8RxpJMDHMYnxTZUYs23/Dd2Nb6JhQDJbwCb78c3sAA5/R0JKzB8Aaikt46pW3I IvZFXq89+AGuy2vJEXQH/PfbLtsLZyTvhzaFTznFjun+rVchwf8M9M5YQwO3cPhOuLFu dA== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 32gj3qu7cv-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 28 Jul 2020 01:59:05 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 28 Jul 2020 01:59:05 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 28 Jul 2020 01:59:04 -0700 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; Tue, 28 Jul 2020 01:59:04 -0700 Received: from NN-LT0019.marvell.com (NN-LT0019.marvell.com [10.193.54.28]) by maili.marvell.com (Postfix) with ESMTP id 22E673F7041; Tue, 28 Jul 2020 01:59:01 -0700 (PDT) From: Igor Russkikh To: CC: "David S . Miller" , Jakub Kicinski , Ariel Elior , Michal Kalderon , Igor Russkikh Subject: [PATCH v2 net-next 00/11] qed: introduce devlink health support Date: Tue, 28 Jul 2020 11:58:48 +0300 Message-ID: <20200728085859.899-1-irusskikh@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-28_01:2020-07-28,2020-07-28 signatures=0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This is a followup implementation after series https://patchwork.ozlabs.org/project/netdev/cover/20200514095727.1361-1-irusskikh@marvell.com/ This is an implementation of devlink health infrastructure. With this we are now able to report HW errors to devlink, and it'll take its own actions depending on user configuration to capture and store the dump at the bad moment, and to request the driver to recover the device. So far we do not differentiate global device failures or specific PCI function failures. This means that some errors specific to one physical function will affect an entire device. This is not yet fully designed and verified, will followup in future. Solution was verified with artificial HW errors generated, existing tools for dump analysis could be used. v2: fix #include issue from kbuild test robot. Igor Russkikh (11): qed: move out devlink logic into a new file qed/qede: make devlink survive recovery qed: swap param init and publish qed: fix kconfig help entries qed: implement devlink info request qed: health reporter init deinit seq qed: use devlink logic to report errors qed*: make use of devlink recovery infrastructure qed: implement devlink dump qed: align adjacent indent qede: make driver reliable on unload after failures drivers/net/ethernet/qlogic/Kconfig | 5 +- drivers/net/ethernet/qlogic/qed/Makefile | 1 + drivers/net/ethernet/qlogic/qed/qed.h | 3 +- drivers/net/ethernet/qlogic/qed/qed_dev.c | 10 + drivers/net/ethernet/qlogic/qed/qed_devlink.c | 256 ++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_devlink.h | 20 ++ drivers/net/ethernet/qlogic/qed/qed_main.c | 116 +------- drivers/net/ethernet/qlogic/qede/qede.h | 2 + drivers/net/ethernet/qlogic/qede/qede_main.c | 35 ++- include/linux/qed/qed_if.h | 23 +- 10 files changed, 342 insertions(+), 129 deletions(-) create mode 100644 drivers/net/ethernet/qlogic/qed/qed_devlink.c create mode 100644 drivers/net/ethernet/qlogic/qed/qed_devlink.h -- 2.17.1