]> git.droids-corp.org - dpdk.git/commitdiff
net/cnxk: add barrier after meta batch free in scalar
authorNithin Dabilpuram <ndabilpuram@marvell.com>
Sun, 8 May 2022 07:48:23 +0000 (13:18 +0530)
committerJerin Jacob <jerinj@marvell.com>
Tue, 10 May 2022 14:27:00 +0000 (16:27 +0200)
Add barrier after meta batch free in scalar routine when
LMT lines are exactly full to make sure that next LMT line user
in Tx only starts writing the lines only when previous stoerl's
are complete.

Fixes: 4382a7ccf781 ("net/cnxk: support Rx security offload on cn10k")
Cc: stable@dpdk.org
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
drivers/net/cnxk/cn10k_rx.h

index e4f5a553a6f2ef6564a2bae3bddf91a6ab53402b..94c1f1e84fbfa99f910539ab65e52b15379dc60c 100644 (file)
@@ -1007,10 +1007,11 @@ cn10k_nix_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t pkts,
        plt_write64((wdata | nb_pkts), rxq->cq_door);
 
        /* Free remaining meta buffers if any */
-       if (flags & NIX_RX_OFFLOAD_SECURITY_F && loff) {
+       if (flags & NIX_RX_OFFLOAD_SECURITY_F && loff)
                nix_sec_flush_meta(laddr, lmt_id + lnum, loff, aura_handle);
-               plt_io_wmb();
-       }
+
+       if (flags & NIX_RX_OFFLOAD_SECURITY_F)
+               rte_io_wmb();
 
        return nb_pkts;
 }