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 A9DCBA04B5 for ; Tue, 3 Dec 2019 19:28:06 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A19291BE84; Tue, 3 Dec 2019 19:28:06 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id D99041BEA5 for ; Tue, 3 Dec 2019 19:28:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575397684; 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=dLFdJuFlOJRBdUO+KoLlN+rdxksx78j4UoSLf2lgTck=; b=DZtoE68q4fix6NC4+9MpP6nvjlJWW7FF8Tv6jsM78tYZbz2Kb1knlRQdvW3QrPwjLvnek8 h0aajMhatLgotj3kWrF2uSu6/OWZBhTt7TJX5N1CKIdzn3SKr/zveDgZMk/Iurj9qjewb6 MkFeY5B5Z9t/DAPTuSds3MqHWwp51fk= 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-105-ak1KJDfVOKihMd4nM3fQfw-1; Tue, 03 Dec 2019 13:28:03 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 262C38024CB; Tue, 3 Dec 2019 18:28:02 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-10.ams2.redhat.com [10.36.117.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1DF765C554; Tue, 3 Dec 2019 18:28:00 +0000 (UTC) From: Kevin Traynor To: Rahul Lakkireddy Cc: dpdk stable Date: Tue, 3 Dec 2019 18:26:27 +0000 Message-Id: <20191203182714.17297-18-ktraynor@redhat.com> In-Reply-To: <20191203182714.17297-1-ktraynor@redhat.com> References: <20191203182714.17297-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: ak1KJDfVOKihMd4nM3fQfw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'net/cxgbe: fix prefetch for non-coalesced Tx packets' 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 12/10/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/6072887060f9efeec9= fed1546220ca2a7f2597d0 Thanks. Kevin. --- >From 6072887060f9efeec9fed1546220ca2a7f2597d0 Mon Sep 17 00:00:00 2001 From: Rahul Lakkireddy Date: Sat, 28 Sep 2019 02:00:05 +0530 Subject: [PATCH] net/cxgbe: fix prefetch for non-coalesced Tx packets [ upstream commit b1df19e43e1d1415ab7fae119e672a2f3b8f39f0 ] Move prefetch code out of Tx coalesce path to allow prefetching for non-coalesced Tx packets, as well. Fixes: bf89cbedd2d9 ("cxgbe: optimize forwarding performance for 40G") Signed-off-by: Rahul Lakkireddy --- drivers/net/cxgbe/cxgbe_ethdev.c | 9 +++++++-- drivers/net/cxgbe/sge.c | 1 - 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_eth= dev.c index 8926f8a29..5839a7bef 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -66,4 +66,5 @@ uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf = **tx_pkts, =09uint16_t pkts_sent, pkts_remain; =09uint16_t total_sent =3D 0; +=09uint16_t idx =3D 0; =09int ret =3D 0; =20 @@ -74,10 +75,14 @@ uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbu= f **tx_pkts, =09/* free up desc from already completed tx */ =09reclaim_completed_tx(&txq->q); +=09rte_prefetch0(rte_pktmbuf_mtod(tx_pkts[0], volatile void *)); =09while (total_sent < nb_pkts) { =09=09pkts_remain =3D nb_pkts - total_sent; =20 =09=09for (pkts_sent =3D 0; pkts_sent < pkts_remain; pkts_sent++) { -=09=09=09ret =3D t4_eth_xmit(txq, tx_pkts[total_sent + pkts_sent], -=09=09=09=09=09 nb_pkts); +=09=09=09idx =3D total_sent + pkts_sent; +=09=09=09if ((idx + 1) < nb_pkts) +=09=09=09=09rte_prefetch0(rte_pktmbuf_mtod(tx_pkts[idx + 1], +=09=09=09=09=09=09=09volatile void *)); +=09=09=09ret =3D t4_eth_xmit(txq, tx_pkts[idx], nb_pkts); =09=09=09if (ret < 0) =09=09=09=09break; diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c index ea28ea06c..172109c26 100644 --- a/drivers/net/cxgbe/sge.c +++ b/drivers/net/cxgbe/sge.c @@ -1153,5 +1153,4 @@ out_free: =09=09=09=09goto out_free; =09=09=09} -=09=09=09rte_prefetch0((volatile void *)addr); =09=09=09return tx_do_packet_coalesce(txq, mbuf, cflits, adap, =09=09=09=09=09=09 pi, addr, nb_pkts); --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-03 17:29:52.869695723 +0000 +++ 0018-net-cxgbe-fix-prefetch-for-non-coalesced-Tx-packets.patch=092019-1= 2-03 17:29:51.719750599 +0000 @@ -1 +1 @@ -From b1df19e43e1d1415ab7fae119e672a2f3b8f39f0 Mon Sep 17 00:00:00 2001 +From 6072887060f9efeec9fed1546220ca2a7f2597d0 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b1df19e43e1d1415ab7fae119e672a2f3b8f39f0 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 7d7be69ed..5d74f8ba3 100644 +index 8926f8a29..5839a7bef 100644 @@ -22 +23 @@ -@@ -68,4 +68,5 @@ uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf= **tx_pkts, +@@ -66,4 +66,5 @@ uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf= **tx_pkts, @@ -28 +29 @@ -@@ -76,10 +77,14 @@ uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mb= uf **tx_pkts, +@@ -74,10 +75,14 @@ uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mb= uf **tx_pkts, @@ -46 +47 @@ -index 641be9657..bf3190211 100644 +index ea28ea06c..172109c26 100644 @@ -49 +50 @@ -@@ -1155,5 +1155,4 @@ out_free: +@@ -1153,5 +1153,4 @@ out_free: