From: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Pavan Chebbi <pavan.chebbi@broadcom.com>,
Jiri Pirko <jiri@mellanox.com>,
Vasundhara Volam <vasundhara-v.volam@broadcom.com>,
Michael Chan <michael.chan@broadcom.com>
Subject: [PATCH net-next 09/11] devlink: Add new enable_ecn generic device param
Date: Tue, 17 Mar 2020 20:47:24 +0530 [thread overview]
Message-ID: <1584458246-29370-3-git-send-email-vasundhara-v.volam@broadcom.com> (raw)
In-Reply-To: <1584458246-29370-1-git-send-email-vasundhara-v.volam@broadcom.com>
From: Pavan Chebbi <pavan.chebbi@broadcom.com>
Add new device parameter to enable/disable handling of Explicit
Congestion Notification(ECN) in the device.
This patch also addresses comments from Jiri Pirko, to update the
devlink-info.rst documentation.
Cc: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
Documentation/networking/devlink/devlink-params.rst | 5 +++++
include/net/devlink.h | 4 ++++
net/core/devlink.c | 5 +++++
3 files changed, 14 insertions(+)
diff --git a/Documentation/networking/devlink/devlink-params.rst b/Documentation/networking/devlink/devlink-params.rst
index da2f85c..0e6c965 100644
--- a/Documentation/networking/devlink/devlink-params.rst
+++ b/Documentation/networking/devlink/devlink-params.rst
@@ -106,3 +106,8 @@ own name.
* - ``region_snapshot_enable``
- Boolean
- Enable capture of ``devlink-region`` snapshots.
+ * - ``enable_ecn``
+ - Boolean
+ - Enable handling of Explicit Congestion Notification(ECN) in the device.
+ When enabled hardware may set the code point to Congestion
+ Encountered(CE) before dropping the packet.
diff --git a/include/net/devlink.h b/include/net/devlink.h
index e130d24..825a8f9 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -404,6 +404,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,
@@ -441,6 +442,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 f51bebc..116d887 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -3012,6 +3012,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
next prev parent reply other threads:[~2020-03-17 15:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-17 15:17 [PATCH net-next 07/11] bnxt_en: Read partno and serialno of the board from VPD Vasundhara Volam
2020-03-17 15:17 ` [PATCH net-next 08/11] bnxt_en: Add partno and serialno to devlink info_get cb Vasundhara Volam
2020-03-17 17:51 ` Jakub Kicinski
2020-03-17 15:17 ` Vasundhara Volam [this message]
2020-03-17 17:52 ` [PATCH net-next 09/11] devlink: Add new enable_ecn generic device param Jakub Kicinski
2020-03-18 5:26 ` Pavan Chebbi
2020-03-18 20:15 ` Jakub Kicinski
2020-03-17 15:17 ` [PATCH net-next 10/11] bnxt_en: Update firmware interface spec to 1.10.1.26 Vasundhara Volam
2020-03-17 15:17 ` [PATCH net-next 11/11] bnxt_en: Use "enable_ecn" devlink param Vasundhara Volam
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=1584458246-29370-3-git-send-email-vasundhara-v.volam@broadcom.com \
--to=vasundhara-v.volam@broadcom.com \
--cc=davem@davemloft.net \
--cc=jiri@mellanox.com \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pavan.chebbi@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).