From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.5 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_MUTT autolearn=ham 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 93DDFC169C4 for ; Mon, 11 Feb 2019 10:50:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 61D9520838 for ; Mon, 11 Feb 2019 10:50:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20150623.gappssmtp.com header.i=@resnulli-us.20150623.gappssmtp.com header.b="sbrUw49V" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727014AbfBKKum (ORCPT ); Mon, 11 Feb 2019 05:50:42 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:54122 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725931AbfBKKul (ORCPT ); Mon, 11 Feb 2019 05:50:41 -0500 Received: by mail-wm1-f65.google.com with SMTP id d15so16915567wmb.3 for ; Mon, 11 Feb 2019 02:50:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=NJUTy25yBuFZrDAG/Sg/i3VwPxDfc/8A4eadx6sYVwI=; b=sbrUw49VUr/U60LJDoqt0EG0619n89r4S58AHo3Cv4YfopumdYA5CmIWhVeVFqfeIc S6FHm61B9vLbfOAy9SpQzWwLbZpd2dRnxjvgHP2p1bQMxSE+Ve2jObVfWf6jSfGMk3v/ RQcOxe2T8gFNSgKEit8KfH76AyWVqbKDdMzkmqg3brIiQQagWKBDSWQ1je9Ez6sAE83E 3/QPN4BIq7uTt2UTb8PirtkE12Wzj7UM9Pxd3fquOBTT8C/sDcRc+pvTjfmEhrkG3nkh aJiPspCGNqWD+9kwi7XlqHIKn7aR3qHkYJDWg2csUOR6MjGPl2bIUPu6D16QaPzaV8iE KJ2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=NJUTy25yBuFZrDAG/Sg/i3VwPxDfc/8A4eadx6sYVwI=; b=DwuIMcF74P7pr7wiRsB9Z/Ca/euvRxkwa1U+JIIturgvfTExU9E5RSxBx4dnS9ge5f xorTkQNdwqGEBuo8gc/q76RC2UzMy2c28nVWhXDGF5xPm4iVEAnYz1C9IRyRh+XKk5+M 9VzI/XZJyGkPU4DM0miuz2IPMk2ACEOseF2oLJs7QlszLu+f8KzDa0GxLdeINFs1xocf t92wy0XCohTLv2LIrc1b2cHDGZFsp9KFEXGQkDC1K6g8uMmGmPtooTJnL02OVLQM7FyD DuDt3Y8ftTBqGDAev7bxLjcfWdBaKUCQ4Tt95a00uhcvVY97TdaLQCLsU0x0K/Ad+Yao rdVg== X-Gm-Message-State: AHQUAuatPeFxP8/m0QMZ9m+fggfDW+hC9hJrnXi7FJTsWWvQVcGY7Nmv kni2BECUSUbL2UXucehN/msp8sDjOQc= X-Google-Smtp-Source: AHgI3Ibs6g/hyv52o/YuX4dBr5kHfmQs9guoUPfaDaVMp1LdHcgz+F9Rtv9GwxAEI3xIKGXJ2BuB1Q== X-Received: by 2002:a1c:7a18:: with SMTP id v24mr8426413wmc.107.1549882238554; Mon, 11 Feb 2019 02:50:38 -0800 (PST) Received: from localhost (mail.chocen-mesto.cz. [85.163.43.2]) by smtp.gmail.com with ESMTPSA id x3sm13667069wrd.19.2019.02.11.02.50.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Feb 2019 02:50:38 -0800 (PST) Date: Mon, 11 Feb 2019 11:41:15 +0100 From: Jiri Pirko To: Aya Levin Cc: David Ahern , netdev@vger.kernel.org, "David S. Miller" , Jiri Pirko , Moshe Shemesh , Eran Ben Elisha , Tal Alon , Ariel Almog Subject: Re: [PATCH for-next 4/4] devlink: add health command support Message-ID: <20190211104115.GC2251@nanopsycho> References: <1549532202-943-1-git-send-email-eranbe@mellanox.com> <1549823329-10377-1-git-send-email-ayal@mellanox.com> <1549823329-10377-5-git-send-email-ayal@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1549823329-10377-5-git-send-email-ayal@mellanox.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Sun, Feb 10, 2019 at 07:28:49PM CET, ayal@mellanox.com wrote: >This patch adds support for the following commands: >devlink health show [DEV reporter REPORTE_NAME] >devlink health recover DEV reporter REPORTER_NAME >devlink health diagnose DEV reporter REPORTER_NAME >devlink health dump show DEV reporter REPORTER_NAME >devlink health dump clear DEV reporter REPORTER_NAME >devlink health set DEV reporter REPORTER_NAME NAME VALUE > > * show: Devlink health show command displays status and configuration info on > specific reporter on a device or dump the info on all reporters on all > devices. > * recover: Devlink health recover enables the user to initiate a > recovery on a reporter. This operation will increment the recoveries > counter displayed in the show command. > * diagnose: Devlink health diagnose enables the user to retrieve diagnostics data > on a reporter on a device. The command's output is a free text defined > by the reporter. > * dump show: Devlink health dump show displays the last saved dump. Devlink > health saves a single dump. If a dump is not already stored by > the Devlink for this reporter, Devlink generates a new dump. The > dump can be generated automatically when a reporter reports on an > error or manually by user's request. > dump output is defined by the reporter. > * dump clear: Devlink health dump clear, deletes the last saved dump file. > * set: Devlink health set, enables the user to configure: > 1) grace_period [msec] time interval between auto recoveries. > 2) auto_recover [true/false] whether the devlink should execute > automatic recover on error. > >Examples: >$devlink health show pci/0000:00:09.0 reporter tx >pci/0000:00:09.0: >name tx > state healthy #err 0 #recover 1 last_dump_ts N/A > parameters: > grace period 600 auto_recover true >$devlink health diagnose pci/0000:00:09.0 reporter tx >SQs: > sqn: 4283 HW state: 1 stopped: false > sqn: 4288 HW state: 1 stopped: false > sqn: 4293 HW state: 1 stopped: false > sqn: 4298 HW state: 1 stopped: false > sqn: 4303 HW state: 1 stopped: false >$devlink health dump show pci/0000:00:09.0 reporter tx >TX dump data >$devlink health dump clear pci/0000:00:09.0 reporter tx >$devlink health set pci/0000:00:09.0 reporter tx grace_period 3500 >$devlink health set pci/0000:00:09.0 reporter tx auto_recover false > >Signed-off-by: Aya Levin >Reviewed-by: Moshe Shemesh >--- > devlink/devlink.c | 551 ++++++++++++++++++++++++++++++++++++++++++- > include/uapi/linux/devlink.h | 23 ++ > man/man8/devlink-health.8 | 176 ++++++++++++++ > man/man8/devlink.8 | 7 +- > 4 files changed, 755 insertions(+), 2 deletions(-) 755 lines is too much for one patch. For easier review, please split this patch into separate patchset, preferably per-cmd.