devlink: Rename devlink health attributes
authorAya Levin <ayal@mellanox.com>
Thu, 21 Feb 2019 12:12:01 +0000 (14:12 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Feb 2019 18:38:51 +0000 (10:38 -0800)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/devlink.h
net/core/devlink.c

index 53de8802a000b508537cc0a51966e9459374aafc..5bb4ea67d84f63a5e83961cb447552ba9f588276 100644 (file)
@@ -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 */
index 04d98550c78ce062937feda53adabdc9c38b3d39..5135997ecbe7c3d037d81fdfe9a6cbbd9c905e6e 100644 (file)
@@ -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,