* [iproute2-next] devlink: print maximum number of snapshots if available
@ 2021-09-30 21:20 Jacob Keller
2021-10-05 14:39 ` David Ahern
0 siblings, 1 reply; 2+ messages in thread
From: Jacob Keller @ 2021-09-30 21:20 UTC (permalink / raw)
To: netdev; +Cc: Jakub Kicinski, Jiri Pirko, Jacob Keller
Recently the kernel gained ability to report the maximum number of
snapshots a region can have. Print this value out if it was reported.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
This requires updating the UAPI headers to the commit which includes the
DEVLINK_ATTR_REGION_MAX_SNAPSHOTS attribute.
devlink/devlink.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/devlink/devlink.c b/devlink/devlink.c
index 2f2142ed3856..07c4e08ab9d8 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -7845,6 +7845,10 @@ static void pr_out_region(struct dl *dl, struct nlattr **tb)
if (tb[DEVLINK_ATTR_REGION_SNAPSHOT_ID])
pr_out_snapshot(dl, tb);
+ if (tb[DEVLINK_ATTR_REGION_MAX_SNAPSHOTS])
+ pr_out_u64(dl, "max",
+ mnl_attr_get_u32(tb[DEVLINK_ATTR_REGION_MAX_SNAPSHOTS]));
+
pr_out_region_handle_end(dl);
}
base-commit: 2f5825cb38028a14961a79844a069be4e3057eca
--
2.31.1.331.gb0c09ab8796f
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [iproute2-next] devlink: print maximum number of snapshots if available
2021-09-30 21:20 [iproute2-next] devlink: print maximum number of snapshots if available Jacob Keller
@ 2021-10-05 14:39 ` David Ahern
0 siblings, 0 replies; 2+ messages in thread
From: David Ahern @ 2021-10-05 14:39 UTC (permalink / raw)
To: Jacob Keller, netdev; +Cc: Jakub Kicinski, Jiri Pirko
On 9/30/21 3:20 PM, Jacob Keller wrote:
> Recently the kernel gained ability to report the maximum number of
> snapshots a region can have. Print this value out if it was reported.
>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
>
> This requires updating the UAPI headers to the commit which includes the
> DEVLINK_ATTR_REGION_MAX_SNAPSHOTS attribute.
>
> devlink/devlink.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
applied to iproute2-next
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-05 14:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-30 21:20 [iproute2-next] devlink: print maximum number of snapshots if available Jacob Keller
2021-10-05 14:39 ` David Ahern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).