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 7D676A2EFC for ; Tue, 15 Oct 2019 11:29:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 919AF1EA8A; Tue, 15 Oct 2019 11:28:59 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 6EE531EA05 for ; Tue, 15 Oct 2019 11:28:58 +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 DE1D728; Tue, 15 Oct 2019 02:28:52 -0700 (PDT) Received: from net-arm-c2400-02.shanghai.arm.com (net-arm-c2400-02.shanghai.arm.com [10.169.40.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D11AA3F718; Tue, 15 Oct 2019 02:28:50 -0700 (PDT) From: Ruifeng Wang To: david.hunt@intel.com Cc: dev@dpdk.org, hkalra@marvell.com, gavin.hu@arm.com, honnappa.nagarahalli@arm.com, nd@arm.com, Ruifeng Wang Date: Tue, 15 Oct 2019 17:28:24 +0800 Message-Id: <20191015092826.13002-1-ruifeng.wang@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191008095524.1585-1-ruifeng.wang@arm.com> References: <20191008095524.1585-1-ruifeng.wang@arm.com> Subject: [dpdk-dev] [PATCH v3 0/2] fix distributor unit test 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" Bug 342 reported distributor_autotest execution suspension on aarch64 platform. Issue was due to lack of synchronization among threads. Distributor thread and worker thread may get deadlocked. Fixed synchronization issue by adding barriers. Another issue identified was in test case. Non-atomic operation on stat value could cause value reset not been observed by worker thread and mess counters. The issue was fixed by using atomic operations. --- v3: Added comments for using of C11 acquire/release semantics. (Honnappa) v2: Fixed intermittent packet count incorrect failure. (Aaron, David) Fixed Clang build on 32bit systems. Additional patch to fix non-atomic operation in unit test. Ruifeng Wang (2): lib/distributor: fix deadlock issue for aarch64 test/distributor: fix false unit test failure app/test/test_distributor.c | 6 +- lib/librte_distributor/meson.build | 5 ++ lib/librte_distributor/rte_distributor.c | 68 ++++++++++++++------ lib/librte_distributor/rte_distributor_v20.c | 59 ++++++++++++----- 4 files changed, 101 insertions(+), 37 deletions(-) -- 2.17.1