* [PATCH v3 net-next 0/9] bnxt_en: devlink param updates
@ 2018-09-28 6:28 Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 1/9] devlink: Add generic parameter ignore_ari Vasundhara Volam
` (8 more replies)
0 siblings, 9 replies; 16+ messages in thread
From: Vasundhara Volam @ 2018-09-28 6:28 UTC (permalink / raw)
To: davem; +Cc: michael.chan, netdev, jiri, jakub.kicinski
This patchset adds support for 3 generic and 1 driver-specific devlink
parameters. Add documentation for these configuration parameters.
Also, this patchset adds support to return proper error code if
HWRM_NVM_GET/SET_VARIABLE commands return error code
HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED.
v2->v3:
-Remove description of generic parameters from devlink-params-bnxt.txt.
v1->v2:
-Remove hw_tc_offload parameter.
-Update all patches with Cc of MAINTAINERS.
-Add more description in commit message for device specific parameter.
-Add a new Documentation/networking/devlink-params.txt with some
generic devlink parameters information.
-Add a new Documentation/networking/devlink-params-bnxt.txt with devlink
parameters information that are supported by bnxt_en driver.
Vasundhara Volam (9):
devlink: Add generic parameter ignore_ari
devlink: Add generic parameter msix_vec_per_pf_max
devlink: Add generic parameter msix_vec_per_pf_min
bnxt_en: Use ignore_ari devlink parameter
bnxt_en: return proper error when FW returns
HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED
bnxt_en: Use msix_vec_per_pf_max and msix_vec_per_pf_min devlink
params.
bnxt_en: Add a driver specific gre_ver_check devlink parameter.
devlink: Add Documentation/networking/devlink-params.txt
devlink: Add Documentation/networking/devlink-params-bnxt.txt
Documentation/networking/devlink-params-bnxt.txt | 22 ++++++
Documentation/networking/devlink-params.txt | 42 +++++++++++
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 86 +++++++++++++++++++++--
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h | 8 +++
include/net/devlink.h | 12 ++++
net/core/devlink.c | 15 ++++
6 files changed, 181 insertions(+), 4 deletions(-)
create mode 100644 Documentation/networking/devlink-params-bnxt.txt
create mode 100644 Documentation/networking/devlink-params.txt
--
1.8.3.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v3 net-next 1/9] devlink: Add generic parameter ignore_ari
2018-09-28 6:28 [PATCH v3 net-next 0/9] bnxt_en: devlink param updates Vasundhara Volam
@ 2018-09-28 6:28 ` Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 2/9] devlink: Add generic parameter msix_vec_per_pf_max Vasundhara Volam
` (7 subsequent siblings)
8 siblings, 0 replies; 16+ messages in thread
From: Vasundhara Volam @ 2018-09-28 6:28 UTC (permalink / raw)
To: davem; +Cc: michael.chan, netdev, jiri, jakub.kicinski
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>
---
include/net/devlink.h | 4 ++++
net/core/devlink.c | 5 +++++
2 files changed, 9 insertions(+)
diff --git a/include/net/devlink.h b/include/net/devlink.h
index b9b89d6..90d8343 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -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, \
diff --git a/net/core/devlink.c b/net/core/devlink.c
index 8c0ed22..3349a4d 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -2675,6 +2675,11 @@ static int devlink_nl_cmd_reload(struct sk_buff *skb, struct genl_info *info)
.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)
--
1.8.3.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v3 net-next 2/9] devlink: Add generic parameter msix_vec_per_pf_max
2018-09-28 6:28 [PATCH v3 net-next 0/9] bnxt_en: devlink param updates Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 1/9] devlink: Add generic parameter ignore_ari Vasundhara Volam
@ 2018-09-28 6:28 ` Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 3/9] devlink: Add generic parameter msix_vec_per_pf_min Vasundhara Volam
` (6 subsequent siblings)
8 siblings, 0 replies; 16+ messages in thread
From: Vasundhara Volam @ 2018-09-28 6:28 UTC (permalink / raw)
To: davem; +Cc: michael.chan, netdev, jiri, jakub.kicinski
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>
---
include/net/devlink.h | 4 ++++
net/core/devlink.c | 5 +++++
2 files changed, 9 insertions(+)
diff --git a/include/net/devlink.h b/include/net/devlink.h
index 90d8343..59be17b 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -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, \
diff --git a/net/core/devlink.c b/net/core/devlink.c
index 3349a4d..ce9fe63 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -2680,6 +2680,11 @@ static int devlink_nl_cmd_reload(struct sk_buff *skb, struct genl_info *info)
.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)
--
1.8.3.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v3 net-next 3/9] devlink: Add generic parameter msix_vec_per_pf_min
2018-09-28 6:28 [PATCH v3 net-next 0/9] bnxt_en: devlink param updates Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 1/9] devlink: Add generic parameter ignore_ari Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 2/9] devlink: Add generic parameter msix_vec_per_pf_max Vasundhara Volam
@ 2018-09-28 6:28 ` Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 4/9] bnxt_en: Use ignore_ari devlink parameter Vasundhara Volam
` (5 subsequent siblings)
8 siblings, 0 replies; 16+ messages in thread
From: Vasundhara Volam @ 2018-09-28 6:28 UTC (permalink / raw)
To: davem; +Cc: michael.chan, netdev, jiri, jakub.kicinski
msix_vec_per_pf_min - This param sets the number of minimal MSIX
vectors required for the device initialization. This value is set
in the device which limits MSIX vectors 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>
---
include/net/devlink.h | 4 ++++
net/core/devlink.c | 5 +++++
2 files changed, 9 insertions(+)
diff --git a/include/net/devlink.h b/include/net/devlink.h
index 59be17b..361f525 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -364,6 +364,7 @@ enum devlink_param_generic_id {
DEVLINK_PARAM_GENERIC_ID_REGION_SNAPSHOT,
DEVLINK_PARAM_GENERIC_ID_IGNORE_ARI,
DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MAX,
+ DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MIN,
/* add new param generic ids above here*/
__DEVLINK_PARAM_GENERIC_ID_MAX,
@@ -388,6 +389,9 @@ enum devlink_param_generic_id {
#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_MSIX_VEC_PER_PF_MIN_NAME "msix_vec_per_pf_min"
+#define DEVLINK_PARAM_GENERIC_MSIX_VEC_PER_PF_MIN_TYPE DEVLINK_PARAM_TYPE_U32
+
#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 ce9fe63..25d3bfa 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -2685,6 +2685,11 @@ static int devlink_nl_cmd_reload(struct sk_buff *skb, struct genl_info *info)
.name = DEVLINK_PARAM_GENERIC_MSIX_VEC_PER_PF_MAX_NAME,
.type = DEVLINK_PARAM_GENERIC_MSIX_VEC_PER_PF_MAX_TYPE,
},
+ {
+ .id = DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MIN,
+ .name = DEVLINK_PARAM_GENERIC_MSIX_VEC_PER_PF_MIN_NAME,
+ .type = DEVLINK_PARAM_GENERIC_MSIX_VEC_PER_PF_MIN_TYPE,
+ },
};
static int devlink_param_generic_verify(const struct devlink_param *param)
--
1.8.3.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v3 net-next 4/9] bnxt_en: Use ignore_ari devlink parameter
2018-09-28 6:28 [PATCH v3 net-next 0/9] bnxt_en: devlink param updates Vasundhara Volam
` (2 preceding siblings ...)
2018-09-28 6:28 ` [PATCH v3 net-next 3/9] devlink: Add generic parameter msix_vec_per_pf_min Vasundhara Volam
@ 2018-09-28 6:28 ` Vasundhara Volam
2018-09-29 21:22 ` Or Gerlitz
2018-09-28 6:28 ` [PATCH v3 net-next 5/9] bnxt_en: return proper error when FW returns HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED Vasundhara Volam
` (4 subsequent siblings)
8 siblings, 1 reply; 16+ messages in thread
From: Vasundhara Volam @ 2018-09-28 6:28 UTC (permalink / raw)
To: davem; +Cc: michael.chan, netdev, jiri, jakub.kicinski
This patch adds support for ignore_ari generic permanent mode
devlink parameter. This parameter is disabled by default. It can be
enabled using devlink param commands.
ignore_ari - If enabled, 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: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 6 ++++++
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h | 2 ++
2 files changed, 8 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
index 790c684..5173881 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
@@ -24,6 +24,8 @@
static const struct bnxt_dl_nvm_param nvm_params[] = {
{DEVLINK_PARAM_GENERIC_ID_ENABLE_SRIOV, NVM_OFF_ENABLE_SRIOV,
BNXT_NVM_SHARED_CFG, 1},
+ {DEVLINK_PARAM_GENERIC_ID_IGNORE_ARI, NVM_OFF_IGNORE_ARI,
+ BNXT_NVM_SHARED_CFG, 1},
};
static int bnxt_hwrm_nvm_req(struct bnxt *bp, u32 param_id, void *msg,
@@ -108,6 +110,10 @@ static int bnxt_dl_nvm_param_set(struct devlink *dl, u32 id,
BIT(DEVLINK_PARAM_CMODE_PERMANENT),
bnxt_dl_nvm_param_get, bnxt_dl_nvm_param_set,
NULL),
+ DEVLINK_PARAM_GENERIC(IGNORE_ARI,
+ BIT(DEVLINK_PARAM_CMODE_PERMANENT),
+ bnxt_dl_nvm_param_get, bnxt_dl_nvm_param_set,
+ NULL),
};
int bnxt_dl_register(struct bnxt *bp)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
index 2f68dc0..da146492 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
@@ -33,6 +33,8 @@ static inline void bnxt_link_bp_to_dl(struct bnxt *bp, struct devlink *dl)
}
}
+#define NVM_OFF_IGNORE_ARI 164
+#define NVM_OFF_HW_TC_OFFLOAD 170
#define NVM_OFF_ENABLE_SRIOV 401
enum bnxt_nvm_dir_type {
--
1.8.3.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v3 net-next 5/9] bnxt_en: return proper error when FW returns HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED
2018-09-28 6:28 [PATCH v3 net-next 0/9] bnxt_en: devlink param updates Vasundhara Volam
` (3 preceding siblings ...)
2018-09-28 6:28 ` [PATCH v3 net-next 4/9] bnxt_en: Use ignore_ari devlink parameter Vasundhara Volam
@ 2018-09-28 6:28 ` Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 6/9] bnxt_en: Use msix_vec_per_pf_max and msix_vec_per_pf_min devlink params Vasundhara Volam
` (3 subsequent siblings)
8 siblings, 0 replies; 16+ messages in thread
From: Vasundhara Volam @ 2018-09-28 6:28 UTC (permalink / raw)
To: davem; +Cc: michael.chan, netdev, jiri, jakub.kicinski
Return proper error code when Firmware returns
HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED for HWRM_NVM_GET/SET_VARIABLE
commands.
Cc: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
index 5173881..dc566fd 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
@@ -80,8 +80,12 @@ static int bnxt_hwrm_nvm_req(struct bnxt *bp, u32 param_id, void *msg,
memcpy(buf, data_addr, bytesize);
dma_free_coherent(&bp->pdev->dev, bytesize, data_addr, data_dma_addr);
- if (rc)
+ if (rc == HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED) {
+ netdev_err(bp->dev, "PF does not have admin privileges to modify NVM config\n");
+ return -EACCES;
+ } else if (rc) {
return -EIO;
+ }
return 0;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v3 net-next 6/9] bnxt_en: Use msix_vec_per_pf_max and msix_vec_per_pf_min devlink params.
2018-09-28 6:28 [PATCH v3 net-next 0/9] bnxt_en: devlink param updates Vasundhara Volam
` (4 preceding siblings ...)
2018-09-28 6:28 ` [PATCH v3 net-next 5/9] bnxt_en: return proper error when FW returns HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED Vasundhara Volam
@ 2018-09-28 6:28 ` Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 7/9] bnxt_en: Add a driver specific gre_ver_check devlink parameter Vasundhara Volam
` (2 subsequent siblings)
8 siblings, 0 replies; 16+ messages in thread
From: Vasundhara Volam @ 2018-09-28 6:28 UTC (permalink / raw)
To: davem; +Cc: michael.chan, netdev, jiri, jakub.kicinski
This patch adds support for following generic permanent mode
devlink parameters. They can be modified using devlink param
commands.
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 limits MSIX vectors per PF.
msix_vec_per_pf_min - This param sets the number of minimal MSIX
vectors required for the device initialization. Value 0 indicates
a default value is selected. This value is set in the device which
limits MSIX vectors per PF.
Cc: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 50 ++++++++++++++++++++++-
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h | 5 +++
2 files changed, 53 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
index dc566fd..de7e74a 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
@@ -26,6 +26,10 @@
BNXT_NVM_SHARED_CFG, 1},
{DEVLINK_PARAM_GENERIC_ID_IGNORE_ARI, NVM_OFF_IGNORE_ARI,
BNXT_NVM_SHARED_CFG, 1},
+ {DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MAX,
+ NVM_OFF_MSIX_VEC_PER_PF_MAX, BNXT_NVM_SHARED_CFG, 10},
+ {DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MIN,
+ NVM_OFF_MSIX_VEC_PER_PF_MIN, BNXT_NVM_SHARED_CFG, 7},
};
static int bnxt_hwrm_nvm_req(struct bnxt *bp, u32 param_id, void *msg,
@@ -57,8 +61,22 @@ static int bnxt_hwrm_nvm_req(struct bnxt *bp, u32 param_id, void *msg,
idx = bp->pf.fw_fid - BNXT_FIRST_PF_FID;
bytesize = roundup(nvm_param.num_bits, BITS_PER_BYTE) / BITS_PER_BYTE;
- if (nvm_param.num_bits == 1)
- buf = &val->vbool;
+ switch (bytesize) {
+ case 1:
+ if (nvm_param.num_bits == 1)
+ buf = &val->vbool;
+ else
+ buf = &val->vu8;
+ break;
+ case 2:
+ buf = &val->vu16;
+ break;
+ case 4:
+ buf = &val->vu32;
+ break;
+ default:
+ return -EFAULT;
+ }
data_addr = dma_zalloc_coherent(&bp->pdev->dev, bytesize,
&data_dma_addr, GFP_KERNEL);
@@ -109,6 +127,26 @@ static int bnxt_dl_nvm_param_set(struct devlink *dl, u32 id,
return bnxt_hwrm_nvm_req(bp, id, &req, sizeof(req), &ctx->val);
}
+static int bnxt_dl_msix_validate(struct devlink *dl, u32 id,
+ union devlink_param_value val,
+ struct netlink_ext_ack *extack)
+{
+ int max_val;
+
+ if (id == DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MAX)
+ max_val = BNXT_MSIX_VEC_MAX;
+
+ if (id == DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MIN)
+ max_val = BNXT_MSIX_VEC_MIN_MAX;
+
+ if (val.vu32 < 0 || val.vu32 > max_val) {
+ NL_SET_ERR_MSG_MOD(extack, "MSIX value is exceeding the range");
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
static const struct devlink_param bnxt_dl_params[] = {
DEVLINK_PARAM_GENERIC(ENABLE_SRIOV,
BIT(DEVLINK_PARAM_CMODE_PERMANENT),
@@ -118,6 +156,14 @@ static int bnxt_dl_nvm_param_set(struct devlink *dl, u32 id,
BIT(DEVLINK_PARAM_CMODE_PERMANENT),
bnxt_dl_nvm_param_get, bnxt_dl_nvm_param_set,
NULL),
+ DEVLINK_PARAM_GENERIC(MSIX_VEC_PER_PF_MAX,
+ BIT(DEVLINK_PARAM_CMODE_PERMANENT),
+ bnxt_dl_nvm_param_get, bnxt_dl_nvm_param_set,
+ bnxt_dl_msix_validate),
+ DEVLINK_PARAM_GENERIC(MSIX_VEC_PER_PF_MIN,
+ BIT(DEVLINK_PARAM_CMODE_PERMANENT),
+ bnxt_dl_nvm_param_get, bnxt_dl_nvm_param_set,
+ bnxt_dl_msix_validate),
};
int bnxt_dl_register(struct bnxt *bp)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
index da146492..0e67c05 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
@@ -33,10 +33,15 @@ static inline void bnxt_link_bp_to_dl(struct bnxt *bp, struct devlink *dl)
}
}
+#define NVM_OFF_MSIX_VEC_PER_PF_MAX 108
+#define NVM_OFF_MSIX_VEC_PER_PF_MIN 114
#define NVM_OFF_IGNORE_ARI 164
#define NVM_OFF_HW_TC_OFFLOAD 170
#define NVM_OFF_ENABLE_SRIOV 401
+#define BNXT_MSIX_VEC_MAX 1280
+#define BNXT_MSIX_VEC_MIN_MAX 128
+
enum bnxt_nvm_dir_type {
BNXT_NVM_SHARED_CFG = 40,
BNXT_NVM_PORT_CFG,
--
1.8.3.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v3 net-next 7/9] bnxt_en: Add a driver specific gre_ver_check devlink parameter.
2018-09-28 6:28 [PATCH v3 net-next 0/9] bnxt_en: devlink param updates Vasundhara Volam
` (5 preceding siblings ...)
2018-09-28 6:28 ` [PATCH v3 net-next 6/9] bnxt_en: Use msix_vec_per_pf_max and msix_vec_per_pf_min devlink params Vasundhara Volam
@ 2018-09-28 6:28 ` Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 8/9] devlink: Add Documentation/networking/devlink-params.txt Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 9/9] devlink: Add Documentation/networking/devlink-params-bnxt.txt Vasundhara Volam
8 siblings, 0 replies; 16+ messages in thread
From: Vasundhara Volam @ 2018-09-28 6:28 UTC (permalink / raw)
To: davem; +Cc: michael.chan, netdev, jiri, jakub.kicinski
This patch adds following driver-specific permanent mode boolean
parameter.
gre_ver_check - Generic Routing Encapsulation(GRE) version check
will be enabled in the device. If disabled, device skips version
checking for GRE packets.
Cc: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 24 ++++++++++++++++++++++-
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h | 1 +
2 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
index de7e74a..8a10e01 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
@@ -21,6 +21,11 @@
#endif /* CONFIG_BNXT_SRIOV */
};
+enum bnxt_dl_param_id {
+ BNXT_DEVLINK_PARAM_ID_BASE = DEVLINK_PARAM_GENERIC_ID_MAX,
+ BNXT_DEVLINK_PARAM_ID_GRE_VER_CHECK,
+};
+
static const struct bnxt_dl_nvm_param nvm_params[] = {
{DEVLINK_PARAM_GENERIC_ID_ENABLE_SRIOV, NVM_OFF_ENABLE_SRIOV,
BNXT_NVM_SHARED_CFG, 1},
@@ -30,6 +35,8 @@
NVM_OFF_MSIX_VEC_PER_PF_MAX, BNXT_NVM_SHARED_CFG, 10},
{DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MIN,
NVM_OFF_MSIX_VEC_PER_PF_MIN, BNXT_NVM_SHARED_CFG, 7},
+ {BNXT_DEVLINK_PARAM_ID_GRE_VER_CHECK, NVM_OFF_DIS_GRE_VER_CHECK,
+ BNXT_NVM_SHARED_CFG, 1},
};
static int bnxt_hwrm_nvm_req(struct bnxt *bp, u32 param_id, void *msg,
@@ -112,9 +119,15 @@ static int bnxt_dl_nvm_param_get(struct devlink *dl, u32 id,
{
struct hwrm_nvm_get_variable_input req = {0};
struct bnxt *bp = bnxt_get_bp_from_dl(dl);
+ int rc;
bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_NVM_GET_VARIABLE, -1, -1);
- return bnxt_hwrm_nvm_req(bp, id, &req, sizeof(req), &ctx->val);
+ rc = bnxt_hwrm_nvm_req(bp, id, &req, sizeof(req), &ctx->val);
+ if (!rc)
+ if (id == BNXT_DEVLINK_PARAM_ID_GRE_VER_CHECK)
+ ctx->val.vbool = !ctx->val.vbool;
+
+ return rc;
}
static int bnxt_dl_nvm_param_set(struct devlink *dl, u32 id,
@@ -124,6 +137,10 @@ static int bnxt_dl_nvm_param_set(struct devlink *dl, u32 id,
struct bnxt *bp = bnxt_get_bp_from_dl(dl);
bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_NVM_SET_VARIABLE, -1, -1);
+
+ if (id == BNXT_DEVLINK_PARAM_ID_GRE_VER_CHECK)
+ ctx->val.vbool = !ctx->val.vbool;
+
return bnxt_hwrm_nvm_req(bp, id, &req, sizeof(req), &ctx->val);
}
@@ -164,6 +181,11 @@ static int bnxt_dl_msix_validate(struct devlink *dl, u32 id,
BIT(DEVLINK_PARAM_CMODE_PERMANENT),
bnxt_dl_nvm_param_get, bnxt_dl_nvm_param_set,
bnxt_dl_msix_validate),
+ DEVLINK_PARAM_DRIVER(BNXT_DEVLINK_PARAM_ID_GRE_VER_CHECK,
+ "gre_ver_check", DEVLINK_PARAM_TYPE_BOOL,
+ BIT(DEVLINK_PARAM_CMODE_PERMANENT),
+ bnxt_dl_nvm_param_get, bnxt_dl_nvm_param_set,
+ NULL),
};
int bnxt_dl_register(struct bnxt *bp)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
index 0e67c05..e36e41a 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
@@ -37,6 +37,7 @@ static inline void bnxt_link_bp_to_dl(struct bnxt *bp, struct devlink *dl)
#define NVM_OFF_MSIX_VEC_PER_PF_MIN 114
#define NVM_OFF_IGNORE_ARI 164
#define NVM_OFF_HW_TC_OFFLOAD 170
+#define NVM_OFF_DIS_GRE_VER_CHECK 171
#define NVM_OFF_ENABLE_SRIOV 401
#define BNXT_MSIX_VEC_MAX 1280
--
1.8.3.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v3 net-next 8/9] devlink: Add Documentation/networking/devlink-params.txt
2018-09-28 6:28 [PATCH v3 net-next 0/9] bnxt_en: devlink param updates Vasundhara Volam
` (6 preceding siblings ...)
2018-09-28 6:28 ` [PATCH v3 net-next 7/9] bnxt_en: Add a driver specific gre_ver_check devlink parameter Vasundhara Volam
@ 2018-09-28 6:28 ` Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 9/9] devlink: Add Documentation/networking/devlink-params-bnxt.txt Vasundhara Volam
8 siblings, 0 replies; 16+ messages in thread
From: Vasundhara Volam @ 2018-09-28 6:28 UTC (permalink / raw)
To: davem; +Cc: michael.chan, netdev, jiri, jakub.kicinski
This patch adds a new file to add information about some of the
generic configuration parameters set via devlink.
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Cc: Jiri Pirko <jiri@mellanox.com>
Cc: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
---
Documentation/networking/devlink-params.txt | 42 +++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100644 Documentation/networking/devlink-params.txt
diff --git a/Documentation/networking/devlink-params.txt b/Documentation/networking/devlink-params.txt
new file mode 100644
index 0000000..ae444ff
--- /dev/null
+++ b/Documentation/networking/devlink-params.txt
@@ -0,0 +1,42 @@
+Devlink configuration parameters
+================================
+Following is the list of configuration parameters via devlink interface.
+Each parameter can be generic or driver specific and are device level
+parameters.
+
+Note that the driver-specific files should contain the generic params
+they support to, with supported config modes.
+
+Each parameter can be set in different configuration modes:
+ runtime - set while driver is running, no reset required.
+ driverinit - applied while driver initializes, requires restart
+ driver by devlink reload command.
+ permanent - written to device's non-volatile memory, hard reset
+ required.
+
+Following is the list of parameters:
+====================================
+enable_sriov [DEVICE, GENERIC]
+ Enable Single Root I/O Virtualisation (SRIOV) in
+ the device.
+ Type: Boolean
+
+ignore_ari [DEVICE, GENERIC]
+ Ignore Alternative Routing-ID Interpretation (ARI)
+ capability. If enabled, adapter will ignore ARI
+ capability even when platforms has the support
+ enabled and creates same number of partitions when
+ platform does not support ARI.
+ Type: Boolean
+
+msix_vec_per_pf_max [DEVICE, GENERIC]
+ Provides the maximum number of MSIX interrupts that
+ a device can create. Value is same across all
+ physical functions (PFs) in the device.
+ Type: u32
+
+msix_vec_per_pf_min [DEVICE, GENERIC]
+ Provides the minimum number of MSIX interrupts required
+ for the device initialization. Value is same across all
+ physical functions (PFs) in the device.
+ Type: u32
--
1.8.3.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v3 net-next 9/9] devlink: Add Documentation/networking/devlink-params-bnxt.txt
2018-09-28 6:28 [PATCH v3 net-next 0/9] bnxt_en: devlink param updates Vasundhara Volam
` (7 preceding siblings ...)
2018-09-28 6:28 ` [PATCH v3 net-next 8/9] devlink: Add Documentation/networking/devlink-params.txt Vasundhara Volam
@ 2018-09-28 6:28 ` Vasundhara Volam
2018-09-29 12:53 ` Jiri Pirko
8 siblings, 1 reply; 16+ messages in thread
From: Vasundhara Volam @ 2018-09-28 6:28 UTC (permalink / raw)
To: davem; +Cc: michael.chan, netdev, jiri, jakub.kicinski
This patch adds a new file to add information about configuration
parameters that are supported by bnxt_en driver via devlink.
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Cc: Jiri Pirko <jiri@mellanox.com>
Cc: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
---
Documentation/networking/devlink-params-bnxt.txt | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 Documentation/networking/devlink-params-bnxt.txt
diff --git a/Documentation/networking/devlink-params-bnxt.txt b/Documentation/networking/devlink-params-bnxt.txt
new file mode 100644
index 0000000..c7bc9d8
--- /dev/null
+++ b/Documentation/networking/devlink-params-bnxt.txt
@@ -0,0 +1,22 @@
+enable_sriov [DEVICE, GENERIC]
+ Type: Boolean
+ Configuration mode: Permanent
+
+ignore_ari [DEVICE, GENERIC]
+ Type: Boolean
+ Configuration mode: Permanent
+
+msix_vec_per_pf_max [DEVICE, GENERIC]
+ Type: u32
+ Configuration mode: Permanent
+
+msix_vec_per_pf_min [DEVICE, GENERIC]
+ Type: u32
+ Configuration mode: Permanent
+
+gre_ver_check [DEVICE, DRIVER-SPECIFIC]
+ Generic Routing Encapsulation (GRE) version check will
+ be enabled in the device. If disabled, device skips
+ version checking for incoming packets.
+ Type: Boolean
+ Configuration mode: Permanent
--
1.8.3.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v3 net-next 9/9] devlink: Add Documentation/networking/devlink-params-bnxt.txt
2018-09-28 6:28 ` [PATCH v3 net-next 9/9] devlink: Add Documentation/networking/devlink-params-bnxt.txt Vasundhara Volam
@ 2018-09-29 12:53 ` Jiri Pirko
2018-10-01 4:04 ` Vasundhara Volam
0 siblings, 1 reply; 16+ messages in thread
From: Jiri Pirko @ 2018-09-29 12:53 UTC (permalink / raw)
To: Vasundhara Volam; +Cc: davem, michael.chan, netdev, jiri, jakub.kicinski
Fri, Sep 28, 2018 at 08:28:23AM CEST, vasundhara-v.volam@broadcom.com wrote:
>This patch adds a new file to add information about configuration
>parameters that are supported by bnxt_en driver via devlink.
>
>Cc: "David S. Miller" <davem@davemloft.net>
>Cc: Jonathan Corbet <corbet@lwn.net>
>Cc: linux-doc@vger.kernel.org
>Cc: Jiri Pirko <jiri@mellanox.com>
>Cc: Michael Chan <michael.chan@broadcom.com>
>Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
>---
> Documentation/networking/devlink-params-bnxt.txt | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
> create mode 100644 Documentation/networking/devlink-params-bnxt.txt
>
>diff --git a/Documentation/networking/devlink-params-bnxt.txt b/Documentation/networking/devlink-params-bnxt.txt
>new file mode 100644
>index 0000000..c7bc9d8
>--- /dev/null
>+++ b/Documentation/networking/devlink-params-bnxt.txt
>@@ -0,0 +1,22 @@
>+enable_sriov [DEVICE, GENERIC]
>+ Type: Boolean
No need to list "Type" here. You have it in devlink-params.txt for
generic params already.
>+ Configuration mode: Permanent
>+
>+ignore_ari [DEVICE, GENERIC]
>+ Type: Boolean
>+ Configuration mode: Permanent
>+
>+msix_vec_per_pf_max [DEVICE, GENERIC]
>+ Type: u32
>+ Configuration mode: Permanent
>+
>+msix_vec_per_pf_min [DEVICE, GENERIC]
>+ Type: u32
>+ Configuration mode: Permanent
>+
>+gre_ver_check [DEVICE, DRIVER-SPECIFIC]
>+ Generic Routing Encapsulation (GRE) version check will
>+ be enabled in the device. If disabled, device skips
>+ version checking for incoming packets.
>+ Type: Boolean
>+ Configuration mode: Permanent
>--
>1.8.3.1
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v3 net-next 4/9] bnxt_en: Use ignore_ari devlink parameter
2018-09-28 6:28 ` [PATCH v3 net-next 4/9] bnxt_en: Use ignore_ari devlink parameter Vasundhara Volam
@ 2018-09-29 21:22 ` Or Gerlitz
2018-10-01 4:09 ` Vasundhara Volam
0 siblings, 1 reply; 16+ messages in thread
From: Or Gerlitz @ 2018-09-29 21:22 UTC (permalink / raw)
To: vasundhara-v.volam
Cc: David Miller, Michael Chan, Linux Netdev List, Jiri Pirko,
Jakub Kicinski
On Fri, Sep 28, 2018 at 9:30 AM Vasundhara Volam
<vasundhara-v.volam@broadcom.com> wrote:
> This patch adds support for ignore_ari generic permanent mode
> devlink parameter. This parameter is disabled by default. It can be
> enabled using devlink param commands.
>
> ignore_ari - If enabled, 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.
why you want to ignore that?
>
> Cc: Michael Chan <michael.chan@broadcom.com>
> Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
> ---
> drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 6 ++++++
> drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h | 2 ++
> 2 files changed, 8 insertions(+)
>
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
> index 790c684..5173881 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
> @@ -24,6 +24,8 @@
> static const struct bnxt_dl_nvm_param nvm_params[] = {
> {DEVLINK_PARAM_GENERIC_ID_ENABLE_SRIOV, NVM_OFF_ENABLE_SRIOV,
> BNXT_NVM_SHARED_CFG, 1},
> + {DEVLINK_PARAM_GENERIC_ID_IGNORE_ARI, NVM_OFF_IGNORE_ARI,
> + BNXT_NVM_SHARED_CFG, 1},
> };
>
> static int bnxt_hwrm_nvm_req(struct bnxt *bp, u32 param_id, void *msg,
> @@ -108,6 +110,10 @@ static int bnxt_dl_nvm_param_set(struct devlink *dl, u32 id,
> BIT(DEVLINK_PARAM_CMODE_PERMANENT),
> bnxt_dl_nvm_param_get, bnxt_dl_nvm_param_set,
> NULL),
> + DEVLINK_PARAM_GENERIC(IGNORE_ARI,
> + BIT(DEVLINK_PARAM_CMODE_PERMANENT),
> + bnxt_dl_nvm_param_get, bnxt_dl_nvm_param_set,
> + NULL),
> };
>
> int bnxt_dl_register(struct bnxt *bp)
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
> index 2f68dc0..da146492 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
> @@ -33,6 +33,8 @@ static inline void bnxt_link_bp_to_dl(struct bnxt *bp, struct devlink *dl)
> }
> }
>
> +#define NVM_OFF_IGNORE_ARI 164
> +#define NVM_OFF_HW_TC_OFFLOAD 170
what is this (on/off for TC offloads?) and how it's related to ARI?
> #define NVM_OFF_ENABLE_SRIOV 401
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v3 net-next 9/9] devlink: Add Documentation/networking/devlink-params-bnxt.txt
2018-09-29 12:53 ` Jiri Pirko
@ 2018-10-01 4:04 ` Vasundhara Volam
2018-10-01 6:49 ` Jiri Pirko
0 siblings, 1 reply; 16+ messages in thread
From: Vasundhara Volam @ 2018-10-01 4:04 UTC (permalink / raw)
To: Jiří Pírko
Cc: David Miller, michael.chan@broadcom.com, Netdev, Jiri Pirko,
jakub.kicinski
On Sat, Sep 29, 2018 at 6:27 PM Jiri Pirko <jiri@resnulli.us> wrote:
>
> Fri, Sep 28, 2018 at 08:28:23AM CEST, vasundhara-v.volam@broadcom.com wrote:
> >This patch adds a new file to add information about configuration
> >parameters that are supported by bnxt_en driver via devlink.
> >
> >Cc: "David S. Miller" <davem@davemloft.net>
> >Cc: Jonathan Corbet <corbet@lwn.net>
> >Cc: linux-doc@vger.kernel.org
> >Cc: Jiri Pirko <jiri@mellanox.com>
> >Cc: Michael Chan <michael.chan@broadcom.com>
> >Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
> >---
> > Documentation/networking/devlink-params-bnxt.txt | 22 ++++++++++++++++++++++
> > 1 file changed, 22 insertions(+)
> > create mode 100644 Documentation/networking/devlink-params-bnxt.txt
> >
> >diff --git a/Documentation/networking/devlink-params-bnxt.txt b/Documentation/networking/devlink-params-bnxt.txt
> >new file mode 100644
> >index 0000000..c7bc9d8
> >--- /dev/null
> >+++ b/Documentation/networking/devlink-params-bnxt.txt
> >@@ -0,0 +1,22 @@
> >+enable_sriov [DEVICE, GENERIC]
> >+ Type: Boolean
>
> No need to list "Type" here. You have it in devlink-params.txt for
> generic params already.
Ok, I thought type will give clarity when configuration mode is listed and
when user checks out only driver specific readme file.
I can remove it in next version of patchset.
>
>
> >+ Configuration mode: Permanent
> >+
> >+ignore_ari [DEVICE, GENERIC]
> >+ Type: Boolean
> >+ Configuration mode: Permanent
> >+
> >+msix_vec_per_pf_max [DEVICE, GENERIC]
> >+ Type: u32
> >+ Configuration mode: Permanent
> >+
> >+msix_vec_per_pf_min [DEVICE, GENERIC]
> >+ Type: u32
> >+ Configuration mode: Permanent
> >+
> >+gre_ver_check [DEVICE, DRIVER-SPECIFIC]
> >+ Generic Routing Encapsulation (GRE) version check will
> >+ be enabled in the device. If disabled, device skips
> >+ version checking for incoming packets.
> >+ Type: Boolean
> >+ Configuration mode: Permanent
> >--
> >1.8.3.1
> >
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v3 net-next 4/9] bnxt_en: Use ignore_ari devlink parameter
2018-09-29 21:22 ` Or Gerlitz
@ 2018-10-01 4:09 ` Vasundhara Volam
0 siblings, 0 replies; 16+ messages in thread
From: Vasundhara Volam @ 2018-10-01 4:09 UTC (permalink / raw)
To: gerlitz.or
Cc: David Miller, michael.chan@broadcom.com, Netdev, Jiri Pirko,
jakub.kicinski
On Sun, Sep 30, 2018 at 2:53 AM Or Gerlitz <gerlitz.or@gmail.com> wrote:
>
> On Fri, Sep 28, 2018 at 9:30 AM Vasundhara Volam
> <vasundhara-v.volam@broadcom.com> wrote:
> > This patch adds support for ignore_ari generic permanent mode
> > devlink parameter. This parameter is disabled by default. It can be
> > enabled using devlink param commands.
> >
> > ignore_ari - If enabled, 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.
>
> why you want to ignore that?
In some Dell platforms, we don't want our adapter to create more number of
functions even when ARI is enabled.
>
>
> >
> > Cc: Michael Chan <michael.chan@broadcom.com>
> > Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
> > ---
> > drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 6 ++++++
> > drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h | 2 ++
> > 2 files changed, 8 insertions(+)
> >
> > diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
> > index 790c684..5173881 100644
> > --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
> > +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
> > @@ -24,6 +24,8 @@
> > static const struct bnxt_dl_nvm_param nvm_params[] = {
> > {DEVLINK_PARAM_GENERIC_ID_ENABLE_SRIOV, NVM_OFF_ENABLE_SRIOV,
> > BNXT_NVM_SHARED_CFG, 1},
> > + {DEVLINK_PARAM_GENERIC_ID_IGNORE_ARI, NVM_OFF_IGNORE_ARI,
> > + BNXT_NVM_SHARED_CFG, 1},
> > };
> >
> > static int bnxt_hwrm_nvm_req(struct bnxt *bp, u32 param_id, void *msg,
> > @@ -108,6 +110,10 @@ static int bnxt_dl_nvm_param_set(struct devlink *dl, u32 id,
> > BIT(DEVLINK_PARAM_CMODE_PERMANENT),
> > bnxt_dl_nvm_param_get, bnxt_dl_nvm_param_set,
> > NULL),
> > + DEVLINK_PARAM_GENERIC(IGNORE_ARI,
> > + BIT(DEVLINK_PARAM_CMODE_PERMANENT),
> > + bnxt_dl_nvm_param_get, bnxt_dl_nvm_param_set,
> > + NULL),
> > };
> >
> > int bnxt_dl_register(struct bnxt *bp)
> > diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
> > index 2f68dc0..da146492 100644
> > --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
> > +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
> > @@ -33,6 +33,8 @@ static inline void bnxt_link_bp_to_dl(struct bnxt *bp, struct devlink *dl)
> > }
> > }
> >
> > +#define NVM_OFF_IGNORE_ARI 164
>
> > +#define NVM_OFF_HW_TC_OFFLOAD 170
>
> what is this (on/off for TC offloads?) and how it's related to ARI?
This was a mistake carried, I will remove it in next version. Thanks
>
> > #define NVM_OFF_ENABLE_SRIOV 401
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v3 net-next 9/9] devlink: Add Documentation/networking/devlink-params-bnxt.txt
2018-10-01 4:04 ` Vasundhara Volam
@ 2018-10-01 6:49 ` Jiri Pirko
2018-10-01 6:57 ` Vasundhara Volam
0 siblings, 1 reply; 16+ messages in thread
From: Jiri Pirko @ 2018-10-01 6:49 UTC (permalink / raw)
To: Vasundhara Volam
Cc: David Miller, michael.chan@broadcom.com, Netdev, Jiri Pirko,
jakub.kicinski
Mon, Oct 01, 2018 at 06:04:08AM CEST, vasundhara-v.volam@broadcom.com wrote:
>On Sat, Sep 29, 2018 at 6:27 PM Jiri Pirko <jiri@resnulli.us> wrote:
>>
>> Fri, Sep 28, 2018 at 08:28:23AM CEST, vasundhara-v.volam@broadcom.com wrote:
>> >This patch adds a new file to add information about configuration
>> >parameters that are supported by bnxt_en driver via devlink.
>> >
>> >Cc: "David S. Miller" <davem@davemloft.net>
>> >Cc: Jonathan Corbet <corbet@lwn.net>
>> >Cc: linux-doc@vger.kernel.org
>> >Cc: Jiri Pirko <jiri@mellanox.com>
>> >Cc: Michael Chan <michael.chan@broadcom.com>
>> >Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
>> >---
>> > Documentation/networking/devlink-params-bnxt.txt | 22 ++++++++++++++++++++++
>> > 1 file changed, 22 insertions(+)
>> > create mode 100644 Documentation/networking/devlink-params-bnxt.txt
>> >
>> >diff --git a/Documentation/networking/devlink-params-bnxt.txt b/Documentation/networking/devlink-params-bnxt.txt
>> >new file mode 100644
>> >index 0000000..c7bc9d8
>> >--- /dev/null
>> >+++ b/Documentation/networking/devlink-params-bnxt.txt
>> >@@ -0,0 +1,22 @@
>> >+enable_sriov [DEVICE, GENERIC]
>> >+ Type: Boolean
>>
>> No need to list "Type" here. You have it in devlink-params.txt for
>> generic params already.
>Ok, I thought type will give clarity when configuration mode is listed and
>when user checks out only driver specific readme file.
>I can remove it in next version of patchset.
Yes please. The thing is, once this info is on 2 places, I'm pretty sure
what eventually there would be different types on different places.
Leaving the type only on one place reduces need for sync.
Thanks.
>>
>>
>> >+ Configuration mode: Permanent
>> >+
>> >+ignore_ari [DEVICE, GENERIC]
>> >+ Type: Boolean
>> >+ Configuration mode: Permanent
>> >+
>> >+msix_vec_per_pf_max [DEVICE, GENERIC]
>> >+ Type: u32
>> >+ Configuration mode: Permanent
>> >+
>> >+msix_vec_per_pf_min [DEVICE, GENERIC]
>> >+ Type: u32
>> >+ Configuration mode: Permanent
>> >+
>> >+gre_ver_check [DEVICE, DRIVER-SPECIFIC]
>> >+ Generic Routing Encapsulation (GRE) version check will
>> >+ be enabled in the device. If disabled, device skips
>> >+ version checking for incoming packets.
>> >+ Type: Boolean
>> >+ Configuration mode: Permanent
>> >--
>> >1.8.3.1
>> >
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v3 net-next 9/9] devlink: Add Documentation/networking/devlink-params-bnxt.txt
2018-10-01 6:49 ` Jiri Pirko
@ 2018-10-01 6:57 ` Vasundhara Volam
0 siblings, 0 replies; 16+ messages in thread
From: Vasundhara Volam @ 2018-10-01 6:57 UTC (permalink / raw)
To: Jiří Pírko
Cc: David Miller, michael.chan@broadcom.com, Netdev, Jiri Pirko,
jakub.kicinski
On Mon, Oct 1, 2018 at 12:24 PM Jiri Pirko <jiri@resnulli.us> wrote:
>
> Mon, Oct 01, 2018 at 06:04:08AM CEST, vasundhara-v.volam@broadcom.com wrote:
> >On Sat, Sep 29, 2018 at 6:27 PM Jiri Pirko <jiri@resnulli.us> wrote:
> >>
> >> Fri, Sep 28, 2018 at 08:28:23AM CEST, vasundhara-v.volam@broadcom.com wrote:
> >> >This patch adds a new file to add information about configuration
> >> >parameters that are supported by bnxt_en driver via devlink.
> >> >
> >> >Cc: "David S. Miller" <davem@davemloft.net>
> >> >Cc: Jonathan Corbet <corbet@lwn.net>
> >> >Cc: linux-doc@vger.kernel.org
> >> >Cc: Jiri Pirko <jiri@mellanox.com>
> >> >Cc: Michael Chan <michael.chan@broadcom.com>
> >> >Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
> >> >---
> >> > Documentation/networking/devlink-params-bnxt.txt | 22 ++++++++++++++++++++++
> >> > 1 file changed, 22 insertions(+)
> >> > create mode 100644 Documentation/networking/devlink-params-bnxt.txt
> >> >
> >> >diff --git a/Documentation/networking/devlink-params-bnxt.txt b/Documentation/networking/devlink-params-bnxt.txt
> >> >new file mode 100644
> >> >index 0000000..c7bc9d8
> >> >--- /dev/null
> >> >+++ b/Documentation/networking/devlink-params-bnxt.txt
> >> >@@ -0,0 +1,22 @@
> >> >+enable_sriov [DEVICE, GENERIC]
> >> >+ Type: Boolean
> >>
> >> No need to list "Type" here. You have it in devlink-params.txt for
> >> generic params already.
> >Ok, I thought type will give clarity when configuration mode is listed and
> >when user checks out only driver specific readme file.
> >I can remove it in next version of patchset.
>
> Yes please. The thing is, once this info is on 2 places, I'm pretty sure
> what eventually there would be different types on different places.
> Leaving the type only on one place reduces need for sync.
>
> Thanks.
Okay, got it. Thanks, I will remove it.
>
> >>
> >>
> >> >+ Configuration mode: Permanent
> >> >+
> >> >+ignore_ari [DEVICE, GENERIC]
> >> >+ Type: Boolean
> >> >+ Configuration mode: Permanent
> >> >+
> >> >+msix_vec_per_pf_max [DEVICE, GENERIC]
> >> >+ Type: u32
> >> >+ Configuration mode: Permanent
> >> >+
> >> >+msix_vec_per_pf_min [DEVICE, GENERIC]
> >> >+ Type: u32
> >> >+ Configuration mode: Permanent
> >> >+
> >> >+gre_ver_check [DEVICE, DRIVER-SPECIFIC]
> >> >+ Generic Routing Encapsulation (GRE) version check will
> >> >+ be enabled in the device. If disabled, device skips
> >> >+ version checking for incoming packets.
> >> >+ Type: Boolean
> >> >+ Configuration mode: Permanent
> >> >--
> >> >1.8.3.1
> >> >
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2018-10-01 13:34 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-28 6:28 [PATCH v3 net-next 0/9] bnxt_en: devlink param updates Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 1/9] devlink: Add generic parameter ignore_ari Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 2/9] devlink: Add generic parameter msix_vec_per_pf_max Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 3/9] devlink: Add generic parameter msix_vec_per_pf_min Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 4/9] bnxt_en: Use ignore_ari devlink parameter Vasundhara Volam
2018-09-29 21:22 ` Or Gerlitz
2018-10-01 4:09 ` Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 5/9] bnxt_en: return proper error when FW returns HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 6/9] bnxt_en: Use msix_vec_per_pf_max and msix_vec_per_pf_min devlink params Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 7/9] bnxt_en: Add a driver specific gre_ver_check devlink parameter Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 8/9] devlink: Add Documentation/networking/devlink-params.txt Vasundhara Volam
2018-09-28 6:28 ` [PATCH v3 net-next 9/9] devlink: Add Documentation/networking/devlink-params-bnxt.txt Vasundhara Volam
2018-09-29 12:53 ` Jiri Pirko
2018-10-01 4:04 ` Vasundhara Volam
2018-10-01 6:49 ` Jiri Pirko
2018-10-01 6:57 ` Vasundhara Volam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox