net/i40e: replace SMP barrier with thread fence in Rx
authorJoyce Kong <joyce.kong@arm.com>
Tue, 6 Jul 2021 06:54:04 +0000 (01:54 -0500)
committerQi Zhang <qi.z.zhang@intel.com>
Fri, 16 Jul 2021 08:11:30 +0000 (10:11 +0200)
Simply replace the SMP barrier with atomic thread fence for
i40e hw ring scan, if there is no synchronization point.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/i40e/i40e_rxtx.c

index 8489f91..026cda9 100644 (file)
@@ -490,7 +490,8 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq)
                                        I40E_RXD_QW1_STATUS_SHIFT;
                }
 
-               rte_smp_rmb();
+               /* This barrier is to order loads of different words in the descriptor */
+               rte_atomic_thread_fence(__ATOMIC_ACQUIRE);
 
                /* Compute how many status bits were set */
                for (j = 0, nb_dd = 0; j < I40E_LOOK_AHEAD; j++) {