netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Cc: davem@davemloft.net, michael.chan@broadcom.com,
	jiri@mellanox.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next RFC 3/7] devlink: Add port param set command
Date: Wed, 5 Dec 2018 13:13:34 +0100	[thread overview]
Message-ID: <20181205121334.GD2318@nanopsycho> (raw)
In-Reply-To: <1543989420-14859-4-git-send-email-vasundhara-v.volam@broadcom.com>

Wed, Dec 05, 2018 at 06:56:56AM CET, vasundhara-v.volam@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 <jiri@mellanox.com>
>Signed-off-by: Vasundhara Volam <vasundhara-v.volam@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 :)

[...]

  reply	other threads:[~2018-12-05 12:20 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-05  5:56 [PATCH net-next RFC 0/7] Add configuration parameters support for devlink_port Vasundhara Volam
2018-12-05  5:56 ` [PATCH net-next RFC 1/7] devlink: Add devlink_param for port register and unregister Vasundhara Volam
2018-12-05 11:47   ` Jiri Pirko
2018-12-06  6:02     ` Vasundhara Volam
2018-12-06  7:06       ` Jiri Pirko
2018-12-06  7:26         ` Vasundhara Volam
2018-12-10  9:21     ` Vasundhara Volam
2018-12-10 11:29       ` Jiri Pirko
2018-12-05  5:56 ` [PATCH net-next RFC 2/7] devlink: Add port param get command Vasundhara Volam
2018-12-05 11:51   ` Jiri Pirko
2018-12-05  5:56 ` [PATCH net-next RFC 3/7] devlink: Add port param set command Vasundhara Volam
2018-12-05 12:13   ` Jiri Pirko [this message]
2018-12-05  5:56 ` [PATCH net-next RFC 4/7] devlink: Add support for get/set driverinit value for devlink_port Vasundhara Volam
2018-12-05 12:59   ` Jiri Pirko
2018-12-05  5:56 ` [PATCH net-next RFC 5/7] devlink: Add devlink notifications support for port params Vasundhara Volam
2018-12-05 13:02   ` Jiri Pirko
2018-12-05  5:56 ` [PATCH net-next RFC 6/7] devlink: Add a boolean generic port parameter Vasundhara Volam
2018-12-05 13:04   ` Jiri Pirko
2018-12-05  5:57 ` [PATCH net-next RFC 7/7] bnxt_en: Add bnxt_en initial port params table and register it Vasundhara Volam
2018-12-05 13:05   ` Jiri Pirko
2018-12-05 23:33   ` Jakub Kicinski
2018-12-06  0:01     ` Michael Chan
2018-12-06  0:42       ` Jakub Kicinski
2018-12-06  1:18         ` Michael Chan
2018-12-06  6:00           ` Jakub Kicinski
2018-12-06  6:41             ` Michael Chan
2018-12-06  7:11               ` Jakub Kicinski
2018-12-06  8:57                 ` Michael Chan
2018-12-06  9:03                   ` Jiri Pirko
2018-12-06 10:31                     ` Vasundhara Volam
2018-12-06 11:11                       ` Jiri Pirko
2018-12-06 10:36                   ` Jakub Kicinski
2018-12-06 11:00                     ` Michael Chan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181205121334.GD2318@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=jiri@mellanox.com \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=vasundhara-v.volam@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).