net/bnxt: refactor multi-queue Rx configuration
[dpdk.git] / drivers / net / bnxt / bnxt_rxtx_vec_neon.c
index b0981da..bc2e96e 100644 (file)
@@ -274,22 +274,8 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
                num_valid = (sizeof(uint64_t) / sizeof(uint16_t)) -
                                (__builtin_clzl(valid & desc_valid_mask) / 16);
 
-               switch (num_valid) {
-               case 4:
-                       rxr->rx_buf_ring[mbcons + 3] = NULL;
-                       /* FALLTHROUGH */
-               case 3:
-                       rxr->rx_buf_ring[mbcons + 2] = NULL;
-                       /* FALLTHROUGH */
-               case 2:
-                       rxr->rx_buf_ring[mbcons + 1] = NULL;
-                       /* FALLTHROUGH */
-               case 1:
-                       rxr->rx_buf_ring[mbcons + 0] = NULL;
+               if (num_valid == 0)
                        break;
-               case 0:
-                       goto out;
-               }
 
                descs_to_mbufs(rxcmp, rxcmp1, mb_init, &rx_pkts[nb_rx_pkts],
                               rxr);
@@ -299,7 +285,6 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
                        break;
        }
 
-out:
        if (nb_rx_pkts) {
                rxr->rx_raw_prod = RING_ADV(rxr->rx_raw_prod, nb_rx_pkts);
 
@@ -361,7 +346,7 @@ bnxt_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
        uint16_t tx_prod, tx_raw_prod = txr->tx_raw_prod;
        struct rte_mbuf *tx_mbuf;
        struct tx_bd_long *txbd = NULL;
-       struct bnxt_sw_tx_bd *tx_buf;
+       struct rte_mbuf **tx_buf;
        uint16_t to_send;
 
        nb_pkts = RTE_MIN(nb_pkts, bnxt_tx_avail(txq));
@@ -377,8 +362,7 @@ bnxt_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 
                tx_prod = RING_IDX(txr->tx_ring_struct, tx_raw_prod);
                tx_buf = &txr->tx_buf_ring[tx_prod];
-               tx_buf->mbuf = tx_mbuf;
-               tx_buf->nr_bds = 1;
+               *tx_buf = tx_mbuf;
 
                txbd = &txr->tx_desc_ring[tx_prod];
                txbd->address = tx_mbuf->buf_iova + tx_mbuf->data_off;