From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 63604A00C2 for ; Thu, 3 Nov 2022 10:32:12 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5FF3F42684; Thu, 3 Nov 2022 10:32:12 +0100 (CET) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mails.dpdk.org (Postfix) with ESMTP id 716A040693 for ; Thu, 3 Nov 2022 10:32:10 +0100 (CET) Received: by mail-wr1-f52.google.com with SMTP id v1so1694658wrt.11 for ; Thu, 03 Nov 2022 02:32:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hI5SXzrGRsaxDm5m/ygcuUn5VBz43wpWtuoo+xmw/Sk=; b=J8IuDcesncy3zihvqIUvtKxUFiC37QEnrBo2p/ZHJPdYk0RyxAxLvZr+ihJJoQU4k0 7Gqs48yh6QTE97Wfz8/RKAVPrbw89PIYIVXfwnc+m8oIdmEqImplc8cCVdwg4/cPAO6M CJ5WoVtMSHUn2jfAOiKlYlWcDNghtsN+LeYKFBsnjrldEp55uju9wNRuKfSiyyMF24ig RAHwaSm5hCgedQNqck8M9n8wwiVXMYL2JUAzN8xb+aK4HXWCb/0+ct/btPPU28u5qG5Q pVzHtZl0uz8rb1VFLlxqRC+92wIYmRrKmBYJ+qwBG4A27JGirsQjLgbu7GX/FFI0gBBZ QkDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hI5SXzrGRsaxDm5m/ygcuUn5VBz43wpWtuoo+xmw/Sk=; b=3b6y/2xd1OKDY/i8NcX9m2+k8W17ah31pkgN4ZV3DDjX3zwVn3Y0aUBFuKXY6Yjsfg +n29rjieMvTvAw/1gvfm/aqHDzrwjuMleMZxF7MRTyVFm00/CYmXlCWRq04vCclif9h0 ROiKrpIgyZ/xBHtm7HYfq7AKITw8k/LaEIiA+LFW5LuRPC2BQNCxUDRIgHwlFyy0xGA6 NLf+mI8jbzAq7t747fyYQboWYUv5f80U0Mm/Fqr7TNQJlwj7A/CqwTXjITEn1FfNg/6z ukh2qPR7WZFF98PT7TVLsbNp6+qmxd3iKvC5/gAS2fjDgr9alqtHx18h3JTWj80JZfyz +GZA== X-Gm-Message-State: ACrzQf0UlbAlWxAMeUofQTgOmAswXOsid0qCLhRlUIYDqLu+SJ9AYGGi JLF8ymy0rJCeX8NQAMG4vcUtvKRBjO8qpb3i X-Google-Smtp-Source: AMsMyM4PUYJT+qIg295b9RTvVhV2fWJyIkIDEQVXS9aBV1BoZpV0OVoPzy6/1iV7stLn0v6SGoOcwA== X-Received: by 2002:a5d:5d87:0:b0:22a:bbc5:5afe with SMTP id ci7-20020a5d5d87000000b0022abbc55afemr17910435wrb.235.1667467930170; Thu, 03 Nov 2022 02:32:10 -0700 (PDT) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id m16-20020a5d6250000000b00236860e7e9esm333223wrv.98.2022.11.03.02.32.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 02:32:09 -0700 (PDT) From: luca.boccassi@gmail.com To: Chengwen Feng Cc: dpdk stable Subject: patch 'net/hns3: optimize SVE Tx performance' has been queued to stable release 20.11.7 Date: Thu, 3 Nov 2022 09:27:32 +0000 Message-Id: <20221103092758.1099402-74-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103092758.1099402-1-luca.boccassi@gmail.com> References: <20221103092758.1099402-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 20.11.7 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/05/22. 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. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/af4494eb82d7da5ec8e219cf671cecc43ed45b1a Thanks. Luca Boccassi --- >From af4494eb82d7da5ec8e219cf671cecc43ed45b1a Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Mon, 5 Sep 2022 16:59:35 +0800 Subject: [PATCH] net/hns3: optimize SVE Tx performance [ upstream commit 12590fc503e967df1e6e34667682fbb27aed5364 ] Optimize SVE xmit algorithm performance, will get about 1%+ performance gain under 64B macfwd. Signed-off-by: Chengwen Feng --- drivers/net/hns3/hns3_rxtx_vec_sve.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/net/hns3/hns3_rxtx_vec_sve.c b/drivers/net/hns3/hns3_rxtx_vec_sve.c index e7446eb017..888008d73f 100644 --- a/drivers/net/hns3/hns3_rxtx_vec_sve.c +++ b/drivers/net/hns3/hns3_rxtx_vec_sve.c @@ -384,10 +384,12 @@ hns3_tx_fill_hw_ring_sve(struct hns3_tx_queue *txq, HNS3_UINT32_BIT; svuint64_t base_addr, buf_iova, data_off, data_len, addr; svuint64_t offsets = svindex_u64(0, BD_SIZE); - uint32_t i = 0; - svbool_t pg = svwhilelt_b64_u32(i, nb_pkts); + uint32_t cnt = svcntd(); + svbool_t pg; + uint32_t i; - do { + for (i = 0; i < nb_pkts; /* i is updated in the inner loop */) { + pg = svwhilelt_b64_u32(i, nb_pkts); base_addr = svld1_u64(pg, (uint64_t *)pkts); /* calc mbuf's field buf_iova address */ buf_iova = svadd_n_u64_z(pg, base_addr, @@ -429,12 +431,11 @@ hns3_tx_fill_hw_ring_sve(struct hns3_tx_queue *txq, offsets, svdup_n_u64(valid_bit)); /* update index for next loop */ - i += svcntd(); - pkts += svcntd(); - txdp += svcntd(); - tx_entry += svcntd(); - pg = svwhilelt_b64_u32(i, nb_pkts); - } while (svptest_any(svptrue_b64(), pg)); + i += cnt; + pkts += cnt; + txdp += cnt; + tx_entry += cnt; + } } static uint16_t -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:29.847558960 +0000 +++ 0074-net-hns3-optimize-SVE-Tx-performance.patch 2022-11-03 09:27:25.505424996 +0000 @@ -1 +1 @@ -From 12590fc503e967df1e6e34667682fbb27aed5364 Mon Sep 17 00:00:00 2001 +From af4494eb82d7da5ec8e219cf671cecc43ed45b1a Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 12590fc503e967df1e6e34667682fbb27aed5364 ] + @@ -9,2 +10,0 @@ -Cc: stable@dpdk.org - @@ -17 +17 @@ -index f09a81dbd5..6f23ba674d 100644 +index e7446eb017..888008d73f 100644 @@ -20 +20 @@ -@@ -389,10 +389,12 @@ hns3_tx_fill_hw_ring_sve(struct hns3_tx_queue *txq, +@@ -384,10 +384,12 @@ hns3_tx_fill_hw_ring_sve(struct hns3_tx_queue *txq, @@ -36,2 +36,2 @@ -@@ -439,12 +441,11 @@ hns3_tx_fill_hw_ring_sve(struct hns3_tx_queue *txq, - (svaddv_u64(pg, data_len) >> HNS3_UINT16_BIT); +@@ -429,12 +431,11 @@ hns3_tx_fill_hw_ring_sve(struct hns3_tx_queue *txq, + offsets, svdup_n_u64(valid_bit));