Skip to content

Commit

Permalink
net/bnxt: allow Tx only or Rx only
Browse files Browse the repository at this point in the history
[ upstream commit 8b7e58a791ef7747266b77ed433f5d03a6abaad7 ]

Currently, we fail the init/probe of PMD if eth_dev->data->nb_tx_queues
or eth_dev->data->nb_rx_queues is 0. We are removing this check.

Fixes: daef48e ("net/bnxt: support set MTU")

Signed-off-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
  • Loading branch information
Damodharam Ammepalli authored and cpaelzer committed Jul 7, 2022
1 parent a0d3920 commit 6986cbb
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/net/bnxt/bnxt_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ static int bnxt_alloc_prev_ring_stats(struct bnxt *bp)
sizeof(struct bnxt_ring_stats) *
bp->tx_cp_nr_rings,
0);
if (bp->prev_tx_ring_stats == NULL)
if (bp->tx_cp_nr_rings > 0 && bp->prev_tx_ring_stats == NULL)
goto error;

return 0;
Expand Down Expand Up @@ -908,11 +908,6 @@ int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
int vlan_mask = 0;
int rc, retry_cnt = BNXT_IF_CHANGE_RETRY_COUNT;

if (!eth_dev->data->nb_tx_queues || !eth_dev->data->nb_rx_queues) {
PMD_DRV_LOG(ERR, "Queues are not configured yet!\n");
return -EINVAL;
}

if (bp->rx_cp_nr_rings > RTE_ETHDEV_QUEUE_STAT_CNTRS) {
PMD_DRV_LOG(ERR,
"RxQ cnt %d > CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS %d\n",
Expand Down

0 comments on commit 6986cbb

Please sign in to comment.