All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Steve Lin <steven.lin1@broadcom.com>
Cc: netdev@vger.kernel.org, jiri@mellanox.com, davem@davemloft.net,
	michael.chan@broadcom.com, linville@tuxdriver.com,
	gospo@broadcom.com, yuvalm@mellanox.com
Subject: Re: [PATCH net-next v4 02/10] devlink: Adding SR-IOV enablement perm config param
Date: Fri, 27 Oct 2017 23:06:51 +0200	[thread overview]
Message-ID: <20171027210651.GD1980@nanopsycho.orion> (raw)
In-Reply-To: <1509137654-1580-3-git-send-email-steven.lin1@broadcom.com>

Fri, Oct 27, 2017 at 10:54:06PM CEST, steven.lin1@broadcom.com wrote:
>Adding DEVLINK_PERM_CONFIG_SRIOV_ENABLED permanent config
>parameter.  Value is permanent, so becomes the new default

Avoid the double space.


>value for this device.
>
>  DEVLINK_PERM_CONFIG_DISABLE = Disable SR-IOV
>  DEVLINK_PERM_CONFIG_ENABLE  = Enable SR-IOV
>
>Signed-off-by: Steve Lin <steven.lin1@broadcom.com>
>Acked-by: Andy Gospodarek <gospo@broadcom.com>
>---
> include/uapi/linux/devlink.h | 14 +++++++++++++-
> net/core/devlink.c           |  1 +
> 2 files changed, 14 insertions(+), 1 deletion(-)
>
>diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
>index b3a0b2a..9a41f6e 100644
>--- a/include/uapi/linux/devlink.h
>+++ b/include/uapi/linux/devlink.h
>@@ -256,8 +256,20 @@ enum devlink_dpipe_header_id {
> 	DEVLINK_DPIPE_HEADER_IPV6,
> };
> 
>-/* Permanent config parameters */
>+enum devlink_perm_config_enabled {
>+	DEVLINK_PERM_CONFIG_DISABLE,
>+	DEVLINK_PERM_CONFIG_ENABLE,
>+};
>+
>+/* Permanent config parameters:
>+ * DEVLINK_PERM_CONFIG_SRIOV_ENABLED: Configures whether SR-IOV PCI capability
>+ * provided by device.

I don't understand the sentense :/


>+ *   DEVLINK_PERM_CONFIG_DISABLE = disable SR-IOV
>+ *   DEVLINK_PERM_CONFIG_ENABLE  = enable SR-IOV

These comments should be at the enum values, not here.


>+ */
> enum devlink_perm_config_param {
>+	DEVLINK_PERM_CONFIG_SRIOV_ENABLED,
>+
> 	__DEVLINK_PERM_CONFIG_MAX,
> 	DEVLINK_PERM_CONFIG_MAX = __DEVLINK_PERM_CONFIG_MAX - 1
> };
>diff --git a/net/core/devlink.c b/net/core/devlink.c
>index a7fa7cc..395c93c 100644
>--- a/net/core/devlink.c
>+++ b/net/core/devlink.c
>@@ -1569,6 +1569,7 @@ static int devlink_nl_cmd_eswitch_set_doit(struct sk_buff *skb,
> static const struct nla_policy devlink_nl_policy[DEVLINK_ATTR_MAX + 1];
> 
> static const u8 devlink_perm_cfg_param_types[DEVLINK_PERM_CONFIG_MAX + 1] = {
>+	[DEVLINK_PERM_CONFIG_SRIOV_ENABLED] = NLA_U8,
> };
> 
> static int devlink_nl_single_param_get(struct sk_buff *msg,
>-- 
>2.7.4
>

  reply	other threads:[~2017-10-27 21:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-27 20:54 [PATCH net-next v4 00/10] Adding permanent config get/set to devlink Steve Lin
2017-10-27 20:54 ` [PATCH net-next v4 01/10] devlink: Add permanent config parameter get/set operations Steve Lin
2017-10-27 21:04   ` Jiri Pirko
2017-10-27 21:26     ` Steve Lin
2017-10-28  7:16       ` Jiri Pirko
2017-10-27 20:54 ` [PATCH net-next v4 02/10] devlink: Adding SR-IOV enablement perm config param Steve Lin
2017-10-27 21:06   ` Jiri Pirko [this message]
2017-10-27 21:30     ` Steve Lin
2017-10-28  7:17       ` Jiri Pirko
2017-10-27 20:54 ` [PATCH net-next v4 03/10] devlink: Adding num VFs per PF permanent " Steve Lin
2017-10-27 20:54 ` [PATCH net-next v4 04/10] devlink: Adding max PF MSI-X vectors perm " Steve Lin
2017-10-27 20:54 ` [PATCH net-next v4 05/10] devlink: Adding num MSI-X vectors per VF " Steve Lin
2017-10-27 20:54 ` [PATCH net-next v4 06/10] bnxt: Add devlink support for config get/set Steve Lin
2017-10-27 20:54 ` [PATCH net-next v4 07/10] bnxt: Adding SR-IOV enablement permanent cfg param Steve Lin
2017-10-27 20:54 ` [PATCH net-next v4 08/10] bnxt: Adding num VFs per PF perm config param Steve Lin
2017-10-27 20:54 ` [PATCH net-next v4 09/10] bnxt: Adding max PF MSI-X vectors " Steve Lin
2017-10-27 20:54 ` [PATCH net-next v4 10/10] bnxt: Adding num MSI-X vectors per VF " Steve Lin

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=20171027210651.GD1980@nanopsycho.orion \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=gospo@broadcom.com \
    --cc=jiri@mellanox.com \
    --cc=linville@tuxdriver.com \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=steven.lin1@broadcom.com \
    --cc=yuvalm@mellanox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.