net/sfc: add pattern parsing stub to MAE backend
[dpdk.git] / drivers / net / bnxt / bnxt_txq.c
index 2d7645e..c8d75ac 100644 (file)
@@ -97,7 +97,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
                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;
@@ -129,7 +129,11 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
        }
        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);