Thread (22 messages) flat view 22 messages, 3 authors, 2020-09-18
STALE2173d

[PATCH v3 net-next 1/9] net: devlink: regions: Add a priv member to the regions ops struct

From: Andrew Lunn <andrew@lunn.ch>
Date: 2020-09-10 02:47:41
Subsystem: devlink, networking [general], the rest · Maintainers: Jiri Pirko, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

The driver may have multiple regions which can be dumped using one
function. However, for this to work, additional information is
needed. Add a priv member to the ops structure for the driver to use
however it likes.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 include/net/devlink.h | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/include/net/devlink.h b/include/net/devlink.h
index eaec0a8cc5ef..86ce644260b3 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -542,12 +542,14 @@ struct devlink_info_req;
  *            the data variable must be updated to point to the snapshot data.
  *            The function will be called while the devlink instance lock is
  *            held.
+ * @priv: Pointer to driver private data for the region operation
  */
 struct devlink_region_ops {
 	const char *name;
 	void (*destructor)(const void *data);
 	int (*snapshot)(struct devlink *devlink, struct netlink_ext_ack *extack,
 			u8 **data);
+	void *priv;
 };
 
 struct devlink_fmsg;
-- 
2.28.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help