aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/devlink.h
diff options
context:
space:
mode:
authorMoshe Shemesh <moshe@mellanox.com>2018-07-04 07:30:28 -0400
committerDavid S. Miller <davem@davemloft.net>2018-07-05 06:58:35 -0400
commiteabaef1896bc06319461a644e3aa139885454def (patch)
tree4c9c68e3a8fb3356577984812a785befe7c0a901 /include/uapi/linux/devlink.h
parent827ad90cfa6140f86c398a7a8d32d9f319835273 (diff)
devlink: Add devlink_param register and unregister
Define configuration parameters data structure. Add functions to register and unregister the driver supported configuration parameters table. For each parameter registered, the driver should fill all the parameter's fields. In case the only supported configuration mode is "driverinit" the parameter's get()/set() functions are not required and should be set to NULL, for any other configuration mode, these functions are required and should be set by the driver. Signed-off-by: Moshe Shemesh <moshe@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/devlink.h')
-rw-r--r--include/uapi/linux/devlink.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
index 75cb5450c851..d814fa67c7b9 100644
--- a/include/uapi/linux/devlink.h
+++ b/include/uapi/linux/devlink.h
@@ -142,6 +142,16 @@ enum devlink_port_flavour {
142 */ 142 */
143}; 143};
144 144
145enum devlink_param_cmode {
146 DEVLINK_PARAM_CMODE_RUNTIME,
147 DEVLINK_PARAM_CMODE_DRIVERINIT,
148 DEVLINK_PARAM_CMODE_PERMANENT,
149
150 /* Add new configuration modes above */
151 __DEVLINK_PARAM_CMODE_MAX,
152 DEVLINK_PARAM_CMODE_MAX = __DEVLINK_PARAM_CMODE_MAX - 1
153};
154
145enum devlink_attr { 155enum devlink_attr {
146 /* don't change the order or add anything between, this is ABI! */ 156 /* don't change the order or add anything between, this is ABI! */
147 DEVLINK_ATTR_UNSPEC, 157 DEVLINK_ATTR_UNSPEC,