net/dpaa: rearrange atomic queue support
authorSunil Kumar Kori <sunil.kori@nxp.com>
Fri, 21 Sep 2018 11:05:58 +0000 (16:35 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 27 Sep 2018 23:41:02 +0000 (01:41 +0200)
This is to align the code with dpaa2 to ease out maintenance
of both driver code bases.

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
drivers/net/dpaa/dpaa_rxtx.c

index 3a3a048..6698c97 100644 (file)
@@ -870,6 +870,19 @@ dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
                                DPAA_TX_BURST_SIZE : nb_bufs;
                for (loop = 0; loop < frames_to_send; loop++) {
                        mbuf = *(bufs++);
+                       seqn = mbuf->seqn;
+                       if (seqn != DPAA_INVALID_MBUF_SEQN) {
+                               index = seqn - 1;
+                               if (DPAA_PER_LCORE_DQRR_HELD & (1 << index)) {
+                                       flags[loop] =
+                                          ((index & QM_EQCR_DCA_IDXMASK) << 8);
+                                       flags[loop] |= QMAN_ENQUEUE_FLAG_DCA;
+                                       DPAA_PER_LCORE_DQRR_SIZE--;
+                                       DPAA_PER_LCORE_DQRR_HELD &=
+                                                               ~(1 << index);
+                               }
+                       }
+
                        if (likely(RTE_MBUF_DIRECT(mbuf))) {
                                mp = mbuf->pool;
                                bp_info = DPAA_MEMPOOL_TO_POOL_INFO(mp);
@@ -916,18 +929,6 @@ dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
                                        goto send_pkts;
                                }
                        }
-                       seqn = mbuf->seqn;
-                       if (seqn != DPAA_INVALID_MBUF_SEQN) {
-                               index = seqn - 1;
-                               if (DPAA_PER_LCORE_DQRR_HELD & (1 << index)) {
-                                       flags[loop] =
-                                          ((index & QM_EQCR_DCA_IDXMASK) << 8);
-                                       flags[loop] |= QMAN_ENQUEUE_FLAG_DCA;
-                                       DPAA_PER_LCORE_DQRR_SIZE--;
-                                       DPAA_PER_LCORE_DQRR_HELD &=
-                                                               ~(1 << index);
-                               }
-                       }
                }
 
 send_pkts: