patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/sfc: relax SW packets/bytes atomic ops memory ordering
@ 2021-09-17 11:15 Andrew Rybchenko
  2021-10-07 14:59 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Rybchenko @ 2021-09-17 11:15 UTC (permalink / raw)
  To: dev; +Cc: stable

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 <andrew.rybchenko@oktetlabs.ru>
---
 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH] net/sfc: relax SW packets/bytes atomic ops memory ordering
  2021-09-17 11:15 [dpdk-stable] [PATCH] net/sfc: relax SW packets/bytes atomic ops memory ordering Andrew Rybchenko
@ 2021-10-07 14:59 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2021-10-07 14:59 UTC (permalink / raw)
  To: Andrew Rybchenko, dev; +Cc: stable

On 9/17/2021 12:15 PM, Andrew Rybchenko wrote:
> 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 <andrew.rybchenko@oktetlabs.ru>

Applied to dpdk-next-net/main, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-07 14:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-17 11:15 [dpdk-stable] [PATCH] net/sfc: relax SW packets/bytes atomic ops memory ordering Andrew Rybchenko
2021-10-07 14:59 ` Ferruh Yigit

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git