Wed, Dec 05, 2018 at 06:56:56AM CET, vasundhara-v.vo...@broadcom.com wrote: >Add port param set command to set the value for a parameter. >Value can be set to any of the supported configuration modes. > >Cc: Jiri Pirko <j...@mellanox.com> >Signed-off-by: Vasundhara Volam <vasundhara-v.vo...@broadcom.com> >--- > include/uapi/linux/devlink.h | 1 + > net/core/devlink.c | 41 ++++++++++++++++++++++++++++++++++------- > 2 files changed, 35 insertions(+), 7 deletions(-) > >diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h >index f96e052..8f3c5dd 100644 >--- a/include/uapi/linux/devlink.h >+++ b/include/uapi/linux/devlink.h >@@ -84,6 +84,7 @@ enum devlink_command { > DEVLINK_CMD_PARAM_DEL, > > DEVLINK_CMD_PORT_PARAM_GET, /* can dump */ >+ DEVLINK_CMD_PORT_PARAM_SET,
Same note as for the previous patch. > > DEVLINK_CMD_REGION_GET, > DEVLINK_CMD_REGION_SET, >diff --git a/net/core/devlink.c b/net/core/devlink.c >index 8653fb5..10e1c45 100644 >--- a/net/core/devlink.c >+++ b/net/core/devlink.c >@@ -3096,19 +3096,20 @@ static int devlink_nl_cmd_param_get_doit(struct >sk_buff *skb, > return genlmsg_reply(msg, info); > } > >-static int devlink_nl_cmd_param_set_doit(struct sk_buff *skb, >- struct genl_info *info) >+static int __devlink_nl_cmd_param_set_doit(struct devlink *devlink, >+ struct list_head *param_list, >+ struct genl_info *info, >+ enum devlink_command cmd) > { >- struct devlink *devlink = info->user_ptr[0]; >+ struct devlink_param_item *param_item; > enum devlink_param_type param_type; > struct devlink_param_gset_ctx ctx; >- enum devlink_param_cmode cmode; >- struct devlink_param_item *param_item; > const struct devlink_param *param; > union devlink_param_value value; >+ enum devlink_param_cmode cmode; Don't move the things around for no good reason. In case you want to make our reverse-Christmas-tree obsession satisfied, do it in a separate patch :) [...]