From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 99A2FA0567; Fri, 13 Mar 2020 10:20:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 83D8A1C06D; Fri, 13 Mar 2020 10:20:05 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 58F4B1C06D for ; Fri, 13 Mar 2020 10:20:04 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DE9F431B; Fri, 13 Mar 2020 02:20:03 -0700 (PDT) Received: from net-arm-thunderx2-04.shanghai.arm.com (net-arm-thunderx2-04.shanghai.arm.com [10.169.40.184]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B446F3F67D; Fri, 13 Mar 2020 02:19:59 -0700 (PDT) From: Gavin Hu To: dev@dpdk.org Cc: nd@arm.com, david.marchand@redhat.com, thomas@monjalon.net, mk@semihalf.com, gtzalik@amazon.com, evgenys@amazon.com, igorch@amazon.com, mw@semihalf.com, Honnappa.Nagarahalli@arm.com, ruifeng.wang@arm.com, phil.yang@arm.com, joyce.kong@arm.com Date: Fri, 13 Mar 2020 17:18:32 +0800 Message-Id: <20200313091835.58039-5-gavin.hu@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200313091835.58039-1-gavin.hu@arm.com> References: <20200313091835.58039-1-gavin.hu@arm.com> Subject: [dpdk-dev] [PATCH RFC v1 4/7] net/ena: relax barrier for completion queue update X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" To gaurantee the update observed by NIC HW, a cio barrier is sufficient, an io barrier, which translates to dsb on aarch64, is overkill. Suggested-by: Honnappa Nagarahalli Signed-off-by: Gavin Hu Reviewed-by: Honnappa Nagarahalli --- drivers/net/ena/base/ena_eth_com.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ena/base/ena_eth_com.h b/drivers/net/ena/base/ena_eth_com.h index e56c33a64..edfa98b72 100644 --- a/drivers/net/ena/base/ena_eth_com.h +++ b/drivers/net/ena/base/ena_eth_com.h @@ -180,7 +180,9 @@ static inline int ena_com_update_dev_comp_head(struct ena_com_io_cq *io_cq) if (unlikely(need_update)) { ena_trc_dbg("Write completion queue doorbell for queue %d: head: %d\n", io_cq->qid, head); - ENA_REG_WRITE32(io_cq->bus, head, io_cq->cq_head_db_reg); + rte_cio_wmb(); + ENA_REG_WRITE32_RELAXED(io_cq->bus, head, + io_cq->cq_head_db_reg); io_cq->last_head_update = head; } } -- 2.17.1