From: Chengwen Feng Date: Fri, 30 Apr 2021 06:28:46 +0000 (+0800) Subject: net/hns3: refactor optimised register write X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2aca65258eb68cafc2238df56b8d36b0e8410f4c;p=dpdk.git net/hns3: refactor optimised register write This patch modifies hns3_write_reg_opt() API implementation because the rte_write32() already uses rte_io_wmb(). Signed-off-by: Chengwen Feng Signed-off-by: Min Hu (Connor) --- diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h index 608fd0c5ab..23f3722f37 100644 --- a/drivers/net/hns3/hns3_ethdev.h +++ b/drivers/net/hns3/hns3_ethdev.h @@ -980,13 +980,13 @@ static inline void hns3_write_reg(void *base, uint32_t reg, uint32_t value) } /* - * The optimized function for writing registers used in the '.rx_pkt_burst' and - * '.tx_pkt_burst' ops implementation function. + * The optimized function for writing registers reduces one address addition + * calculation, it was used in the '.rx_pkt_burst' and '.tx_pkt_burst' ops + * implementation function. */ static inline void hns3_write_reg_opt(volatile void *addr, uint32_t value) { - rte_io_wmb(); - rte_write32_relaxed(rte_cpu_to_le_32(value), addr); + rte_write32(rte_cpu_to_le_32(value), addr); } static inline uint32_t hns3_read_reg(void *base, uint32_t reg)