devlink: Add method for time-stamp on reporter's dump
When setting the dump's time-stamp, use ktime_get_real in addition to
jiffies. This simplifies the user space implementation and bypasses
some inconsistent behavior with translating jiffies to current time.
The time taken is transformed into nsec, to comply with y2038 issue.
Fixes: c8e1da0bf9
("devlink: Add health report functionality")
Signed-off-by: Aya Levin <ayal@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
40a1dcee2d
commit
d279505b72
@@ -421,6 +421,7 @@ enum devlink_attr {
|
||||
|
||||
DEVLINK_ATTR_RELOAD_FAILED, /* u8 0 or 1 */
|
||||
|
||||
DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS_NS, /* u64 */
|
||||
/* add new attributes above here, update the policy in devlink.c */
|
||||
|
||||
__DEVLINK_ATTR_MAX,
|
||||
|
Reference in New Issue
Block a user