From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 90B27A0548; Mon, 26 Apr 2021 05:34:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4FED940A4B; Mon, 26 Apr 2021 05:34:47 +0200 (CEST) Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) by mails.dpdk.org (Postfix) with ESMTP id EFB6A41110 for ; Mon, 26 Apr 2021 05:34:45 +0200 (CEST) Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4FT9SH5FjszB20x for ; Mon, 26 Apr 2021 11:32:15 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.498.0; Mon, 26 Apr 2021 11:34:41 +0800 From: "Min Hu (Connor)" To: CC: Date: Mon, 26 Apr 2021 11:34:48 +0800 Message-ID: <1619408092-54050-3-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1619408092-54050-1-git-send-email-humin29@huawei.com> References: <1619408092-54050-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH 2/6] net/hns3: modify write reg opt API impl X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Chengwen Feng 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) --- drivers/net/hns3/hns3_ethdev.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h index de17878..68541df 100644 --- a/drivers/net/hns3/hns3_ethdev.h +++ b/drivers/net/hns3/hns3_ethdev.h @@ -983,13 +983,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) -- 2.7.4