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 E2605A2EDB for ; Mon, 30 Sep 2019 15:51:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D280F1BEEB; Mon, 30 Sep 2019 15:50:32 +0200 (CEST) Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) by dpdk.org (Postfix) with ESMTP id 140861BE3D for ; Mon, 30 Sep 2019 15:50:31 +0200 (CEST) Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id ABD207B2CE7AF707F419 for ; Mon, 30 Sep 2019 21:50:29 +0800 (CST) Received: from tester.localdomain (10.175.119.39) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.439.0; Mon, 30 Sep 2019 21:50:22 +0800 From: Xiaoyun wang To: CC: , , , , , , , Xiaoyun wang Date: Mon, 30 Sep 2019 22:00:56 +0800 Message-ID: <8dea773bd37c783e349692afae166cfa1cf9a8b5.1569850827.git.cloud.wangxiaoyun@huawei.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.119.39] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v3 18/19] net/hinic: optimize RX performance 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" This patch optimizes receive packets performance on arm platform. Signed-off-by: Xiaoyun wang --- drivers/net/hinic/hinic_pmd_rx.c | 5 +---- drivers/net/hinic/hinic_pmd_rx.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/net/hinic/hinic_pmd_rx.c b/drivers/net/hinic/hinic_pmd_rx.c index 37b4f5c..b3c2eb4 100644 --- a/drivers/net/hinic/hinic_pmd_rx.c +++ b/drivers/net/hinic/hinic_pmd_rx.c @@ -972,13 +972,10 @@ u16 hinic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, u16 nb_pkts) while (pkts < nb_pkts) { /* 2. current ci is done */ rx_cqe = &rxq->rx_cqe[sw_ci]; - status = rx_cqe->status; + status = __atomic_load_n(&rx_cqe->status, __ATOMIC_ACQUIRE); if (!HINIC_GET_RX_DONE_BE(status)) break; - /* read other cqe member after status */ - rte_rmb(); - /* convert cqe and get packet length */ hinic_rq_cqe_be_to_cpu32(&cqe, (volatile void *)rx_cqe); vlan_len = cqe.vlan_len; diff --git a/drivers/net/hinic/hinic_pmd_rx.h b/drivers/net/hinic/hinic_pmd_rx.h index fe2735b..fa27e91 100644 --- a/drivers/net/hinic/hinic_pmd_rx.h +++ b/drivers/net/hinic/hinic_pmd_rx.h @@ -28,6 +28,7 @@ struct hinic_rq_ctrl { u32 ctrl_fmt; }; +#if defined(__X86_64_SSE__) struct hinic_rq_cqe { u32 status; u32 vlan_len; @@ -36,6 +37,16 @@ struct hinic_rq_cqe { u32 rsvd[4]; }; +#elif defined(__ARM64_NEON__) +struct hinic_rq_cqe { + u32 status; + u32 vlan_len; + u32 offload_type; + u32 rss_hash; + + u32 rsvd[4]; +} __rte_cache_aligned; +#endif struct hinic_rq_cqe_sect { struct hinic_sge sge; -- 1.8.3.1