]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
devlink: Add generic parameters region_snapshot
authorAlex Vesker <valex@mellanox.com>
Thu, 12 Jul 2018 12:13:17 +0000 (15:13 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Jul 2018 00:37:13 +0000 (17:37 -0700)
region_snapshot - When set enables capturing region snapshots

Signed-off-by: Alex Vesker <valex@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/devlink.h
net/core/devlink.c

index 905f0bb7b4ba8f9b597ce18b4f01944154a5428f..b9b89d6604d402eb7ab83f1273526eba7fec42d8 100644 (file)
@@ -361,6 +361,7 @@ enum devlink_param_generic_id {
        DEVLINK_PARAM_GENERIC_ID_INT_ERR_RESET,
        DEVLINK_PARAM_GENERIC_ID_MAX_MACS,
        DEVLINK_PARAM_GENERIC_ID_ENABLE_SRIOV,
+       DEVLINK_PARAM_GENERIC_ID_REGION_SNAPSHOT,
 
        /* add new param generic ids above here*/
        __DEVLINK_PARAM_GENERIC_ID_MAX,
@@ -376,6 +377,9 @@ enum devlink_param_generic_id {
 #define DEVLINK_PARAM_GENERIC_ENABLE_SRIOV_NAME "enable_sriov"
 #define DEVLINK_PARAM_GENERIC_ENABLE_SRIOV_TYPE DEVLINK_PARAM_TYPE_BOOL
 
+#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(_id, _cmodes, _get, _set, _validate)     \
 {                                                                      \
        .id = DEVLINK_PARAM_GENERIC_ID_##_id,                           \
index e5118dba6bb4d6b1111932163feb7eef9273ca40..65fc366a78a4c455a02e74bdc30c9249698eb488 100644 (file)
@@ -2671,6 +2671,11 @@ static const struct devlink_param devlink_param_generic[] = {
                .name = DEVLINK_PARAM_GENERIC_ENABLE_SRIOV_NAME,
                .type = DEVLINK_PARAM_GENERIC_ENABLE_SRIOV_TYPE,
        },
+       {
+               .id = DEVLINK_PARAM_GENERIC_ID_REGION_SNAPSHOT,
+               .name = DEVLINK_PARAM_GENERIC_REGION_SNAPSHOT_NAME,
+               .type = DEVLINK_PARAM_GENERIC_REGION_SNAPSHOT_TYPE,
+       },
 };
 
 static int devlink_param_generic_verify(const struct devlink_param *param)