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 016EBA04F3 for ; Thu, 19 Dec 2019 15:36:20 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EC56D1BF76; Thu, 19 Dec 2019 15:36:19 +0100 (CET) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id BAB6E1BF76 for ; Thu, 19 Dec 2019 15:36:18 +0100 (CET) Received: by mail-wm1-f66.google.com with SMTP id a5so5669753wmb.0 for ; Thu, 19 Dec 2019 06:36:18 -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=NrBYVDsimam6q7/SzXgTSj2q2v0ysz9jigB84tRyIb8=; b=r1UI/3goUO0JBH+ZAP0xAatWQGi33vZB4xRKRM0Z6mpnUrH2SDbf0KmAEXM9rKKX7Y vGj31eTiSahK+n4WDYpPXld5/n3PYFOVf+ug4tJzTNlI3ofMOuqrC8thLClxEIuz/bjV EzrVgU49ObF6XtAoyiEz60vvIWXyZWJCw74T7dxsVi0P7gI2OE75PBgmwpTQ4MUCbS+J y2jdjJmuLjI1u3TG5TrrRe2u/8g47VW8NsabTmBGzY6vdVYrM6uWcuOKzPDCv+AV7fpq rJCj22Bs9swlSwKUhX8tQam47PvrtTPaO7pD/t2Jjq9LTdxFwVuhnhiGF18WE1zpx2uV 0CtA== 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=NrBYVDsimam6q7/SzXgTSj2q2v0ysz9jigB84tRyIb8=; b=hZZjIOLfmdE5f/c39F61YRPAO6jR62sxdZKpgV+XDDSKwfmnV/Z/1x0M+R938SKZae qETYYpDDeUgnTQq2qRxFKDpGXG1TcX3M7lPE4fE3qQ73uEwhGlSfFHaQHX8fiYCntHzG fJQsJyK7PyZLDJ597nIFZw3C9Os8F+f9oOOm3a9Df6b7DCQi5pu1t6f2ktmegzQyIWj8 Iir2bTWCGZNXE4V2vaKILXP0NszPZ4gz4vsM1Y9gyWEDeRrjxQ6BS/8fGtBh6Q6HPP86 x2IiTpx8Nc/8f7bVb35tVews3YosHeDxfAl5/llj0pyUOz8nFIoSXOBJc1xqEYH9pIWd bUWw== X-Gm-Message-State: APjAAAVH9CCn8XcnA+IudxPb7Hp3s8M2HtnZzRS1EUO+yy3K2NRXFvj0 q4zwMC6PEWDkr9HVvsfk1UPzGpqDpR0= X-Google-Smtp-Source: APXvYqxSiAVGR3TDXrascztOoQDornfPqf4uElirFlj/FVYZqV3Eha2KRj3o/eGerQpwQ99Ud5QZ3w== X-Received: by 2002:a1c:5419:: with SMTP id i25mr10631362wmb.150.1576766178474; Thu, 19 Dec 2019 06:36:18 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id o4sm6448542wrw.97.2019.12.19.06.36.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 06:36:18 -0800 (PST) From: luca.boccassi@gmail.com To: Rahul Lakkireddy Cc: dpdk stable Date: Thu, 19 Dec 2019 14:33:03 +0000 Message-Id: <20191219143447.21506-36-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191219143447.21506-1-luca.boccassi@gmail.com> References: <20191219143447.21506-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/cxgbe: fix prefetch for non-coalesced Tx packets' has been queued to LTS release 17.11.10 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 17.11.10 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/21/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 rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 6214aefb3c52a64a9a0e6da4506323f5eb683ab3 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_ethdev.c index dc153c7312..8b5b9b4edb 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -91,6 +91,7 @@ static uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, struct sge_eth_txq *txq = (struct sge_eth_txq *)tx_queue; uint16_t pkts_sent, pkts_remain; uint16_t total_sent = 0; + uint16_t idx = 0; int ret = 0; CXGBE_DEBUG_TX(adapter, "%s: txq = %p; tx_pkts = %p; nb_pkts = %d\n", @@ -99,12 +100,16 @@ static uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, t4_os_lock(&txq->txq_lock); /* free up desc from already completed tx */ reclaim_completed_tx(&txq->q); + rte_prefetch0(rte_pktmbuf_mtod(tx_pkts[0], volatile void *)); while (total_sent < nb_pkts) { pkts_remain = nb_pkts - total_sent; for (pkts_sent = 0; pkts_sent < pkts_remain; pkts_sent++) { - ret = t4_eth_xmit(txq, tx_pkts[total_sent + pkts_sent], - nb_pkts); + idx = total_sent + pkts_sent; + if ((idx + 1) < nb_pkts) + rte_prefetch0(rte_pktmbuf_mtod(tx_pkts[idx + 1], + volatile void *)); + ret = t4_eth_xmit(txq, tx_pkts[idx], nb_pkts); if (ret < 0) break; } diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c index babff0b9b1..9dddea5324 100644 --- a/drivers/net/cxgbe/sge.c +++ b/drivers/net/cxgbe/sge.c @@ -1130,7 +1130,6 @@ out_free: txq->stats.mapping_err++; goto out_free; } - rte_prefetch0((volatile void *)addr); return tx_do_packet_coalesce(txq, mbuf, cflits, adap, pi, addr, nb_pkts); } else { -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-12-19 14:32:27.773131736 +0000 +++ 0036-net-cxgbe-fix-prefetch-for-non-coalesced-Tx-packets.patch 2019-12-19 14:32:25.841292591 +0000 @@ -1,13 +1,14 @@ -From b1df19e43e1d1415ab7fae119e672a2f3b8f39f0 Mon Sep 17 00:00:00 2001 +From 6214aefb3c52a64a9a0e6da4506323f5eb683ab3 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") -Cc: stable@dpdk.org Signed-off-by: Rahul Lakkireddy --- @@ -16,10 +17,10 @@ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c -index 7d7be69edd..5d74f8ba3b 100644 +index dc153c7312..8b5b9b4edb 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c -@@ -67,6 +67,7 @@ uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, +@@ -91,6 +91,7 @@ static uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, struct sge_eth_txq *txq = (struct sge_eth_txq *)tx_queue; uint16_t pkts_sent, pkts_remain; uint16_t total_sent = 0; @@ -27,7 +28,7 @@ int ret = 0; CXGBE_DEBUG_TX(adapter, "%s: txq = %p; tx_pkts = %p; nb_pkts = %d\n", -@@ -75,12 +76,16 @@ uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, +@@ -99,12 +100,16 @@ static uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, t4_os_lock(&txq->txq_lock); /* free up desc from already completed tx */ reclaim_completed_tx(&txq->q); @@ -47,10 +48,10 @@ break; } diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c -index 641be96578..bf31902111 100644 +index babff0b9b1..9dddea5324 100644 --- a/drivers/net/cxgbe/sge.c +++ b/drivers/net/cxgbe/sge.c -@@ -1154,7 +1154,6 @@ out_free: +@@ -1130,7 +1130,6 @@ out_free: txq->stats.mapping_err++; goto out_free; }