devlink: Add generic parameter ignore_ari
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Thu, 4 Oct 2018 05:43:44 +0000 (11:13 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Oct 2018 20:49:42 +0000 (13:49 -0700)
ignore_ari - Device ignores ARI(Alternate Routing ID) capability,
even when platforms has the support and creates same number of
partitions when platform does not support ARI capability.

Cc: Jiri Pirko <jiri@mellanox.com>
Cc: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/devlink.h
net/core/devlink.c

index 70671f0d4c30312b9ca07f5aa6a57736360451f5..ae28ccbd6843bad2e76a6f166b9bd335720cb913 100644 (file)
@@ -362,6 +362,7 @@ enum devlink_param_generic_id {
        DEVLINK_PARAM_GENERIC_ID_MAX_MACS,
        DEVLINK_PARAM_GENERIC_ID_ENABLE_SRIOV,
        DEVLINK_PARAM_GENERIC_ID_REGION_SNAPSHOT,
+       DEVLINK_PARAM_GENERIC_ID_IGNORE_ARI,
 
        /* add new param generic ids above here*/
        __DEVLINK_PARAM_GENERIC_ID_MAX,
@@ -380,6 +381,9 @@ enum devlink_param_generic_id {
 #define DEVLINK_PARAM_GENERIC_REGION_SNAPSHOT_NAME "region_snapshot_enable"
 #define DEVLINK_PARAM_GENERIC_REGION_SNAPSHOT_TYPE DEVLINK_PARAM_TYPE_BOOL
 
+#define DEVLINK_PARAM_GENERIC_IGNORE_ARI_NAME "ignore_ari"
+#define DEVLINK_PARAM_GENERIC_IGNORE_ARI_TYPE DEVLINK_PARAM_TYPE_BOOL
+
 #define DEVLINK_PARAM_GENERIC(_id, _cmodes, _get, _set, _validate)     \
 {                                                                      \
        .id = DEVLINK_PARAM_GENERIC_ID_##_id,                           \
index de6adad7ccbe32932244aea54745848a00976568..4a72fede11b453d8b24bf455fa9627c4269bf133 100644 (file)
@@ -2677,6 +2677,11 @@ static const struct devlink_param devlink_param_generic[] = {
                .name = DEVLINK_PARAM_GENERIC_REGION_SNAPSHOT_NAME,
                .type = DEVLINK_PARAM_GENERIC_REGION_SNAPSHOT_TYPE,
        },
+       {
+               .id = DEVLINK_PARAM_GENERIC_ID_IGNORE_ARI,
+               .name = DEVLINK_PARAM_GENERIC_IGNORE_ARI_NAME,
+               .type = DEVLINK_PARAM_GENERIC_IGNORE_ARI_TYPE,
+       },
 };
 
 static int devlink_param_generic_verify(const struct devlink_param *param)