Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp1387135ybs; Mon, 25 May 2020 14:56:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSqctY2Lm7qvspDmo2fED7xNJ1XgHTCkRNySxY0Ex7Gsmx9KzI0WSOP2OVfRL8GhMRjuvg X-Received: by 2002:a17:906:c401:: with SMTP id u1mr19799091ejz.151.1590443789250; Mon, 25 May 2020 14:56:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590443789; cv=none; d=google.com; s=arc-20160816; b=F7WiFHC7E8PGmtqQpfZ5j+qfOrpzRADd2jRMDKqGWMFtWQD7AA6Lc2CQS7vnB2G5Pa bbY0NqCB/gEyWMgdm22EbAFvSzcDK9Mqok5ahIRb2FxgP3a1nuvR7AIHBHGC62Bv/s2Z A1cLgpnQ+am8oSSpGtFeaxbE3S3d6u/jiGt5erNnC0HvTs9kO6FknLFi50y2J8YSdwhB mZXqAkCGv672Gm0zDu6JctnQ+AbWnKsGTWSUVlaS2kVC/43Ca7SBHvDB9hTmyx9SplLh MAt2B2Hi208h4uNBMmApo9bKq2T4IHfQpdtctnkbraF3V/ktot9L3z/1S8ry7R4WfP+s LfAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=1j5z6NTkMThY0FKgCsakY5YwhSns9p/K1cMgBc/ttN0=; b=yYNnhHaJuvWt6jmgQzyj3hXmTXmovgFMpkw0dcF6L2xijh2nCnmvlxx8OVaAyOkETl QEOhIlP3/2j4bjnpBvmBDdBvkYZva4PXNwwjXbjzD9rjVKjGAWlejY6QW1/Q4uEOdTjX T43S+9we6xDh/MabXVLnNvQhjLvy6/5KiMwHPTM7tPkYUS0SiSnOcRnzhJsqLHrpq3Hp k78saPusE2PUaYfNwhVXMBEb9uocPAHpsr8NpW8QKZQ6RaitY+uMoNLxBs2d7n+47pBp a2+8pMw0tXL61VT5KUtvI0xu6YOIu1l9zo+e9kOiZ6b+/TYYHyGiGuvHmUPT8k53AsXC IPGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=swt24vm+; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r19si9646662edm.596.2020.05.25.14.55.56; Mon, 25 May 2020 14:56:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@kernel.org header.s=default header.b=swt24vm+; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390901AbgEYU5t (ORCPT + 99 others); Mon, 25 May 2020 16:57:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:42682 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390750AbgEYU5t (ORCPT ); Mon, 25 May 2020 16:57:49 -0400 Received: from kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net (c-67-180-217-166.hsd1.ca.comcast.net [67.180.217.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9B8262065F; Mon, 25 May 2020 20:57:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590440268; bh=lR7NOEwZSW7Lg+I18yIGiKJF3iGfsiCFNOxqNlZ1mDc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=swt24vm+6Bdjwmpc/k3E1NGlCiAfDgyqBkQ3G8Ce/iyqkrFCZLuItGHYd7e+lhuit 2p/8FdJfvjSP6yy44RRgmPkzZ0fXJ6Hm3oE4qCNX4na//sgiBAFsr9XmKyyD1l5QJB 5v9UiseaC98juTrEUehmaFTAJxgDK718S2RLobhk= Date: Mon, 25 May 2020 13:57:46 -0700 From: Jakub Kicinski To: Johannes Berg Cc: Luis Chamberlain , derosier@gmail.com, greearb@candelatech.com, jeyu@kernel.org, akpm@linux-foundation.org, arnd@arndb.de, rostedt@goodmis.org, mingo@redhat.com, aquini@redhat.com, cai@lca.pw, dyoung@redhat.com, bhe@redhat.com, peterz@infradead.org, tglx@linutronix.de, gpiccoli@canonical.com, pmladek@suse.com, tiwai@suse.de, schlad@suse.de, andriy.shevchenko@linux.intel.com, keescook@chromium.org, daniel.vetter@ffwll.ch, will@kernel.org, mchehab+samsung@kernel.org, kvalo@codeaurora.org, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, ath10k@lists.infradead.org, jiri@resnulli.us, briannorris@chromium.org Subject: Re: [RFC 1/2] devlink: add simple fw crash helpers Message-ID: <20200525135746.45e764de@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> In-Reply-To: <2e5199edb433c217c7974ef7408ff8c7253145b6.camel@sipsolutions.net> References: <20200519010530.GS11244@42.do-not-panic.com> <20200519211531.3702593-1-kuba@kernel.org> <20200522052046.GY11244@42.do-not-panic.com> <20200522101738.1495f4cc@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <2e5199edb433c217c7974ef7408ff8c7253145b6.camel@sipsolutions.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, 22 May 2020 22:46:07 +0200 Johannes Berg wrote: > > The irony is you have a problem with a networking device and all the > > devices your initial set touched are networking. Two of the drivers > > you touched either have or will soon have devlink health reporters > > implemented. > > Like I said above, do you think it'd be feasible to make a devcoredump > out of devlink health reports? And can the report be in a way that we > control the file format, or are there limits? I guess I should read the > code to find out, but I figure you probably just know. But feel free to > tell me to read it :) > > The reason I'm asking is that it's starting to sound like we really > ought to be implementing devlink, but we've got a bunch of > infrastructure that uses the devcoredump, and it'll take time > (significantly so) to change all that... In devlink world pure FW core dumps are exposed by devlink regions. An API allowing reading device memory, registers, etc., but also creating dumps of memory regions when things go wrong. It should be a fairly straightforward migration. Devlink health is more targeted, the dump is supposed to contain only relevant information, selected and formatted by the driver. When device misbehaves driver reads the relevant registers and FW state and creates a formatted state dump. I believe each element of the dump must fit into a netlink message (but there may be multiple elements, see devlink_fmsg_prepare_skb()). We should be able to convert dl-regions dumps and dl-health dumps into devcoredumps, but since health reporters are supposed to be more targeted there's usually multiple of them per device. Conversely devcoredumps can be trivially exposed as dl-region dumps, but I believe dl-health would require driver changes to format the information appropriately.