Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp52899pxk; Tue, 15 Sep 2020 17:33:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWUe0F7O3DKZqdBce1O8yNl9F9u8wZP5jUqUBq5cRL6a4lSNTgFT5LTeuXBFnB4eL6MnaG X-Received: by 2002:a17:906:934f:: with SMTP id p15mr23267729ejw.497.1600216397060; Tue, 15 Sep 2020 17:33:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600216397; cv=none; d=google.com; s=arc-20160816; b=TPQzuoYl8OU1tafysBdREsJhEAVZhrDaHNsQRyc9w1l2QIuHuSgCjYQQSTOqgNXKW9 /P8b5dV9I7RzZaa8CZ2H+1D5QuCjvVJURvHRWAraSrVMe9ZhUaaMV2ZH3YYxhk0ToIEk K/OrkNg7Rc18/iALw/NuQ7uhrFn7NfzHastXDE6Hx0BHGLEbm76t2P87VaWO6BSsRXL+ Si8sMPtPmZL96mRQvmrt6SRdKYD+6zaC46vkk+zjjT3ig9TINMyMuAwnDSm/rP5Ba8Ru vFQ6Tm3zO1qQmZ7OExpO0XNSaPJOebTenbiGn/0MRvSd5k2v0OZl2HdfY0SnXUghYvTv mpAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=2ko20fCI5B7yynbCHaELcyL95KT/Cjn6cdhfTKOxg+w=; b=Y1xnDWd8G901L2dVWmKquNDGoZlXBy3DK37g2M0oUXHfNA4jT/skONiCHzjKse37Vh hNHFB+iOk9wLQuO/gdNj0q4lJAw5jl2h9DQhykVeSwSPSK6FyW1xqQJIvAx0z8+wpdry ZqA4C6jib67DAcpJ9caWzFnqHJMqkqTSKSHF/CV4UxX7GgWu9T43nchiED/19lUM6Y3c IVy51CbHSwN1YVqIz1rh3PutbLfZVZ6p3jr+T462fOpmpumjJjAXe8X8tErQm1ogF8pJ 1kB/wS7BdsCVfGaC3fMCQVNcG8rjqfI8YtiAxWltcs1LlzcuBEUYfgoQ6LgAb5zf6MNa dtDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=WFtnZskh; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n4si10751812edo.589.2020.09.15.17.32.50; Tue, 15 Sep 2020 17:33: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=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=WFtnZskh; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726768AbgIPAcS (ORCPT + 99 others); Tue, 15 Sep 2020 20:32:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726718AbgIONoG (ORCPT ); Tue, 15 Sep 2020 09:44:06 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37564C0611C3 for ; Tue, 15 Sep 2020 06:34:09 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id l9so3493581wme.3 for ; Tue, 15 Sep 2020 06:34:09 -0700 (PDT) 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; bh=2ko20fCI5B7yynbCHaELcyL95KT/Cjn6cdhfTKOxg+w=; b=WFtnZskhHfIidflh3b2fV37hTNbG3leHUk5iaDtD++SpGGekMH9LjZYtYQCDkLg4iD ogg/r+QA0jG1avvTAamJ+i+nuFtmkohyPgErkAf4h6d9awX3shb+3gdPWQ/HJyNxd7tK X1HYsQCF2N+xVbmpSw2df6EJ7ObfGIEe2mdAHhZ5nVeizccV3hrf2oC/B5PfiKC5IZmF qFzd68q9CIXF/PBx3+U633JgIZzsxaBlu8eGyV43dYKxMKWrEtSKzPASoEFfsKOhHf95 9wyduOprp86tP4UvQh1ekFK/BojHIPjvqn2kF5GNoPPIF9DRjkG9S0UETl1Nf4JIt0NM CMKw== 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; bh=2ko20fCI5B7yynbCHaELcyL95KT/Cjn6cdhfTKOxg+w=; b=U8sT0vDTrpSpF6ePCM9euhpYNvDg2j1eqT2Z93R7SC6xxGN/K3aeXdNbIw6TKXArxn Yg0B7pCCDkAcb5a3MLOSdOlBBb54HvKbNF1yLYl9sR74sJRbJsvmgK1zXYz/hBOxL8xL btoSjEPOWKN4pqtWsAefbJX5e9tdg4J80+0BMV6cLHD10QkoJHxWlrCFtMwkTnJrPOuo rEkVMU5t0skLTZSHdJDIkpKSEsHribmLTfUej8cpkHrbNFn54m04BRBZ4TwYuK9i5rTn d8/7HXVhyVXLjyYirJZXjTKtI9Zb2UZ4f0dn+ED3JwvrajgVxacmFv6nBjzoj3AJi3E+ 5kdg== X-Gm-Message-State: AOAM530ZAc0FG9SAwdETFnGpxrjwXWRX5ujITm8fQnTW/J7Y1HeZiCN2 YYyra3FQfrA7bUoo8ua3xMyu/g== X-Received: by 2002:a1c:20ce:: with SMTP id g197mr2188405wmg.72.1600176847887; Tue, 15 Sep 2020 06:34:07 -0700 (PDT) Received: from localhost ([86.61.181.4]) by smtp.gmail.com with ESMTPSA id u66sm25275316wmg.44.2020.09.15.06.34.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 06:34:07 -0700 (PDT) Date: Tue, 15 Sep 2020 15:34:06 +0200 From: Jiri Pirko To: Moshe Shemesh Cc: Ido Schimmel , Moshe Shemesh , "David S. Miller" , Jakub Kicinski , Jiri Pirko , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next RFC v4 04/15] devlink: Add reload actions stats to dev get Message-ID: <20200915133406.GQ2236@nanopsycho.orion> References: <1600063682-17313-1-git-send-email-moshe@mellanox.com> <1600063682-17313-5-git-send-email-moshe@mellanox.com> <20200914134500.GH2236@nanopsycho.orion> <20200915064519.GA5390@shredder> <20200915074402.GM2236@nanopsycho.orion> <0d6cb0da-761b-b122-f5b1-b82320cfd5c4@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0d6cb0da-761b-b122-f5b1-b82320cfd5c4@nvidia.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tue, Sep 15, 2020 at 02:31:38PM CEST, moshe@nvidia.com wrote: > >On 9/15/2020 10:44 AM, Jiri Pirko wrote: >> Tue, Sep 15, 2020 at 08:45:19AM CEST, idosch@idosch.org wrote: >> > On Mon, Sep 14, 2020 at 03:45:00PM +0200, Jiri Pirko wrote: >> > > Mon, Sep 14, 2020 at 08:07:51AM CEST, moshe@mellanox.com wrote: >> > > > Expose devlink reload actions stats to the user through devlink dev >> > > > get command. >> > > > >> > > > Examples: >> > > > $ devlink dev show >> > > > pci/0000:82:00.0: >> > > > reload_action_stats: >> > > > driver_reinit 2 >> > > > fw_activate 1 >> > > > driver_reinit_no_reset 0 >> > > > fw_activate_no_reset 0 >> > > > pci/0000:82:00.1: >> > > > reload_action_stats: >> > > > driver_reinit 1 >> > > > fw_activate 1 >> > > > driver_reinit_no_reset 0 >> > > > fw_activate_no_reset 0 >> > > I would rather have something like: >> > > stats: >> > > reload_action: >> > > driver_reinit 1 >> > > fw_activate 1 >> > > driver_reinit_no_reset 0 >> > > fw_activate_no_reset 0 >> > > >> > > Then we can easily extend and add other stats in the tree. > > >Sure, I will add it. Could you please checkout the metrics patchset and figure out how to merge that with your usecase? > >> > > >> > > Also, I wonder if these stats could be somehow merged with Ido's metrics >> > > work: >> > > https://github.com/idosch/linux/commits/submit/devlink_metric_rfc_v1 >> > > >> > > Ido, would it make sense? >> > I guess. My original idea for devlink-metric was to expose >> > design-specific metrics to user space where the entity registering the >> > metrics is the device driver. In this case the entity would be devlink >> > itself and it would be auto-registered for each device. >> Yeah, the usecase is different, but it is still stats, right. >> >> >> > > >> > > > $ devlink dev show -jp >> > > > { >> > > > "dev": { >> > > > "pci/0000:82:00.0": { >> > > > "reload_action_stats": [ { >> > > > "driver_reinit": 2 >> > > > },{ >> > > > "fw_activate": 1 >> > > > },{ >> > > > "driver_reinit_no_reset": 0 >> > > > },{ >> > > > "fw_activate_no_reset": 0 >> > > > } ] >> > > > }, >> > > > "pci/0000:82:00.1": { >> > > > "reload_action_stats": [ { >> > > > "driver_reinit": 1 >> > > > },{ >> > > > "fw_activate": 1 >> > > > },{ >> > > > "driver_reinit_no_reset": 0 >> > > > },{ >> > > > "fw_activate_no_reset": 0 >> > > > } ] >> > > > } >> > > > } >> > > > } >> > > > >> > > [..]