* [dpdk-dev] [PATCH 0/9] bnxt PMD fixes
@ 2021-05-31 7:26 Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 1/9] net/bnxt: fix error message when VNIC prepare fails Kalesh A P
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: Kalesh A P @ 2021-05-31 7:26 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit, ajit.khaparde
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Kalesh AP (9):
net/bnxt: fix error message when VNIC prepare fails
net/bnxt: set flow error when free filter is not available
net/bnxt: remove unnecessary code
net/bnxt: fix error handling when VNIC prepare fails
net/bnxt: set flow error when tunnel redirection free fails
net/bnxt: use common function to destroy VNIC resource
net/bnxt: fix check for PTP support in FW
net/bnxt: improve log message
net/bnxt: remove unnecessary comment
drivers/net/bnxt/bnxt_ethdev.c | 6 +--
drivers/net/bnxt/bnxt_flow.c | 116 +++++++++++++++++++++++++----------------
drivers/net/bnxt/bnxt_hwrm.c | 10 ++--
3 files changed, 81 insertions(+), 51 deletions(-)
--
2.10.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 1/9] net/bnxt: fix error message when VNIC prepare fails
2021-05-31 7:26 [dpdk-dev] [PATCH 0/9] bnxt PMD fixes Kalesh A P
@ 2021-05-31 7:26 ` Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 2/9] net/bnxt: set flow error when free filter is not available Kalesh A P
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Kalesh A P @ 2021-05-31 7:26 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit, ajit.khaparde
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
The bnxt_vnic_prep() can fail due to multiple reasons.
But when bnxt_vnic_prep() fails, PMD is not returning
the actual error/string to the application.
Fix it by moving the "rte_flow_error_set" to bnxt_vnic_prep()
to set the actual error code.
Fixes: d24610f7bfda ("net/bnxt: allow flow creation when RSS is enabled")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
---
drivers/net/bnxt/bnxt_flow.c | 66 +++++++++++++++++++++++++++-----------------
1 file changed, 40 insertions(+), 26 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 73fd24c..66012b8 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -919,32 +919,46 @@ bnxt_get_l2_filter(struct bnxt *bp, struct bnxt_filter_info *nf,
return l2_filter;
}
-static int bnxt_vnic_prep(struct bnxt *bp, struct bnxt_vnic_info *vnic)
+static int bnxt_vnic_prep(struct bnxt *bp, struct bnxt_vnic_info *vnic,
+ const struct rte_flow_action *act,
+ struct rte_flow_error *error)
{
struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf;
uint64_t rx_offloads = dev_conf->rxmode.offloads;
int rc;
if (bp->nr_vnics > bp->max_vnics - 1)
- return -ENOMEM;
+ return rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ATTR_GROUP,
+ NULL,
+ "Group id is invalid");
rc = bnxt_vnic_grp_alloc(bp, vnic);
if (rc)
- goto ret;
+ return rte_flow_error_set(error, -rc,
+ RTE_FLOW_ERROR_TYPE_ACTION,
+ act,
+ "Failed to alloc VNIC group");
rc = bnxt_hwrm_vnic_alloc(bp, vnic);
if (rc) {
- PMD_DRV_LOG(ERR, "HWRM vnic alloc failure rc: %x\n", rc);
+ rte_flow_error_set(error, -rc,
+ RTE_FLOW_ERROR_TYPE_ACTION,
+ act,
+ "Failed to alloc VNIC");
goto ret;
}
+
bp->nr_vnics++;
/* RSS context is required only when there is more than one RSS ring */
if (vnic->rx_queue_cnt > 1) {
rc = bnxt_hwrm_vnic_ctx_alloc(bp, vnic, 0 /* ctx_idx 0 */);
if (rc) {
- PMD_DRV_LOG(ERR,
- "HWRM vnic ctx alloc failure: %x\n", rc);
+ rte_flow_error_set(error, -rc,
+ RTE_FLOW_ERROR_TYPE_ACTION,
+ act,
+ "Failed to alloc VNIC context");
goto ret;
}
} else {
@@ -957,10 +971,24 @@ static int bnxt_vnic_prep(struct bnxt *bp, struct bnxt_vnic_info *vnic)
vnic->vlan_strip = false;
rc = bnxt_hwrm_vnic_cfg(bp, vnic);
- if (rc)
+ if (rc) {
+ rte_flow_error_set(error, -rc,
+ RTE_FLOW_ERROR_TYPE_ACTION,
+ act,
+ "Failed to configure VNIC");
goto ret;
+ }
- bnxt_hwrm_vnic_plcmode_cfg(bp, vnic);
+ rc = bnxt_hwrm_vnic_plcmode_cfg(bp, vnic);
+ if (rc) {
+ rte_flow_error_set(error, -rc,
+ RTE_FLOW_ERROR_TYPE_ACTION,
+ act,
+ "Failed to configure VNIC plcmode");
+ goto ret;
+ }
+
+ return 0;
ret:
return rc;
@@ -1142,16 +1170,9 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
PMD_DRV_LOG(DEBUG, "VNIC found\n");
- rc = bnxt_vnic_prep(bp, vnic);
- if (rc) {
- rte_flow_error_set(error,
- EINVAL,
- RTE_FLOW_ERROR_TYPE_ACTION,
- act,
- "VNIC prep fail");
- rc = -rte_errno;
+ rc = bnxt_vnic_prep(bp, vnic, act, error);
+ if (rc)
goto ret;
- }
PMD_DRV_LOG(DEBUG,
"vnic[%d] = %p vnic->fw_grp_ids = %p\n",
@@ -1362,16 +1383,9 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
vnic->end_grp_id = rss->queue[rss->queue_num - 1];
vnic->func_default = 0; //This is not a default VNIC.
- rc = bnxt_vnic_prep(bp, vnic);
- if (rc) {
- rte_flow_error_set(error,
- EINVAL,
- RTE_FLOW_ERROR_TYPE_ACTION,
- act,
- "VNIC prep fail");
- rc = -rte_errno;
+ rc = bnxt_vnic_prep(bp, vnic, act, error);
+ if (rc)
goto ret;
- }
PMD_DRV_LOG(DEBUG,
"vnic[%d] = %p vnic->fw_grp_ids = %p\n",
--
2.10.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 2/9] net/bnxt: set flow error when free filter is not available
2021-05-31 7:26 [dpdk-dev] [PATCH 0/9] bnxt PMD fixes Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 1/9] net/bnxt: fix error message when VNIC prepare fails Kalesh A P
@ 2021-05-31 7:26 ` Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 3/9] net/bnxt: remove unnecessary code Kalesh A P
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Kalesh A P @ 2021-05-31 7:26 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit, ajit.khaparde
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
In bnxt_flow_validate(), when bnxt_get_unused_filter() fails due to
no filter resources available, driver is not setting flow error using
"rte_flow_error_set".
Also, fixed the error code.
Fixes: 5ef3b79fdfe6 ("net/bnxt: support flow filter ops")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_flow.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 66012b8..9b47807 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1550,9 +1550,11 @@ bnxt_flow_validate(struct rte_eth_dev *dev,
filter = bnxt_get_unused_filter(bp);
if (filter == NULL) {
- PMD_DRV_LOG(ERR, "Not enough resources for a new flow.\n");
+ rte_flow_error_set(error, ENOSPC,
+ RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+ "Not enough resources for a new flow");
bnxt_release_flow_lock(bp);
- return -ENOMEM;
+ return -ENOSPC;
}
ret = bnxt_validate_and_parse_flow(dev, pattern, actions, attr,
--
2.10.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 3/9] net/bnxt: remove unnecessary code
2021-05-31 7:26 [dpdk-dev] [PATCH 0/9] bnxt PMD fixes Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 1/9] net/bnxt: fix error message when VNIC prepare fails Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 2/9] net/bnxt: set flow error when free filter is not available Kalesh A P
@ 2021-05-31 7:26 ` Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 4/9] net/bnxt: fix error handling when VNIC prepare fails Kalesh A P
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Kalesh A P @ 2021-05-31 7:26 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit, ajit.khaparde
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Also removed a log message which does not convey any
useful information.
Fixes: d24610f7bfda ("net/bnxt: allow flow creation when RSS is enabled")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_flow.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 9b47807..d23f8cf 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -953,7 +953,7 @@ static int bnxt_vnic_prep(struct bnxt *bp, struct bnxt_vnic_info *vnic,
/* RSS context is required only when there is more than one RSS ring */
if (vnic->rx_queue_cnt > 1) {
- rc = bnxt_hwrm_vnic_ctx_alloc(bp, vnic, 0 /* ctx_idx 0 */);
+ rc = bnxt_hwrm_vnic_ctx_alloc(bp, vnic, 0);
if (rc) {
rte_flow_error_set(error, -rc,
RTE_FLOW_ERROR_TYPE_ACTION,
@@ -961,8 +961,6 @@ static int bnxt_vnic_prep(struct bnxt *bp, struct bnxt_vnic_info *vnic,
"Failed to alloc VNIC context");
goto ret;
}
- } else {
- PMD_DRV_LOG(DEBUG, "No RSS context required\n");
}
if (rx_offloads & DEV_RX_OFFLOAD_VLAN_STRIP)
--
2.10.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 4/9] net/bnxt: fix error handling when VNIC prepare fails
2021-05-31 7:26 [dpdk-dev] [PATCH 0/9] bnxt PMD fixes Kalesh A P
` (2 preceding siblings ...)
2021-05-31 7:26 ` [dpdk-dev] [PATCH 3/9] net/bnxt: remove unnecessary code Kalesh A P
@ 2021-05-31 7:26 ` Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 5/9] net/bnxt: set flow error when tunnel redirection free fails Kalesh A P
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Kalesh A P @ 2021-05-31 7:26 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit, ajit.khaparde
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Resources should be freed on error conditions. i.e, VNIC and
VNIC context created in HW and memory allocated in
bnxt_vnic_grp_alloc() should be freed.
Added a new function bnxt_vnic_destroy() to do the cleanup.
This lightweight function can be used in flow destroy/flush
path to avoid duplicate code as well.
Fixes: d24610f7bfda ("net/bnxt: allow flow creation when RSS is enabled")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_flow.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index d23f8cf..03c7173 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -919,6 +919,19 @@ bnxt_get_l2_filter(struct bnxt *bp, struct bnxt_filter_info *nf,
return l2_filter;
}
+static void bnxt_vnic_cleanup(struct bnxt *bp, struct bnxt_vnic_info *vnic)
+{
+ if (vnic->rx_queue_cnt > 1)
+ bnxt_hwrm_vnic_ctx_free(bp, vnic);
+
+ bnxt_hwrm_vnic_free(bp, vnic);
+
+ rte_free(vnic->fw_grp_ids);
+ vnic->fw_grp_ids = NULL;
+
+ vnic->rx_queue_cnt = 0;
+}
+
static int bnxt_vnic_prep(struct bnxt *bp, struct bnxt_vnic_info *vnic,
const struct rte_flow_action *act,
struct rte_flow_error *error)
@@ -949,8 +962,6 @@ static int bnxt_vnic_prep(struct bnxt *bp, struct bnxt_vnic_info *vnic,
goto ret;
}
- bp->nr_vnics++;
-
/* RSS context is required only when there is more than one RSS ring */
if (vnic->rx_queue_cnt > 1) {
rc = bnxt_hwrm_vnic_ctx_alloc(bp, vnic, 0);
@@ -986,9 +997,12 @@ static int bnxt_vnic_prep(struct bnxt *bp, struct bnxt_vnic_info *vnic,
goto ret;
}
+ bp->nr_vnics++;
+
return 0;
ret:
+ bnxt_vnic_cleanup(bp, vnic);
return rc;
}
--
2.10.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 5/9] net/bnxt: set flow error when tunnel redirection free fails
2021-05-31 7:26 [dpdk-dev] [PATCH 0/9] bnxt PMD fixes Kalesh A P
` (3 preceding siblings ...)
2021-05-31 7:26 ` [dpdk-dev] [PATCH 4/9] net/bnxt: fix error handling when VNIC prepare fails Kalesh A P
@ 2021-05-31 7:26 ` Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 6/9] net/bnxt: use common function to destroy VNIC resource Kalesh A P
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Kalesh A P @ 2021-05-31 7:26 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit, ajit.khaparde
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
During flow destroy, when bnxt_hwrm_tunnel_redirect_free() fails,
driver is not setting flow error using "rte_flow_error_set".
Fixes: 11e5e19695c7 ("net/bnxt: support redirecting tunnel packets to VF")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_flow.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 03c7173..ed201a3 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1969,12 +1969,20 @@ static int bnxt_handle_tunnel_redirect_destroy(struct bnxt *bp,
/* Tunnel doesn't belong to this VF, so don't send HWRM
* cmd, just delete the flow from driver
*/
- if (bp->fw_fid != (tun_dst_fid + bp->first_vf_id))
+ if (bp->fw_fid != (tun_dst_fid + bp->first_vf_id)) {
PMD_DRV_LOG(ERR,
"Tunnel does not belong to this VF, skip hwrm_tunnel_redirect_free\n");
- else
+ } else {
ret = bnxt_hwrm_tunnel_redirect_free(bp,
filter->tunnel_type);
+ if (ret) {
+ rte_flow_error_set(error, -ret,
+ RTE_FLOW_ERROR_TYPE_HANDLE,
+ NULL,
+ "Unable to free tunnel redirection");
+ return ret;
+ }
+ }
}
return ret;
}
--
2.10.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 6/9] net/bnxt: use common function to destroy VNIC resource
2021-05-31 7:26 [dpdk-dev] [PATCH 0/9] bnxt PMD fixes Kalesh A P
` (4 preceding siblings ...)
2021-05-31 7:26 ` [dpdk-dev] [PATCH 5/9] net/bnxt: set flow error when tunnel redirection free fails Kalesh A P
@ 2021-05-31 7:26 ` Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 7/9] net/bnxt: fix check for PTP support in FW Kalesh A P
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Kalesh A P @ 2021-05-31 7:26 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit, ajit.khaparde
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Use the function bnxt_vnic_destroy() to destroy VNIC resources
and thereby eliminate few duplicate code.
Fixes: 8d0a244b40b2 ("net/bnxt: cleanup VNIC after flow validate")
Fixes: 49d0709b257f ("net/bnxt: delete and flush L2 filters cleanly")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_flow.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index ed201a3..59489b5 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1577,10 +1577,7 @@ bnxt_flow_validate(struct rte_eth_dev *dev,
vnic = find_matching_vnic(bp, filter);
if (vnic) {
if (STAILQ_EMPTY(&vnic->filter)) {
- rte_free(vnic->fw_grp_ids);
- bnxt_hwrm_vnic_ctx_free(bp, vnic);
- bnxt_hwrm_vnic_free(bp, vnic);
- vnic->rx_queue_cnt = 0;
+ bnxt_vnic_cleanup(bp, vnic);
bp->nr_vnics--;
PMD_DRV_LOG(DEBUG, "Free VNIC\n");
}
@@ -2045,12 +2042,7 @@ _bnxt_flow_destroy(struct bnxt *bp,
*/
if (vnic && !vnic->func_default &&
STAILQ_EMPTY(&vnic->flow_list)) {
- rte_free(vnic->fw_grp_ids);
- if (vnic->rx_queue_cnt > 1)
- bnxt_hwrm_vnic_ctx_free(bp, vnic);
-
- bnxt_hwrm_vnic_free(bp, vnic);
- vnic->rx_queue_cnt = 0;
+ bnxt_vnic_cleanup(bp, vnic);
bp->nr_vnics--;
}
} else {
--
2.10.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 7/9] net/bnxt: fix check for PTP support in FW
2021-05-31 7:26 [dpdk-dev] [PATCH 0/9] bnxt PMD fixes Kalesh A P
` (5 preceding siblings ...)
2021-05-31 7:26 ` [dpdk-dev] [PATCH 6/9] net/bnxt: use common function to destroy VNIC resource Kalesh A P
@ 2021-05-31 7:26 ` Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 8/9] net/bnxt: improve log message Kalesh A P
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Kalesh A P @ 2021-05-31 7:26 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit, ajit.khaparde
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
On Thor, driver must use HWRM to access the timestamp information.
Driver should not advertise PTP support to application
if PTP information is not accessible via HWRM commands.
Fixes: 6cbd89f9f3d8 ("net/bnxt: support PTP for Thor")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 931ecea..65ab8fc 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -750,9 +750,13 @@ static int bnxt_hwrm_ptp_qcfg(struct bnxt *bp)
HWRM_CHECK_RESULT();
- if (!BNXT_CHIP_P5(bp) &&
- !(resp->flags & HWRM_PORT_MAC_PTP_QCFG_OUTPUT_FLAGS_DIRECT_ACCESS))
- return 0;
+ if (BNXT_CHIP_P5(bp)) {
+ if (!(resp->flags & HWRM_PORT_MAC_PTP_QCFG_OUTPUT_FLAGS_HWRM_ACCESS))
+ return 0;
+ } else {
+ if (!(resp->flags & HWRM_PORT_MAC_PTP_QCFG_OUTPUT_FLAGS_DIRECT_ACCESS))
+ return 0;
+ }
if (resp->flags & HWRM_PORT_MAC_PTP_QCFG_OUTPUT_FLAGS_ONE_STEP_TX_TS)
bp->flags |= BNXT_FLAG_FW_CAP_ONE_STEP_TX_TS;
--
2.10.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 8/9] net/bnxt: improve log message
2021-05-31 7:26 [dpdk-dev] [PATCH 0/9] bnxt PMD fixes Kalesh A P
` (6 preceding siblings ...)
2021-05-31 7:26 ` [dpdk-dev] [PATCH 7/9] net/bnxt: fix check for PTP support in FW Kalesh A P
@ 2021-05-31 7:26 ` Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 9/9] net/bnxt: remove unnecessary comment Kalesh A P
2021-06-08 23:07 ` [dpdk-dev] [PATCH 0/9] bnxt PMD fixes Ajit Khaparde
9 siblings, 0 replies; 11+ messages in thread
From: Kalesh A P @ 2021-05-31 7:26 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit, ajit.khaparde
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
The existing log messge is missing a space. Modified it to
a more meaningful log as part of this change.
Fixes: 1bf01f5135f8 ("net/bnxt: prevent device access when device is in reset")
Cc: stable@dpdk.org
Before this patch:
bnxt_dev_init(): bnxtfound at mem D67E0000, node addr 0x2101112000M
With this patch:
bnxt_dev_init(): Found bnxt device at mem D67E0000, node addr 0x2101112000M
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 3778e28..50a49f9 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -5709,7 +5709,8 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
goto error_free;
PMD_DRV_LOG(INFO,
- DRV_MODULE_NAME "found at mem %" PRIX64 ", node addr %pM\n",
+ "Found %s device at mem %" PRIX64 ", node addr %pM\n",
+ DRV_MODULE_NAME,
pci_dev->mem_resource[0].phys_addr,
pci_dev->mem_resource[0].addr);
--
2.10.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-dev] [PATCH 9/9] net/bnxt: remove unnecessary comment
2021-05-31 7:26 [dpdk-dev] [PATCH 0/9] bnxt PMD fixes Kalesh A P
` (7 preceding siblings ...)
2021-05-31 7:26 ` [dpdk-dev] [PATCH 8/9] net/bnxt: improve log message Kalesh A P
@ 2021-05-31 7:26 ` Kalesh A P
2021-06-08 23:07 ` [dpdk-dev] [PATCH 0/9] bnxt PMD fixes Ajit Khaparde
9 siblings, 0 replies; 11+ messages in thread
From: Kalesh A P @ 2021-05-31 7:26 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit, ajit.khaparde
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Fixes: 0a6d2a720078 ("net/bnxt: get device infos")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 50a49f9..982f374 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -948,7 +948,6 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
dev_info->speed_capa = bnxt_get_speed_capabilities(bp);
- /* *INDENT-OFF* */
dev_info->default_rxconf = (struct rte_eth_rxconf) {
.rx_thresh = {
.pthresh = 8,
@@ -984,8 +983,6 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
BNXT_SWITCH_PORT_ID_TRUSTED_VF;
}
- /* *INDENT-ON* */
-
/*
* TODO: default_rxconf, default_txconf, rx_desc_lim, and tx_desc_lim
* need further investigation.
--
2.10.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-dev] [PATCH 0/9] bnxt PMD fixes
2021-05-31 7:26 [dpdk-dev] [PATCH 0/9] bnxt PMD fixes Kalesh A P
` (8 preceding siblings ...)
2021-05-31 7:26 ` [dpdk-dev] [PATCH 9/9] net/bnxt: remove unnecessary comment Kalesh A P
@ 2021-06-08 23:07 ` Ajit Khaparde
9 siblings, 0 replies; 11+ messages in thread
From: Ajit Khaparde @ 2021-06-08 23:07 UTC (permalink / raw)
To: Kalesh A P; +Cc: dpdk-dev, Ferruh Yigit
[-- Attachment #1: Type: text/plain, Size: 957 bytes --]
On Mon, May 31, 2021 at 12:05 AM Kalesh A P
<kalesh-anakkur.purayil@broadcom.com> wrote:
>
> From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
>
> Kalesh AP (9):
> net/bnxt: fix error message when VNIC prepare fails
> net/bnxt: set flow error when free filter is not available
> net/bnxt: remove unnecessary code
> net/bnxt: fix error handling when VNIC prepare fails
> net/bnxt: set flow error when tunnel redirection free fails
> net/bnxt: use common function to destroy VNIC resource
> net/bnxt: fix check for PTP support in FW
> net/bnxt: improve log message
> net/bnxt: remove unnecessary comment
Fixed a typo in patch 8/9
Patchset applied to dpdk-next-net-brcm for-next-net branch.
>
> drivers/net/bnxt/bnxt_ethdev.c | 6 +--
> drivers/net/bnxt/bnxt_flow.c | 116 +++++++++++++++++++++++++----------------
> drivers/net/bnxt/bnxt_hwrm.c | 10 ++--
> 3 files changed, 81 insertions(+), 51 deletions(-)
>
> --
> 2.10.1
>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-06-08 23:07 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-31 7:26 [dpdk-dev] [PATCH 0/9] bnxt PMD fixes Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 1/9] net/bnxt: fix error message when VNIC prepare fails Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 2/9] net/bnxt: set flow error when free filter is not available Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 3/9] net/bnxt: remove unnecessary code Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 4/9] net/bnxt: fix error handling when VNIC prepare fails Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 5/9] net/bnxt: set flow error when tunnel redirection free fails Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 6/9] net/bnxt: use common function to destroy VNIC resource Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 7/9] net/bnxt: fix check for PTP support in FW Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 8/9] net/bnxt: improve log message Kalesh A P
2021-05-31 7:26 ` [dpdk-dev] [PATCH 9/9] net/bnxt: remove unnecessary comment Kalesh A P
2021-06-08 23:07 ` [dpdk-dev] [PATCH 0/9] bnxt PMD fixes Ajit Khaparde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).