netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] devlink: Add enable_ecn boolean generic parameter
@ 2020-01-22 10:40 Pavan Chebbi
  2020-01-22 13:32 ` Jiri Pirko
  0 siblings, 1 reply; 2+ messages in thread
From: Pavan Chebbi @ 2020-01-22 10:40 UTC (permalink / raw)
  To: davem; +Cc: michael.chan, vasundhara-v.volam, netdev, jiri, Pavan Chebbi

enable_ecn - Enables Explicit Congestion Notification
characteristic of the device.

Cc: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
---
 include/net/devlink.h | 4 ++++
 net/core/devlink.c    | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/include/net/devlink.h b/include/net/devlink.h
index 5e46c24..52315dd 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -403,6 +403,7 @@ enum devlink_param_generic_id {
 	DEVLINK_PARAM_GENERIC_ID_FW_LOAD_POLICY,
 	DEVLINK_PARAM_GENERIC_ID_RESET_DEV_ON_DRV_PROBE,
 	DEVLINK_PARAM_GENERIC_ID_ENABLE_ROCE,
+	DEVLINK_PARAM_GENERIC_ID_ENABLE_ECN,
 
 	/* add new param generic ids above here*/
 	__DEVLINK_PARAM_GENERIC_ID_MAX,
@@ -440,6 +441,9 @@ enum devlink_param_generic_id {
 #define DEVLINK_PARAM_GENERIC_ENABLE_ROCE_NAME "enable_roce"
 #define DEVLINK_PARAM_GENERIC_ENABLE_ROCE_TYPE DEVLINK_PARAM_TYPE_BOOL
 
+#define DEVLINK_PARAM_GENERIC_ENABLE_ECN_NAME "enable_ecn"
+#define DEVLINK_PARAM_GENERIC_ENABLE_ECN_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 64367ee..298dcd1 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -3011,6 +3011,11 @@ static int devlink_nl_cmd_flash_update(struct sk_buff *skb,
 		.name = DEVLINK_PARAM_GENERIC_ENABLE_ROCE_NAME,
 		.type = DEVLINK_PARAM_GENERIC_ENABLE_ROCE_TYPE,
 	},
+	{
+		.id = DEVLINK_PARAM_GENERIC_ID_ENABLE_ECN,
+		.name = DEVLINK_PARAM_GENERIC_ENABLE_ECN_NAME,
+		.type = DEVLINK_PARAM_GENERIC_ENABLE_ECN_TYPE,
+	},
 };
 
 static int devlink_param_generic_verify(const struct devlink_param *param)
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] devlink: Add enable_ecn boolean generic parameter
  2020-01-22 10:40 [PATCH] devlink: Add enable_ecn boolean generic parameter Pavan Chebbi
@ 2020-01-22 13:32 ` Jiri Pirko
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Pirko @ 2020-01-22 13:32 UTC (permalink / raw)
  To: Pavan Chebbi; +Cc: davem, michael.chan, vasundhara-v.volam, netdev, jiri

Wed, Jan 22, 2020 at 11:40:46AM CET, pavan.chebbi@broadcom.com wrote:
>enable_ecn - Enables Explicit Congestion Notification
>characteristic of the device.
>
>Cc: Jiri Pirko <jiri@mellanox.com>
>Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>

NAK.

You are missing at least:
documentation
driver user


>---
> include/net/devlink.h | 4 ++++
> net/core/devlink.c    | 5 +++++
> 2 files changed, 9 insertions(+)
>
>diff --git a/include/net/devlink.h b/include/net/devlink.h
>index 5e46c24..52315dd 100644
>--- a/include/net/devlink.h
>+++ b/include/net/devlink.h
>@@ -403,6 +403,7 @@ enum devlink_param_generic_id {
> 	DEVLINK_PARAM_GENERIC_ID_FW_LOAD_POLICY,
> 	DEVLINK_PARAM_GENERIC_ID_RESET_DEV_ON_DRV_PROBE,
> 	DEVLINK_PARAM_GENERIC_ID_ENABLE_ROCE,
>+	DEVLINK_PARAM_GENERIC_ID_ENABLE_ECN,
> 
> 	/* add new param generic ids above here*/
> 	__DEVLINK_PARAM_GENERIC_ID_MAX,
>@@ -440,6 +441,9 @@ enum devlink_param_generic_id {
> #define DEVLINK_PARAM_GENERIC_ENABLE_ROCE_NAME "enable_roce"
> #define DEVLINK_PARAM_GENERIC_ENABLE_ROCE_TYPE DEVLINK_PARAM_TYPE_BOOL
> 
>+#define DEVLINK_PARAM_GENERIC_ENABLE_ECN_NAME "enable_ecn"
>+#define DEVLINK_PARAM_GENERIC_ENABLE_ECN_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 64367ee..298dcd1 100644
>--- a/net/core/devlink.c
>+++ b/net/core/devlink.c
>@@ -3011,6 +3011,11 @@ static int devlink_nl_cmd_flash_update(struct sk_buff *skb,
> 		.name = DEVLINK_PARAM_GENERIC_ENABLE_ROCE_NAME,
> 		.type = DEVLINK_PARAM_GENERIC_ENABLE_ROCE_TYPE,
> 	},
>+	{
>+		.id = DEVLINK_PARAM_GENERIC_ID_ENABLE_ECN,
>+		.name = DEVLINK_PARAM_GENERIC_ENABLE_ECN_NAME,
>+		.type = DEVLINK_PARAM_GENERIC_ENABLE_ECN_TYPE,
>+	},
> };
> 
> static int devlink_param_generic_verify(const struct devlink_param *param)
>-- 
>1.8.3.1
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-22 13:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-22 10:40 [PATCH] devlink: Add enable_ecn boolean generic parameter Pavan Chebbi
2020-01-22 13:32 ` Jiri Pirko

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).