diff mbox series

[net-next,1/2] devlink: Rename devlink health attributes

Message ID 1550751122-2788-2-git-send-email-eranbe@mellanox.com
State Accepted
Delegated to: David Miller
Headers show
Series Devlink health fixes series | expand

Commit Message

Eran Ben Elisha Feb. 21, 2019, 12:12 p.m. UTC
From: Aya Levin <ayal@mellanox.com>

Rename devlink health attributes for better reflect the attributes use.
Add COUNT prefix on error counter attribute and recovery counter
attribute.

Fixes: 7afe335a8bed ("devlink: Add health get command")
Signed-off-by: Aya Levin <ayal@mellanox.com>
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
---
 include/uapi/linux/devlink.h | 4 ++--
 net/core/devlink.c           | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

Comments

Jiri Pirko Feb. 21, 2019, 12:31 p.m. UTC | #1
Thu, Feb 21, 2019 at 01:12:01PM CET, eranbe@mellanox.com wrote:
>From: Aya Levin <ayal@mellanox.com>
>
>Rename devlink health attributes for better reflect the attributes use.
>Add COUNT prefix on error counter attribute and recovery counter
>attribute.
>
>Fixes: 7afe335a8bed ("devlink: Add health get command")
>Signed-off-by: Aya Levin <ayal@mellanox.com>
>Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
>Acked-by: Jiri Pirko <jiri@mellanox.com>
>---
> include/uapi/linux/devlink.h | 4 ++--
> net/core/devlink.c           | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
>diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
>index 53de8802a000..5bb4ea67d84f 100644
>--- a/include/uapi/linux/devlink.h
>+++ b/include/uapi/linux/devlink.h
>@@ -323,8 +323,8 @@ enum devlink_attr {
> 	DEVLINK_ATTR_HEALTH_REPORTER,			/* nested */
> 	DEVLINK_ATTR_HEALTH_REPORTER_NAME,		/* string */
> 	DEVLINK_ATTR_HEALTH_REPORTER_STATE,		/* u8 */
>-	DEVLINK_ATTR_HEALTH_REPORTER_ERR,		/* u64 */
>-	DEVLINK_ATTR_HEALTH_REPORTER_RECOVER,		/* u64 */
>+	DEVLINK_ATTR_HEALTH_REPORTER_ERR_COUNT,		/* u64 */
>+	DEVLINK_ATTR_HEALTH_REPORTER_RECOVER_COUNT,	/* u64 */

Just note, this is still in net-next only, so it is okay to change it.


> 	DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS,		/* u64 */
> 	DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD,	/* u64 */
> 	DEVLINK_ATTR_HEALTH_REPORTER_AUTO_RECOVER,	/* u8 */
>diff --git a/net/core/devlink.c b/net/core/devlink.c
>index 04d98550c78c..5135997ecbe7 100644
>--- a/net/core/devlink.c
>+++ b/net/core/devlink.c
>@@ -4650,10 +4650,10 @@ devlink_nl_health_reporter_fill(struct sk_buff *msg,
> 	if (nla_put_u8(msg, DEVLINK_ATTR_HEALTH_REPORTER_STATE,
> 		       reporter->health_state))
> 		goto reporter_nest_cancel;
>-	if (nla_put_u64_64bit(msg, DEVLINK_ATTR_HEALTH_REPORTER_ERR,
>+	if (nla_put_u64_64bit(msg, DEVLINK_ATTR_HEALTH_REPORTER_ERR_COUNT,
> 			      reporter->error_count, DEVLINK_ATTR_PAD))
> 		goto reporter_nest_cancel;
>-	if (nla_put_u64_64bit(msg, DEVLINK_ATTR_HEALTH_REPORTER_RECOVER,
>+	if (nla_put_u64_64bit(msg, DEVLINK_ATTR_HEALTH_REPORTER_RECOVER_COUNT,
> 			      reporter->recovery_count, DEVLINK_ATTR_PAD))
> 		goto reporter_nest_cancel;
> 	if (nla_put_u64_64bit(msg, DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD,
>-- 
>2.17.1
>
Sergei Shtylyov Feb. 22, 2019, 7:59 a.m. UTC | #2
Hello!

On 21.02.2019 15:12, Eran Ben Elisha wrote:

> From: Aya Levin <ayal@mellanox.com>
> 
> Rename devlink health attributes for better reflect the attributes use.

    s/for/to/.

> Add COUNT prefix on error counter attribute and recovery counter
> attribute.
> 
> Fixes: 7afe335a8bed ("devlink: Add health get command")
> Signed-off-by: Aya Levin <ayal@mellanox.com>
> Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
> Acked-by: Jiri Pirko <jiri@mellanox.com>
[...]

MBR, Sergei
diff mbox series

Patch

diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
index 53de8802a000..5bb4ea67d84f 100644
--- a/include/uapi/linux/devlink.h
+++ b/include/uapi/linux/devlink.h
@@ -323,8 +323,8 @@  enum devlink_attr {
 	DEVLINK_ATTR_HEALTH_REPORTER,			/* nested */
 	DEVLINK_ATTR_HEALTH_REPORTER_NAME,		/* string */
 	DEVLINK_ATTR_HEALTH_REPORTER_STATE,		/* u8 */
-	DEVLINK_ATTR_HEALTH_REPORTER_ERR,		/* u64 */
-	DEVLINK_ATTR_HEALTH_REPORTER_RECOVER,		/* u64 */
+	DEVLINK_ATTR_HEALTH_REPORTER_ERR_COUNT,		/* u64 */
+	DEVLINK_ATTR_HEALTH_REPORTER_RECOVER_COUNT,	/* u64 */
 	DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS,		/* u64 */
 	DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD,	/* u64 */
 	DEVLINK_ATTR_HEALTH_REPORTER_AUTO_RECOVER,	/* u8 */
diff --git a/net/core/devlink.c b/net/core/devlink.c
index 04d98550c78c..5135997ecbe7 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -4650,10 +4650,10 @@  devlink_nl_health_reporter_fill(struct sk_buff *msg,
 	if (nla_put_u8(msg, DEVLINK_ATTR_HEALTH_REPORTER_STATE,
 		       reporter->health_state))
 		goto reporter_nest_cancel;
-	if (nla_put_u64_64bit(msg, DEVLINK_ATTR_HEALTH_REPORTER_ERR,
+	if (nla_put_u64_64bit(msg, DEVLINK_ATTR_HEALTH_REPORTER_ERR_COUNT,
 			      reporter->error_count, DEVLINK_ATTR_PAD))
 		goto reporter_nest_cancel;
-	if (nla_put_u64_64bit(msg, DEVLINK_ATTR_HEALTH_REPORTER_RECOVER,
+	if (nla_put_u64_64bit(msg, DEVLINK_ATTR_HEALTH_REPORTER_RECOVER_COUNT,
 			      reporter->recovery_count, DEVLINK_ATTR_PAD))
 		goto reporter_nest_cancel;
 	if (nla_put_u64_64bit(msg, DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD,