return -EINVAL;
}
- if (!nb_desc || nb_desc > MAX_TX_DESC_CNT) {
+ if (nb_desc < BNXT_MIN_RING_DESC || nb_desc > MAX_TX_DESC_CNT) {
PMD_DRV_LOG(ERR, "nb_desc %d is invalid", nb_desc);
rc = -EINVAL;
goto out;
}
txq->bp = bp;
txq->nb_tx_desc = nb_desc;
- txq->tx_free_thresh = tx_conf->tx_free_thresh;
+ txq->tx_free_thresh =
+ RTE_MIN(rte_align32pow2(nb_desc) / 4, RTE_BNXT_MAX_TX_BURST);
+ txq->offloads = eth_dev->data->dev_conf.txmode.offloads |
+ tx_conf->offloads;
+
txq->tx_deferred_start = tx_conf->tx_deferred_start;
rc = bnxt_init_tx_ring_struct(txq, socket_id);