From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5852C433F5 for ; Wed, 15 Sep 2021 08:34:40 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id 5F89F61179 for ; Wed, 15 Sep 2021 08:34:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5F89F61179 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 91E7E4003F; Wed, 15 Sep 2021 10:34:39 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id 24DB14003C; Wed, 15 Sep 2021 10:34:38 +0200 (CEST) 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 8D8326D; Wed, 15 Sep 2021 01:34:37 -0700 (PDT) Received: from net-arm-n1amp-02.shanghai.arm.com (net-arm-n1amp-02.shanghai.arm.com [10.169.210.110]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2A4033F719; Wed, 15 Sep 2021 01:34:33 -0700 (PDT) From: Ruifeng Wang To: dev@dpdk.org Cc: beilei.xing@intel.com, qi.z.zhang@intel.com, bruce.richardson@intel.com, jerinj@marvell.com, hemant.agrawal@nxp.com, drc@linux.vnet.ibm.com, honnappa.nagarahalli@arm.com, stable@dpdk.org, nd@arm.com, Ruifeng Wang Date: Wed, 15 Sep 2021 16:33:37 +0800 Message-Id: <20210915083339.2424369-1-ruifeng.wang@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210906033201.1789796-1-ruifeng.wang@arm.com> References: <20210906033201.1789796-1-ruifeng.wang@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 0/2] i40e Rx descriptor loads ordering 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" On Rx path, NIC fills Rx descriptor with data pertains to received packet. A single descriptor consists of multiple words. Word1 has the bit that indicates readiness of descriptor for software to use. So word1 should be loaded before other words. On architectures with weaker memory ordering, barrier is needed to ensure the ordering of loads. This patch set fixed the risk on both scalar path and aarch64 vector path. v2: Updated commit message. Performance impact added. (Honnappa) Ruifeng Wang (2): net/i40e: fix risk in Rx descriptor read in NEON vector path net/i40e: fix risk in Rx descriptor read in scalar path drivers/net/i40e/i40e_rxtx.c | 12 ++++++++++++ drivers/net/i40e/i40e_rxtx_vec_neon.c | 8 ++++++++ 2 files changed, 20 insertions(+) -- 2.25.1