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 D2A3CA0C46; Fri, 17 Sep 2021 13:15:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 64B68406B4; Fri, 17 Sep 2021 13:15:30 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id C3F3B40689; Fri, 17 Sep 2021 13:15:28 +0200 (CEST) Received: by shelob.oktetlabs.ru (Postfix, from userid 122) id 335DA7F6CD; Fri, 17 Sep 2021 14:15:28 +0300 (MSK) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shelob.oktetlabs.ru X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_DISCARD, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from aros.oktetlabs.ru (aros.oktetlabs.ru [192.168.38.17]) by shelob.oktetlabs.ru (Postfix) with ESMTP id 7BA6D7F514; Fri, 17 Sep 2021 14:15:24 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 7BA6D7F514 Authentication-Results: shelob.oktetlabs.ru/7BA6D7F514; dkim=none; dkim-atps=neutral From: Andrew Rybchenko To: dev@dpdk.org Cc: stable@dpdk.org Date: Fri, 17 Sep 2021 14:15:14 +0300 Message-Id: <20210917111514.680649-1-andrew.rybchenko@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/sfc: relax SW packets/bytes atomic ops memory 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" No barriers are required when stats are incremented or read. Fixes: 96fd2bd69b58 ("net/sfc: support flow action count in transfer rules") Cc: stable@dpdk.org Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/sfc_stats.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/sfc/sfc_stats.h b/drivers/net/sfc/sfc_stats.h index 2d7ab71f14..aae8243c73 100644 --- a/drivers/net/sfc/sfc_stats.h +++ b/drivers/net/sfc/sfc_stats.h @@ -53,7 +53,7 @@ sfc_pkts_bytes_add(union sfc_pkts_bytes *st, uint64_t pkts, uint64_t bytes) * core sees both counter updates together. */ __atomic_store_n(&st->pkts_bytes.int128, result.pkts_bytes.int128, - __ATOMIC_RELEASE); + __ATOMIC_RELAXED); #else st->pkts += pkts; st->bytes += bytes; @@ -68,7 +68,7 @@ sfc_pkts_bytes_get(const union sfc_pkts_bytes *st, union sfc_pkts_bytes *result) { #if SFC_SW_STATS_ATOMIC result->pkts_bytes.int128 = __atomic_load_n(&st->pkts_bytes.int128, - __ATOMIC_ACQUIRE); + __ATOMIC_RELAXED); #else *result = *st; #endif -- 2.30.2