Message ID | 1584458246-29370-3-git-send-email-vasundhara-v.volam@broadcom.com |
---|---|
State | Changes Requested |
Delegated to: | David Miller |
Headers | show |
Series | bnxt_en updates to devlink cmd | expand |
On Tue, 17 Mar 2020 20:47:24 +0530 Vasundhara Volam wrote: > 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> Nacked-by: Jakub Kicinski <kuba@kernel.org> We've been over this multiple times. Devlink is not for configuring forwarding features. Use qdisc offload.
On Tue, Mar 17, 2020 at 11:22 PM Jakub Kicinski <kuba@kernel.org> wrote: > > On Tue, 17 Mar 2020 20:47:24 +0530 Vasundhara Volam wrote: > > 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> > > Nacked-by: Jakub Kicinski <kuba@kernel.org> > > We've been over this multiple times. Devlink is not for configuring > forwarding features. Use qdisc offload. This is just a config option like enable_sriov and enable_roce. This will only enable the capability in the device and not configure any rules.
On Wed, 18 Mar 2020 10:56:52 +0530 Pavan Chebbi wrote: > On Tue, Mar 17, 2020 at 11:22 PM Jakub Kicinski <kuba@kernel.org> wrote: > > > > On Tue, 17 Mar 2020 20:47:24 +0530 Vasundhara Volam wrote: > > > 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> > > > > Nacked-by: Jakub Kicinski <kuba@kernel.org> > > > > We've been over this multiple times. Devlink is not for configuring > > forwarding features. Use qdisc offload. > > This is just a config option like enable_sriov and enable_roce. > This will only enable the capability in the device and not configure any rules. Not what the documentation added by the patch says. But I'm sure the reality^W documentation can be bent as needed. If you really "just enable the capability like SR-IOV", please come back with this patch once you implement an API to make use of such capability.
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)