History

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.

Moshe Shemesh committed 8 years ago

Commit eabaef11 parent 827ad903 files · +243 −0Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/devlink.h+10−0
@@ -142,6 +142,16 @@ enum devlink_port_flavour { · 141 unmodified lines
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,