devlink: Add support for driverinit set value for devlink_port
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Mon, 28 Jan 2019 12:30:24 +0000 (18:00 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Jan 2019 06:13:09 +0000 (22:13 -0800)
commit5473a7bdad78f2efe8ee508e8c7bbb762896e78f
tree1213aa1ddbf38d9565f10fa5c150b50f75872cfd
parentffd19b9a490a6b022b58bada054ee130fff06a1c
devlink: Add support for driverinit set value for devlink_port

Add support for "driverinit" configuration mode value for devlink_port
configuration parameters. Add devlink_port_param_driverinit_value_set()
function to help the driver set the value to devlink_port.

Also, move the common code to __devlink_param_driverinit_value_set()
to be used by both device and port params.

v7->v8:
Re-order the definitions as follows:
__devlink_param_driverinit_value_get
__devlink_param_driverinit_value_set
devlink_param_driverinit_value_get
devlink_param_driverinit_value_set
devlink_port_param_driverinit_value_get
devlink_port_param_driverinit_value_set

Cc: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/devlink.h
net/core/devlink.c