net/octeontx: fix packet corruption on Tx
diff mbox series

Message ID 20180817143022.12285-1-jerin.jacob@caviumnetworks.com
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • net/octeontx: fix packet corruption on Tx
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Jerin Jacob Aug. 17, 2018, 2:30 p.m. UTC
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>
---
 drivers/net/octeontx/octeontx_rxtx.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Santosh Shukla Aug. 17, 2018, 4:11 p.m. UTC | #1
On Friday 17 August 2018 08:00 PM, Jerin Jacob wrote:
> 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>
Ferruh Yigit Aug. 23, 2018, 4:28 p.m. UTC | #2
On 8/17/2018 5:06 PM, santosh wrote:
> 
> On Friday 17 August 2018 08:00 PM, Jerin Jacob wrote:
>> 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>
> 

Applied to dpdk-next-net/master, thanks.

Patch
diff mbox series

diff --git a/drivers/net/octeontx/octeontx_rxtx.c b/drivers/net/octeontx/octeontx_rxtx.c
index a9149b4e1..f861313e6 100644
--- a/drivers/net/octeontx/octeontx_rxtx.c
+++ b/drivers/net/octeontx/octeontx_rxtx.c
@@ -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,