net/octeontx: fix packet corruption on Tx
authorJerin Jacob <jerin.jacob@caviumnetworks.com>
Fri, 17 Aug 2018 14:30:22 +0000 (20:00 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 28 Aug 2018 13:27:39 +0000 (15:27 +0200)
LMTST does not guarantee packet content get synced with L2C when
HW access the packet for transmitting.

Adding coherent IO write barrier will make sure HW sees the correct
packet if its modified.

Fixes: 9e747589bd4c ("net/octeontx: add packet transmit burst function")
Cc: stable@dpdk.org
Reported-by: Vikas Aggarwal <vikas.aggarwal@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
drivers/net/octeontx/octeontx_rxtx.c

index a9149b4..f861313 100644 (file)
@@ -63,6 +63,7 @@ octeontx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 
        count = 0;
 
+       rte_cio_wmb();
        while (count < nb_pkts) {
                res = __octeontx_xmit_pkts(dq->lmtline_va, dq->ioreg_va,
                                           dq->fc_status_va,