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 975B4A04C3 for ; Fri, 22 Nov 2019 15:43:14 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8C1EC91; Fri, 22 Nov 2019 15:43:14 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 3CDED91 for ; Fri, 22 Nov 2019 15:43:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574433792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PB07TzCTlYlHcbLxN0brpUEl5BdHShcftChOhNtPUSk=; b=d8RrKpoeAGvC1d1wQm6Sg/dl+s11EIzjrezAdxs/QIl/GMcfVNVnZS48U3F9y9S8dG7SgU 43441kEmtlzYznHLDosQze55lV24rs/HB30dBbWPq2GBey/l25l7H0/Z/FmAHRuxrC5qbf kRVK9pgHgjkN9afX0pGh4wr+bmgwmL4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-358-2LffLW73OB-wPaB-HP1uoA-1; Fri, 22 Nov 2019 09:43:09 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 61B55107ACC5; Fri, 22 Nov 2019 14:43:08 +0000 (UTC) Received: from rh.redhat.com (unknown [10.36.118.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 22DF69F47; Fri, 22 Nov 2019 14:43:06 +0000 (UTC) From: Kevin Traynor To: Xiao Zhang Cc: Gavin Hu , Xiaolong Ye , dpdk stable Date: Fri, 22 Nov 2019 14:41:31 +0000 Message-Id: <20191122144131.21231-45-ktraynor@redhat.com> In-Reply-To: <20191122144131.21231-1-ktraynor@redhat.com> References: <20191122144131.21231-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: 2LffLW73OB-wPaB-HP1uoA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'net/e1000: fix memory barrier usage in Tx' has been queued to LTS release 18.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 LTS release 18.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 11/29/19. 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 rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/29152383a7bf8a055b= f83c63da435337f9d681b3 Thanks. Kevin. --- >From 29152383a7bf8a055bf83c63da435337f9d681b3 Mon Sep 17 00:00:00 2001 From: Xiao Zhang Date: Wed, 11 Sep 2019 01:41:18 +0800 Subject: [PATCH] net/e1000: fix memory barrier usage in Tx [ upstream commit d6956e92390c8fb2fcbd0f3363169b88a012154c] Use rte_cio_wmb instead of rte_wmb when writing TX descriptor since it's CIO memory. Replace rte_io_wmb and E1000_PCI_REG_WRITE_RELAXED with E1000_PCI_REG_WRITE since it has rte_io_wmb inside, which will be more clear. Fixes: 1fc9701238ed ("net/e1000: fix i219 hang on reset/close") Signed-off-by: Xiao Zhang Reviewed-by: Gavin Hu Reviewed-by: Xiaolong Ye --- drivers/net/e1000/em_rxtx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c index 951d1642c..322c98422 100644 --- a/drivers/net/e1000/em_rxtx.c +++ b/drivers/net/e1000/em_rxtx.c @@ -2050,11 +2050,10 @@ e1000_flush_tx_ring(struct rte_eth_dev *dev) =09=09tx_desc->upper.data =3D 0; =20 -=09=09rte_wmb(); +=09=09rte_cio_wmb(); =09=09txq->tx_tail++; =09=09if (txq->tx_tail =3D=3D txq->nb_tx_desc) =09=09=09txq->tx_tail =3D 0; -=09=09rte_io_wmb(); =09=09tdt_reg_addr =3D E1000_PCI_REG_ADDR(hw, E1000_TDT(i)); -=09=09E1000_PCI_REG_WRITE_RELAXED(tdt_reg_addr, txq->tx_tail); +=09=09E1000_PCI_REG_WRITE(tdt_reg_addr, txq->tx_tail); =09=09usec_delay(250); =09} --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-11-22 14:36:57.594255630 +0000 +++ 0045-net-e1000-fix-memory-barrier-usage-in-Tx.patch=092019-11-22 14:36:= 55.233148517 +0000 @@ -0,0 +1,43 @@ +From 29152383a7bf8a055bf83c63da435337f9d681b3 Mon Sep 17 00:00:00 2001 +From: Xiao Zhang +Date: Wed, 11 Sep 2019 01:41:18 +0800 +Subject: [PATCH] net/e1000: fix memory barrier usage in Tx + +[ upstream commit d6956e92390c8fb2fcbd0f3363169b88a012154c] + +Use rte_cio_wmb instead of rte_wmb when writing TX descriptor since it's +CIO memory. +Replace rte_io_wmb and E1000_PCI_REG_WRITE_RELAXED with +E1000_PCI_REG_WRITE since it has rte_io_wmb inside, which will be more +clear. + +Fixes: 1fc9701238ed ("net/e1000: fix i219 hang on reset/close") + +Signed-off-by: Xiao Zhang +Reviewed-by: Gavin Hu +Reviewed-by: Xiaolong Ye +--- + drivers/net/e1000/em_rxtx.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c +index 951d1642c..322c98422 100644 +--- a/drivers/net/e1000/em_rxtx.c ++++ b/drivers/net/e1000/em_rxtx.c +@@ -2050,11 +2050,10 @@ e1000_flush_tx_ring(struct rte_eth_dev *dev) + =09=09tx_desc->upper.data =3D 0; +=20 +-=09=09rte_wmb(); ++=09=09rte_cio_wmb(); + =09=09txq->tx_tail++; + =09=09if (txq->tx_tail =3D=3D txq->nb_tx_desc) + =09=09=09txq->tx_tail =3D 0; +-=09=09rte_io_wmb(); + =09=09tdt_reg_addr =3D E1000_PCI_REG_ADDR(hw, E1000_TDT(i)); +-=09=09E1000_PCI_REG_WRITE_RELAXED(tdt_reg_addr, txq->tx_tail); ++=09=09E1000_PCI_REG_WRITE(tdt_reg_addr, txq->tx_tail); + =09=09usec_delay(250); + =09} +--=20 +2.21.0 +