crypto/aesni_gcm: support in-place chained mbufs
[dpdk.git] / drivers / net / bnxt / bnxt_rxq.c
index 03b115d..d55adc3 100644 (file)
@@ -8,7 +8,6 @@
 #include <rte_malloc.h>
 
 #include "bnxt.h"
-#include "bnxt_cpr.h"
 #include "bnxt_filter.h"
 #include "bnxt_hwrm.h"
 #include "bnxt_ring.h"
@@ -76,6 +75,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
                switch (dev_conf->rxmode.mq_mode) {
                case ETH_MQ_RX_VMDQ_RSS:
                case ETH_MQ_RX_VMDQ_ONLY:
+               case ETH_MQ_RX_VMDQ_DCB_RSS:
                        /* FALLTHROUGH */
                        /* ETH_8/64_POOLs */
                        pools = conf->nb_queue_pools;
@@ -91,7 +91,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
                                pools = max_pools;
                        break;
                case ETH_MQ_RX_RSS:
-                       pools = 1;
+                       pools = bp->rx_cosq_cnt ? bp->rx_cosq_cnt : 1;
                        break;
                default:
                        PMD_DRV_LOG(ERR, "Unsupported mq_mod %d\n",
@@ -340,8 +340,8 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
 
        eth_dev->data->rx_queues[queue_idx] = rxq;
        /* Allocate RX ring hardware descriptors */
-       if (bnxt_alloc_rings(bp, queue_idx, NULL, rxq, rxq->cp_ring,
-                       rxq->nq_ring, "rxr")) {
+       if (bnxt_alloc_rings(bp, queue_idx, NULL, rxq, rxq->cp_ring, NULL,
+                            "rxr")) {
                PMD_DRV_LOG(ERR,
                        "ring_dma_zone_reserve for rx_ring failed!\n");
                bnxt_rx_queue_release_op(rxq);
@@ -366,6 +366,10 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
        eth_dev->data->rx_queue_state[queue_idx] = queue_state;
        rte_spinlock_init(&rxq->lock);
 
+       /* Configure mtu if it is different from what was configured before */
+       if (!queue_idx)
+               bnxt_mtu_set_op(eth_dev, eth_dev->data->mtu);
+
 out:
        return rc;
 }
@@ -384,10 +388,9 @@ bnxt_rx_queue_intr_enable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id)
 
        if (eth_dev->data->rx_queues) {
                rxq = eth_dev->data->rx_queues[queue_id];
-               if (!rxq) {
-                       rc = -EINVAL;
-                       return rc;
-               }
+               if (!rxq)
+                       return -EINVAL;
+
                cpr = rxq->cp_ring;
                B_CP_DB_REARM(cpr, cpr->cp_raw_cons);
        }
@@ -408,10 +411,9 @@ bnxt_rx_queue_intr_disable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id)
 
        if (eth_dev->data->rx_queues) {
                rxq = eth_dev->data->rx_queues[queue_id];
-               if (!rxq) {
-                       rc = -EINVAL;
-                       return rc;
-               }
+               if (!rxq)
+                       return -EINVAL;
+
                cpr = rxq->cp_ring;
                B_CP_DB_DISARM(cpr);
        }