]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
devlink: Add generic parameter msix_vec_per_pf_max
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Thu, 4 Oct 2018 05:43:45 +0000 (11:13 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Oct 2018 20:49:42 +0000 (13:49 -0700)
msix_vec_per_pf_max - This param sets the number of MSIX vectors
that the device requests from the host on driver initialization.
This value is set in the device which is applicable per PF.

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 ae28ccbd6843bad2e76a6f166b9bd335720cb913..c9b08b49957c7ea551ce3e53d0c8e1a7d4a1e796 100644 (file)
@@ -363,6 +363,7 @@ enum devlink_param_generic_id {
        DEVLINK_PARAM_GENERIC_ID_ENABLE_SRIOV,
        DEVLINK_PARAM_GENERIC_ID_REGION_SNAPSHOT,
        DEVLINK_PARAM_GENERIC_ID_IGNORE_ARI,
+       DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MAX,
 
        /* add new param generic ids above here*/
        __DEVLINK_PARAM_GENERIC_ID_MAX,
@@ -384,6 +385,9 @@ enum devlink_param_generic_id {
 #define DEVLINK_PARAM_GENERIC_IGNORE_ARI_NAME "ignore_ari"
 #define DEVLINK_PARAM_GENERIC_IGNORE_ARI_TYPE DEVLINK_PARAM_TYPE_BOOL
 
+#define DEVLINK_PARAM_GENERIC_MSIX_VEC_PER_PF_MAX_NAME "msix_vec_per_pf_max"
+#define DEVLINK_PARAM_GENERIC_MSIX_VEC_PER_PF_MAX_TYPE DEVLINK_PARAM_TYPE_U32
+
 #define DEVLINK_PARAM_GENERIC(_id, _cmodes, _get, _set, _validate)     \
 {                                                                      \
        .id = DEVLINK_PARAM_GENERIC_ID_##_id,                           \
index 4a72fede11b453d8b24bf455fa9627c4269bf133..d7501a588ad2e65334302c4af7e29d5a29fb2773 100644 (file)
@@ -2682,6 +2682,11 @@ static const struct devlink_param devlink_param_generic[] = {
                .name = DEVLINK_PARAM_GENERIC_IGNORE_ARI_NAME,
                .type = DEVLINK_PARAM_GENERIC_IGNORE_ARI_TYPE,
        },
+       {
+               .id = DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MAX,
+               .name = DEVLINK_PARAM_GENERIC_MSIX_VEC_PER_PF_MAX_NAME,
+               .type = DEVLINK_PARAM_GENERIC_MSIX_VEC_PER_PF_MAX_TYPE,
+       },
 };
 
 static int devlink_param_generic_verify(const struct devlink_param *param)