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 5F2FBA04DD for ; Wed, 28 Oct 2020 11:55:21 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 56913CA32; Wed, 28 Oct 2020 11:55:20 +0100 (CET) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by dpdk.org (Postfix) with ESMTP id E49B1CA8F for ; Wed, 28 Oct 2020 11:55:17 +0100 (CET) Received: by mail-wm1-f50.google.com with SMTP id w23so4104515wmi.4 for ; Wed, 28 Oct 2020 03:55:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IXJoLZznykVkMwtifxK/ABGvpMPGHCR98pddDKPCK+Y=; b=Z27vWnC16lb7s9u1voSUwp22ojoHAsN/CauLeox0D3UibVscgTh0KwOY+H3dUPeU01 WFOawwXW/dZ40lUF4AmoWMEhzjdkjs7ZuVr3YVHAbIB+6+KHgs3k7fapa5Xvb+CJaAd1 i83t1zX/PkGpMIUhVj4IGOEMrDMbXt85RcHFaDCmO4URF73ab9ILbbPRh9bLqHBSL68J PU6OeWGYh3lltk0B7TMmkAsxKUv16SvVU2LEgCpQ/vqvmx+X1qkpyY4KbaVc53OeCzxK NJdmduoH2WUM5CNGJMJeQHLmd2LEhW8UyId0wajsbzMiBlwvnVElUCrn82/7DPtG2Prq +lvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IXJoLZznykVkMwtifxK/ABGvpMPGHCR98pddDKPCK+Y=; b=IiaGiMU9xREVf5otmQYPTtsGLXw2QVIfF15Jb7ZNgmQvmA4F1p/5ufd/eu2LcT9l7o mEKRzgHoqUBKTHGjCk4XLHRmw0CyXiBIKN4k3OehA7PTJGA+EFy6foymekmyxIsPo7AN ESUD/MQ+Frhw9w+DmHaewdc7AN2vdfKbyhruOKp7bCb46NgS7z7HX2q9QyI9r+hHeStm r9oNv1D9KfkKe9YLNcM7aD3kyZNJcKRRYylmLT1APSJI9itkKqcyYXnyw5TAaU9DOCIV MoYdoj1fkdg0OT5BRWgKd8BfHJ9Lfj1c6p4m+PLcH0KUEFmzibMsNmKtFcdoaFIb14rf 05Hw== X-Gm-Message-State: AOAM530Q8h8rFA2KzMvTuB3xRcJiDSce7NT/iK5FtgPsZ0u7PtRXSmLl g8aemRogiQtolUV7sh+uRNM= X-Google-Smtp-Source: ABdhPJyT9ws2cQUZjVTi2GVVK3ILkma0IFCDYAJtpuOOHKTmMNZytKcthHzt1sceQ1PPIP9wG1FIOg== X-Received: by 2002:a7b:c181:: with SMTP id y1mr7466906wmi.58.1603882517691; Wed, 28 Oct 2020 03:55:17 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id l26sm5483944wmi.39.2020.10.28.03.55.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 03:55:17 -0700 (PDT) From: luca.boccassi@gmail.com To: Honnappa Nagarahalli Cc: Phil Yang , Ruifeng Wang , Jakub Grajciar , dpdk stable Date: Wed, 28 Oct 2020 10:45:30 +0000 Message-Id: <20201028104606.3504127-171-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201028104606.3504127-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/memif: relax load of ring head for S2M ring' has been queued to stable release 19.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/30/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From eb3ab17e94427d3b32aeb32ba13b8fe49df9a2ec Mon Sep 17 00:00:00 2001 From: Honnappa Nagarahalli Date: Mon, 28 Sep 2020 14:03:30 -0500 Subject: [PATCH] net/memif: relax load of ring head for S2M ring [ upstream commit 2416db2039e7f17fabf8e21d18181aa3823985ab ] For S2M rings, ring->head is updated by the sender and eth_memif_tx function is called in the context of sending thread. The loads in the sender do not need to synchronize with its own stores. Fixes: a2aafb9aa651 ("net/memif: optimize with one-way barrier") Signed-off-by: Honnappa Nagarahalli Reviewed-by: Phil Yang Reviewed-by: Ruifeng Wang Reviewed-by: Jakub Grajciar --- drivers/net/memif/rte_eth_memif.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c index 26c06d9055..aa75a04278 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -566,7 +566,13 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) mask = ring_size - 1; if (type == MEMIF_RING_S2M) { - slot = __atomic_load_n(&ring->head, __ATOMIC_ACQUIRE); + /* For S2M queues ring->head is updated by the sender and + * this function is called in the context of sending thread. + * The loads in the sender do not need to synchronize with + * its own stores. Hence, the following load can be a + * relaxed load. + */ + slot = __atomic_load_n(&ring->head, __ATOMIC_RELAXED); n_free = ring_size - slot + __atomic_load_n(&ring->tail, __ATOMIC_ACQUIRE); } else { -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-10-28 10:35:17.032160997 +0000 +++ 0171-net-memif-relax-load-of-ring-head-for-S2M-ring.patch 2020-10-28 10:35:11.776834028 +0000 @@ -1,14 +1,15 @@ -From 2416db2039e7f17fabf8e21d18181aa3823985ab Mon Sep 17 00:00:00 2001 +From eb3ab17e94427d3b32aeb32ba13b8fe49df9a2ec Mon Sep 17 00:00:00 2001 From: Honnappa Nagarahalli Date: Mon, 28 Sep 2020 14:03:30 -0500 Subject: [PATCH] net/memif: relax load of ring head for S2M ring +[ upstream commit 2416db2039e7f17fabf8e21d18181aa3823985ab ] + For S2M rings, ring->head is updated by the sender and eth_memif_tx function is called in the context of sending thread. The loads in the sender do not need to synchronize with its own stores. Fixes: a2aafb9aa651 ("net/memif: optimize with one-way barrier") -Cc: stable@dpdk.org Signed-off-by: Honnappa Nagarahalli Reviewed-by: Phil Yang @@ -19,10 +20,10 @@ 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c -index 6deab098b5..b16c73f231 100644 +index 26c06d9055..aa75a04278 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c -@@ -585,7 +585,13 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) +@@ -566,7 +566,13 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) mask = ring_size - 1; if (type == MEMIF_RING_S2M) {