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 AFD64A051C for ; Tue, 11 Feb 2020 12:29:53 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 109C82BF4; Tue, 11 Feb 2020 12:29:51 +0100 (CET) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id 6E71F2BF4 for ; Tue, 11 Feb 2020 12:29:50 +0100 (CET) Received: by mail-wm1-f68.google.com with SMTP id b17so3095746wmb.0 for ; Tue, 11 Feb 2020 03:29:50 -0800 (PST) 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=Xe424jzBJPr0f9hjk+iChcxz45v6Jo5ZHHnONOJfnZU=; b=PrSk2PRr2w3SeV0n0lB3dqTe8tV2eIB50jLK6mwfsM/hdsAjqG4m5nDUoSz2YBnK6I kuomm+J8cN7WqDCGe8IATCGLATmNI8cS9mYEn6XN+eMWm3uUhdstWjDvUrQhezxUdw2n RlneI6ElKXTPTicGCcgqZIl9TmZ4/lBoq29D5aIhTT+NcpMvVM3he8uYrXx91Hyw9c2u brOXjuSzvV8lRE5/8gq2gE0hh875pDB1riHm1R8heidDFQlOZvpeWfU1domb3TG8MTXJ UmNdEXpZyih2zauddPQCNSDij6i8syREhmH2lA9VkVhZaztnoip1WhdEFYwSeJuFKaA/ W2Mg== 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=Xe424jzBJPr0f9hjk+iChcxz45v6Jo5ZHHnONOJfnZU=; b=tPf7hCeS61gRL8xjfQupiZYNsHWmjXp8OPWY/OTnICyBHWNk4TEdpNzSDTCzX+EERc O9jvZD+5kMb/ZRU+PEuPOYl4+iLCx2o8a0/7dGP2a1orCi1B/KPhjmob/hkL41RERKi8 1twhwTCMgEpY1eIsj1mc70jsknRYI9tYCD8cyG0n4zX0Q2O0DVKigCOQw7h3oaZSrcDZ 6gnIQcnXXCGka8NOvx02ZRuRRJZv+Da13qOiI6JmNMElv+9+PljmcwoCExQGNX5tQDNf oXXCIif7GgDCwlyTgW4JmWYh2Ze2WZJBm1GfUlUs/JJryN0QYubp7igpKFxUgN/BF2Er Z0+w== X-Gm-Message-State: APjAAAVZQpLNmxXGh+frTuL1jOKN1JPIdRbhyUyioNAnQL9jOUm2PTvh tOJ4zyDQIbWgO2vDqi80rfzYl+Jmunc= X-Google-Smtp-Source: APXvYqzPQTx9miVPA8qtSPaJeW7GtvCeo+/c/LhTLNaQHETaprUVoTFTxA1hBXBJvlvRiaL2dU8HYA== X-Received: by 2002:a1c:3906:: with SMTP id g6mr5370341wma.49.1581420590140; Tue, 11 Feb 2020 03:29:50 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id x6sm3258912wmi.44.2020.02.11.03.29.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:29:49 -0800 (PST) From: luca.boccassi@gmail.com To: Xiaoyun Li Cc: Gavin Hu , Jingjing Wu , dpdk stable Date: Tue, 11 Feb 2020 11:20:55 +0000 Message-Id: <20200211112216.3929-109-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'raw/ntb: fix write memory barrier' has been queued to stable release 19.11.1 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.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/13/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 87e011e6ea1136a369c30763d5dcf331e51c5be5 Mon Sep 17 00:00:00 2001 From: Xiaoyun Li Date: Wed, 4 Dec 2019 23:19:16 +0800 Subject: [PATCH] raw/ntb: fix write memory barrier [ upstream commit 657cd1370dccf15d8d61e49b7e751ccc7ae6a29b ] All buffers and ring info should be written before tail register update. This patch relocates the write memory barrier before updating tail register to avoid potential issues. Fixes: 11b5c7daf019 ("raw/ntb: add enqueue and dequeue functions") Signed-off-by: Xiaoyun Li Reviewed-by: Gavin Hu Acked-by: Jingjing Wu --- drivers/raw/ntb/ntb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/raw/ntb/ntb.c b/drivers/raw/ntb/ntb.c index ad7f6abfd3..dd0b72f8c5 100644 --- a/drivers/raw/ntb/ntb.c +++ b/drivers/raw/ntb/ntb.c @@ -683,8 +683,8 @@ end_of_tx: sizeof(struct ntb_used) * nb1); rte_memcpy(txq->tx_used_ring, tx_used + nb1, sizeof(struct ntb_used) * nb2); + rte_wmb(); *txq->used_cnt = txq->last_used; - rte_wmb(); /* update queue stats */ hw->ntb_xstats[NTB_TX_BYTES_ID + off] += bytes; @@ -789,8 +789,8 @@ end_of_rx: sizeof(struct ntb_desc) * nb1); rte_memcpy(rxq->rx_desc_ring, rx_desc + nb1, sizeof(struct ntb_desc) * nb2); + rte_wmb(); *rxq->avail_cnt = rxq->last_avail; - rte_wmb(); /* update queue stats */ off = NTB_XSTATS_NUM * ((size_t)context + 1); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:42.605694771 +0000 +++ 0109-raw-ntb-fix-write-memory-barrier.patch 2020-02-11 11:17:38.576004638 +0000 @@ -1,14 +1,15 @@ -From 657cd1370dccf15d8d61e49b7e751ccc7ae6a29b Mon Sep 17 00:00:00 2001 +From 87e011e6ea1136a369c30763d5dcf331e51c5be5 Mon Sep 17 00:00:00 2001 From: Xiaoyun Li Date: Wed, 4 Dec 2019 23:19:16 +0800 Subject: [PATCH] raw/ntb: fix write memory barrier +[ upstream commit 657cd1370dccf15d8d61e49b7e751ccc7ae6a29b ] + All buffers and ring info should be written before tail register update. This patch relocates the write memory barrier before updating tail register to avoid potential issues. Fixes: 11b5c7daf019 ("raw/ntb: add enqueue and dequeue functions") -Cc: stable@dpdk.org Signed-off-by: Xiaoyun Li Reviewed-by: Gavin Hu