* [dpdk-dev] [PATCH 1/2] net/bnxt: fix rxq start
@ 2019-07-20 7:19 Ajit Khaparde
2019-07-20 7:19 ` [dpdk-dev] [PATCH 2/2] net/bnxt: fix an issue with rxq0 stop Ajit Khaparde
2019-07-22 16:05 ` [dpdk-dev] [PATCH 1/2] net/bnxt: fix rxq start Ferruh Yigit
0 siblings, 2 replies; 3+ messages in thread
From: Ajit Khaparde @ 2019-07-20 7:19 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit, Kalesh AP, Lance Richardson
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
1. Added a missing return in bnxt_alloc_hwrm_rx_ring().
2. Added a missing return value check
3. Moved the log message to right place.
Fixes: 05b5e4821c1e ("net/bnxt: use dedicated CPR for async events")
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ring.c | 6 ++----
drivers/net/bnxt/bnxt_rxq.c | 17 +++++++++++++----
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index 05a9a200c..80da098ef 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -546,10 +546,8 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
bnxt_db_write(&rxr->ag_db, rxr->ag_prod);
}
rxq->index = queue_index;
- PMD_DRV_LOG(INFO,
- "queue %d, rx_deferred_start %d, state %d!\n",
- queue_index, rxq->rx_deferred_start,
- bp->eth_dev->data->rx_queue_state[queue_index]);
+
+ return 0;
err_out:
PMD_DRV_LOG(ERR,
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index e0eb890f8..4082c3aa9 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -411,10 +411,11 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
return -EINVAL;
}
- dev->data->rx_queue_state[rx_queue_id] = RTE_ETH_QUEUE_STATE_STARTED;
-
bnxt_free_hwrm_rx_ring(bp, rx_queue_id);
- bnxt_alloc_hwrm_rx_ring(bp, rx_queue_id);
+ rc = bnxt_alloc_hwrm_rx_ring(bp, rx_queue_id);
+ if (rc)
+ return rc;
+
PMD_DRV_LOG(INFO, "Rx queue started %d\n", rx_queue_id);
if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
@@ -435,8 +436,16 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
rc = bnxt_vnic_rss_configure(bp, vnic);
}
- if (rc == 0)
+ if (rc == 0) {
+ dev->data->rx_queue_state[rx_queue_id] =
+ RTE_ETH_QUEUE_STATE_STARTED;
rxq->rx_deferred_start = false;
+ }
+
+ PMD_DRV_LOG(INFO,
+ "queue %d, rx_deferred_start %d, state %d!\n",
+ rx_queue_id, rxq->rx_deferred_start,
+ bp->eth_dev->data->rx_queue_state[rx_queue_id]);
return rc;
}
--
2.20.1 (Apple Git-117)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [dpdk-dev] [PATCH 2/2] net/bnxt: fix an issue with rxq0 stop
2019-07-20 7:19 [dpdk-dev] [PATCH 1/2] net/bnxt: fix rxq start Ajit Khaparde
@ 2019-07-20 7:19 ` Ajit Khaparde
2019-07-22 16:05 ` [dpdk-dev] [PATCH 1/2] net/bnxt: fix rxq start Ferruh Yigit
1 sibling, 0 replies; 3+ messages in thread
From: Ajit Khaparde @ 2019-07-20 7:19 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit, Kalesh AP, Lance Richardson
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
For the stingray platform and other platforms needing tighter
control of resource utilization, we process async events on
receive completion ring0.
For other chips there is a dedicated completion ring for
asynchronous event handling instead of handling these events
on a receive completion ring.
This patch fixes the check for rxq0 stop.
Fixes: 05b5e4821c1e ("net/bnxt: use dedicated CPR for async events")
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_rxq.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 4082c3aa9..8c7608621 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -458,8 +458,11 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
struct bnxt_rx_queue *rxq = NULL;
int rc = 0;
- /* Rx CQ 0 also works as Default CQ for async notifications */
- if (!rx_queue_id) {
+ /* For the stingray platform and other platforms needing tighter
+ * control of resource utilization, Rx CQ 0 also works as
+ * Default CQ for async notifications
+ */
+ if (!BNXT_NUM_ASYNC_CPR && !rx_queue_id) {
PMD_DRV_LOG(ERR, "Cannot stop Rx queue id %d\n", rx_queue_id);
return -EINVAL;
}
--
2.20.1 (Apple Git-117)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] net/bnxt: fix rxq start
2019-07-20 7:19 [dpdk-dev] [PATCH 1/2] net/bnxt: fix rxq start Ajit Khaparde
2019-07-20 7:19 ` [dpdk-dev] [PATCH 2/2] net/bnxt: fix an issue with rxq0 stop Ajit Khaparde
@ 2019-07-22 16:05 ` Ferruh Yigit
1 sibling, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2019-07-22 16:05 UTC (permalink / raw)
To: Ajit Khaparde, dev; +Cc: Kalesh AP, Lance Richardson
On 7/20/2019 8:19 AM, Ajit Khaparde wrote:
> From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
>
> 1. Added a missing return in bnxt_alloc_hwrm_rx_ring().
> 2. Added a missing return value check
> 3. Moved the log message to right place.
>
> Fixes: 05b5e4821c1e ("net/bnxt: use dedicated CPR for async events")
>
> Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
For series,
Squashed into relevant commit in next-net, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-22 16:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-20 7:19 [dpdk-dev] [PATCH 1/2] net/bnxt: fix rxq start Ajit Khaparde
2019-07-20 7:19 ` [dpdk-dev] [PATCH 2/2] net/bnxt: fix an issue with rxq0 stop Ajit Khaparde
2019-07-22 16:05 ` [dpdk-dev] [PATCH 1/2] net/bnxt: fix rxq start Ferruh Yigit
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).