From: Moshe Shemesh <moshe@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: Vasundhara Volam <vasundhara-v.volam@broadcom.com>,
Jiri Pirko <jiri@mellanox.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next 09/10] devlink: Add enable_sriov boolean generic parameter
Date: Wed, 4 Jul 2018 14:30:36 +0300 [thread overview]
Message-ID: <1530703837-24563-10-git-send-email-moshe@mellanox.com> (raw)
In-Reply-To: <1530703837-24563-1-git-send-email-moshe@mellanox.com>
From: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
enable_sriov - Enables Single-Root Input/Output Virtualization(SR-IOV)
characteristic of the device.
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
include/net/devlink.h | 4 ++++
net/core/devlink.c | 6 +++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/include/net/devlink.h b/include/net/devlink.h
index a1c230d..8ed57138 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -358,6 +358,7 @@ struct devlink_param_item {
enum devlink_param_generic_id {
DEVLINK_PARAM_GENERIC_ID_INT_ERR_RESET,
DEVLINK_PARAM_GENERIC_ID_MAX_MACS,
+ DEVLINK_PARAM_GENERIC_ID_ENABLE_SRIOV,
/* add new param generic ids above here*/
__DEVLINK_PARAM_GENERIC_ID_MAX,
@@ -370,6 +371,9 @@ enum devlink_param_generic_id {
#define DEVLINK_PARAM_GENERIC_MAX_MACS_NAME "max_macs"
#define DEVLINK_PARAM_GENERIC_MAX_MACS_TYPE DEVLINK_PARAM_TYPE_U32
+#define DEVLINK_PARAM_GENERIC_ENABLE_SRIOV_NAME "enable_sriov"
+#define DEVLINK_PARAM_GENERIC_ENABLE_SRIOV_TYPE DEVLINK_PARAM_TYPE_BOOL
+
#define DEVLINK_PARAM_GENERIC(_id, _cmodes, _get, _set, _validate) \
{ \
.id = DEVLINK_PARAM_GENERIC_ID_##_id, \
diff --git a/net/core/devlink.c b/net/core/devlink.c
index 5bbd0aa..470f3db 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -2615,7 +2615,11 @@ static int devlink_nl_cmd_reload(struct sk_buff *skb, struct genl_info *info)
.name = DEVLINK_PARAM_GENERIC_MAX_MACS_NAME,
.type = DEVLINK_PARAM_GENERIC_MAX_MACS_TYPE,
},
-
+ {
+ .id = DEVLINK_PARAM_GENERIC_ID_ENABLE_SRIOV,
+ .name = DEVLINK_PARAM_GENERIC_ENABLE_SRIOV_NAME,
+ .type = DEVLINK_PARAM_GENERIC_ENABLE_SRIOV_TYPE,
+ },
};
static int devlink_param_generic_verify(const struct devlink_param *param)
--
1.8.3.1
next prev parent reply other threads:[~2018-07-04 11:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-04 11:30 [PATCH net-next 00/10] Add configuration parameters support Moshe Shemesh
2018-07-04 11:30 ` [PATCH net-next 01/10] devlink: Add devlink_param register and unregister Moshe Shemesh
2018-07-04 11:30 ` [PATCH net-next 02/10] devlink: Add param get command Moshe Shemesh
2018-07-04 11:30 ` [PATCH net-next 03/10] devlink: Add param set command Moshe Shemesh
2018-07-04 11:30 ` [PATCH net-next 04/10] devlink: Add support for get/set driverinit value Moshe Shemesh
2018-07-04 11:30 ` [PATCH net-next 05/10] devlink: Add devlink notifications support for params Moshe Shemesh
2018-07-04 11:30 ` [PATCH net-next 06/10] devlink: Add generic parameters internal_err_reset and max_macs Moshe Shemesh
2018-07-04 11:30 ` [PATCH net-next 07/10] mlx4: Add mlx4 initial parameters table and register it Moshe Shemesh
2018-07-04 11:30 ` [PATCH net-next 08/10] mlx4: Add support for devlink reload and load driverinit values Moshe Shemesh
2018-07-04 11:30 ` Moshe Shemesh [this message]
2018-07-04 11:30 ` [PATCH net-next 10/10] bnxt_en: Add bnxt_en initial params table and register it Moshe Shemesh
2018-07-04 14:12 ` [PATCH iproute2/net-next] devlink: Add param command support Moshe Shemesh
2018-07-05 10:58 ` [PATCH net-next 00/10] Add configuration parameters support David Miller
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=1530703837-24563-10-git-send-email-moshe@mellanox.com \
--to=moshe@mellanox.com \
--cc=davem@davemloft.net \
--cc=jiri@mellanox.com \
--cc=linux-kernel@vger.kernel.org \
--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