lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 31 Aug 2020 12:44:38 +0200
From:   Jiri Pirko <jiri@...nulli.us>
To:     Moshe Shemesh <moshe@...lanox.com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Jiri Pirko <jiri@...lanox.com>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next RFC v3 03/14] devlink: Add reload actions
 counters to dev get

Sun, Aug 30, 2020 at 05:27:23PM CEST, moshe@...lanox.com wrote:
>Expose devlink reload actions counters to the user through devlink dev
>get command.
>
>Examples:
>$ devlink dev show
>pci/0000:82:00.0:
>  reload_actions_stats:
>    driver_reinit 2
>    fw_activate 1
>    fw_activate_no_reset 0
>pci/0000:82:00.1:
>  reload_actions_stats:
>    driver_reinit 1
>    fw_activate 1
>    fw_activate_no_reset 0
>
>$ devlink dev show -jp
>{
>    "dev": {
>        "pci/0000:82:00.0": {
>            "reload_actions_stats": [ {

Perhaps "reload_action_stats" would be better.


>                    "driver_reinit": 2
>                },{
>                    "fw_activate": 1
>                },{
>                    "fw_activate_no_reset": 0
>                } ]
>        },
>        "pci/0000:82:00.1": {
>            "reload_actions_stats": [ {
>                    "driver_reinit": 1
>                },{
>                    "fw_activate": 1
>                },{
>                    "fw_activate_no_reset": 0
>                } ]
>        }
>    }
>}
>
>Signed-off-by: Moshe Shemesh <moshe@...lanox.com>
>---
>v2 -> v3:
>- Add reload actions counters instead of supported reload actions
>  (reload actions counters are only for supported action so no need for
>   both)
>v1 -> v2:
>- Removed DEVLINK_ATTR_RELOAD_DEFAULT_LEVEL
>- Removed DEVLINK_ATTR_RELOAD_LEVELS_INFO
>- Have actions instead of levels
>---
> include/uapi/linux/devlink.h |  3 +++
> net/core/devlink.c           | 37 +++++++++++++++++++++++++++++++-----
> 2 files changed, 35 insertions(+), 5 deletions(-)
>
>diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
>index 0a438135c3cf..fd7667c78417 100644
>--- a/include/uapi/linux/devlink.h
>+++ b/include/uapi/linux/devlink.h
>@@ -478,6 +478,9 @@ enum devlink_attr {
> 
> 	DEVLINK_ATTR_RELOAD_ACTION,		/* u8 */
> 	DEVLINK_ATTR_RELOAD_ACTIONS_DONE,	/* nested */
>+	DEVLINK_ATTR_RELOAD_ACTION_CNT_VALUE,	/* u32 */
>+	DEVLINK_ATTR_RELOAD_ACTION_CNT,		/* nested */
>+	DEVLINK_ATTR_RELOAD_ACTIONS_CNTS,	/* nested */

Be in-sync with the user outputs. Perhaps something like:
	DEVLINK_ATTR_RELOAD_ACTION_STATS
	DEVLINK_ATTR_RELOAD_ACTION_STAT
	DEVLINK_ATTR_RELOAD_ACTION_STAT_VALUE
?

> 
> 	/* add new attributes above here, update the policy in devlink.c */
> 

[..]

Powered by blists - more mailing lists