From: Jiawen Wu Date: Fri, 6 Nov 2020 02:10:53 +0000 (+0800) Subject: net/txgbe: replace forbidden functions X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f2f55ea457a108a5f11778c4edf3cf907cfca1b7;p=dpdk.git net/txgbe: replace forbidden functions Remove rte_panic(), and use rte_atomic_thread_fence() instead of rte_smp_[r/w]mb. Signed-off-by: Jiawen Wu Reviewed-by: Ferruh Yigit --- diff --git a/drivers/net/txgbe/base/txgbe_osdep.h b/drivers/net/txgbe/base/txgbe_osdep.h index f3d443ad37..756eb50eb5 100644 --- a/drivers/net/txgbe/base/txgbe_osdep.h +++ b/drivers/net/txgbe/base/txgbe_osdep.h @@ -27,7 +27,7 @@ #define ASSERT(x) do { \ if (!(x)) \ - rte_panic("TXGBE: x"); \ + PMD_DRV_LOG(ERR, "TXGBE: %d", x); \ } while (0) #define usec_delay(x) rte_delay_us(x) diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c index 00214b48fd..82dde509a0 100644 --- a/drivers/net/txgbe/txgbe_rxtx.c +++ b/drivers/net/txgbe/txgbe_rxtx.c @@ -1145,7 +1145,7 @@ txgbe_rx_scan_hw_ring(struct txgbe_rx_queue *rxq) for (j = 0; j < LOOK_AHEAD; j++) s[j] = rte_le_to_cpu_32(rxdp[j].qw1.lo.status); - rte_smp_rmb(); + rte_atomic_thread_fence(__ATOMIC_ACQUIRE); /* Compute how many status bits were set */ for (nb_dd = 0; nb_dd < LOOK_AHEAD &&