From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id DBBB01C0B for ; Mon, 30 Apr 2018 16:07:40 +0200 (CEST) Received: by mail-wm0-f67.google.com with SMTP id f8so3911637wmc.4 for ; Mon, 30 Apr 2018 07:07:40 -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; bh=KsJSMnBlAk82h+VAJlzu0/eScDnSr/2yajh10SPSHxE=; b=S1ZQAA401m4lZjH3LnLwXvxXMmoMly+HxG/fw5abYKdSX8TBS2QyI2Aqo5SdSvDad2 60DJUCiSRP8VBSp3i1fy2Xa/zjzZ95njVeAq0fEWeCXbtES68J7qV/8FbMtnEuaEybYK qICcrSR4Glq8Y90CTIL24autZh3Hc+arEVZqDyFPuF+AcGJC18j3cASHzTEJpUKDLVpk 59dycdA3ZGF9uY8n7KOovapuhpw2cuLC/90e9xrb3fu/byCC0dg5gRyHWbN8rCbjIitr IOeheC1Qw8qYgPX1yrIGTdIbrLydYqthWVz+iapcmcTUGN89kIpRJbp4Coj58dJ3ET3L WtVw== 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; bh=KsJSMnBlAk82h+VAJlzu0/eScDnSr/2yajh10SPSHxE=; b=QlmxtIGIgi4XXVrPG6bbO9KKjMXGfH1yFzVkmAg9nZcJvMl3Ltq0K95nlf510F6sBd 9Z/vggaZLV5W9VPLKSaQ1BK2fvPTWVyPb60ZU7/GscssC6Faw9BFPqLOpMJROFvt6uSf oklut89xsDKFSgyausGxn7i4sf3p3EdfALekr5N9sSqQst0JcZbyW1V/gh4Pwl5JrSus UH8loOWQxvjIBtmNK8sGMzegtcSfKiA55wLKs2tE+mY4Vg/5AEPbg3reaiNEZTYKY0yt AbEzbfSrI2mDQP9IWIz4NjIOJHQAV6ygNJtOPNIyF5OrvSusmGQI6MgqTrIfPINHobls Xb5g== X-Gm-Message-State: ALQs6tCriDeFIfF0W/riJb5XpaZpyauA/kqC5ClCdcskZcojxwjQDjZe r1xW4HCu8Aw8XUIlqt6briuqXwKJ1QQ= X-Google-Smtp-Source: AB8JxZqG03uuW6cABPDkUVIArFKj6TrEcfOclRUYQaY3wrDjRtixI6zYF14Un2QT2yUdND7Zm/1P4g== X-Received: by 10.28.22.140 with SMTP id 134mr5585049wmw.53.1525097260533; Mon, 30 Apr 2018 07:07:40 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id l53-v6sm22613962wrc.80.2018.04.30.07.07.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:07:39 -0700 (PDT) From: luca.boccassi@gmail.com To: Alejandro Lucero Cc: dpdk stable Date: Mon, 30 Apr 2018 15:03:26 +0100 Message-Id: <20180430140606.4615-48-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430140606.4615-1-luca.boccassi@gmail.com> References: <20180430140606.4615-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/nfp: fix barrier location' has been queued to stable release 18.02.2 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: , X-List-Received-Date: Mon, 30 Apr 2018 14:07:41 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From fab0ac264c559f651ec7cdbf754ae0e9d9b1d025 Mon Sep 17 00:00:00 2001 From: Alejandro Lucero Date: Thu, 22 Feb 2018 11:30:39 +0000 Subject: [PATCH] net/nfp: fix barrier location [ upstream commit f598e1a2d0e29293b924119c1b3cdd4e16756e95 ] The barrier needs to be after reading the DD bit. It has not been a problem because the potential reads which can not happen before reading the DD bit seem to be far enough, so the compiler is not rescheduling them. However, a refactoring could make this problem to arise. Fixes: b812daadad0d ("nfp: add Rx and Tx") Signed-off-by: Alejandro Lucero --- drivers/net/nfp/nfp_net.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 5180a3189..fc501d6e8 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -2019,16 +2019,16 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) break; } + rxds = &rxq->rxds[rxq->rd_p]; + if ((rxds->rxd.meta_len_dd & PCIE_DESC_RX_DD) == 0) + break; + /* * Memory barrier to ensure that we won't do other * reads before the DD bit. */ rte_rmb(); - rxds = &rxq->rxds[rxq->rd_p]; - if ((rxds->rxd.meta_len_dd & PCIE_DESC_RX_DD) == 0) - break; - /* * We got a packet. Let's alloc a new mbuff for refilling the * free descriptor ring as soon as possible -- 2.14.2