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 09F9AA0524 for ; Fri, 5 Feb 2021 12:31:40 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 02DB9188949; Fri, 5 Feb 2021 12:31:40 +0100 (CET) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mails.dpdk.org (Postfix) with ESMTP id 5FC6518892B for ; Fri, 5 Feb 2021 12:31:38 +0100 (CET) Received: by mail-wm1-f44.google.com with SMTP id m1so5644710wml.2 for ; Fri, 05 Feb 2021 03:31:38 -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=OCLU4Tbw9HGUiHLss/uDz2XKXTjD4eKfTTnmcksmvR0=; b=uiEdXZLoq4vDeG4XNbr0qlexKDbr2PhW2aV1E69QKJ2jltBvf2ghlsvGL2TtTg49yX L7KfHl0AOTrG18I7yOlYqLq3fybyeGidg/MIRrjJUraubOoPTvxsO5zV4NrcDhDbmy92 zPVYlpIM/ceBxNUe56fKSUmQvF+e3mL5nsT7OxVs/z47Yuaaf9WXTHc69iAzpDS+Ly+H uv5CJTaoAzUM3omFQquochGT7Qzv1/HPBXx0Ci6kTQKmWxghBqcujWjAm5ro8fyb6XxN Yfn8WVc2bmndixTwp9JZbFezzUoMFDESw282vLb/uK+XgCqgQdQYkMkjT0d1NX6P5d5A z2pA== 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=OCLU4Tbw9HGUiHLss/uDz2XKXTjD4eKfTTnmcksmvR0=; b=rOEv8OHYWUh06WXE1/PkbnaAPNA3bwmDo8kFtnio7rLw2u/b20CCEYyu0FzpJs4JPN lkEM5w6LwAOnA8u6OEzZAfvH7iWTmTM4hpITvz+GfXl8aM9Z4f0LPUezcGBR+yM1MP2D spy50FHyhVVv5Tu4mwQezgJZ6RVJQ3t1BmXj5gc8gNRIYmBx9or/28Cq1OQR507YHG5s +IvsoGHZULhlAvywrc3QYjOFFtYVARsoZ3ZF9jcFQAC66pj/Cj80lzwkkTMC57wp3xWX ZqGgsKbt7Ml/ee8TriTduNPm0uqgC9xPIYMbSUAqV5e1qz2vuISvkOpu00TYApsdf1ra /AlA== X-Gm-Message-State: AOAM532GgaeGDN9pD8N7WFXc+0ncKmiZf9Z8lY28oP/1OU7PzkxPnGWe mRlrjaW2S14DNVwc6x4iSA8= X-Google-Smtp-Source: ABdhPJxOUO0Ttthmk+8XkiHZoQmtXU1qCcZk2h8+OHGfRO6Tx1MYfPAjUk6k3xBhMj1gyuYDsd5vlw== X-Received: by 2002:a1c:e043:: with SMTP id x64mr225947wmg.75.1612524698175; Fri, 05 Feb 2021 03:31:38 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id x13sm3407543wmc.27.2021.02.05.03.31.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:31:37 -0800 (PST) From: luca.boccassi@gmail.com To: Alvin Zhang Cc: Jeff Guo , Wei Ling , dpdk stable Date: Fri, 5 Feb 2021 11:16:49 +0000 Message-Id: <20210205111920.1272063-123-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'test: fix buffer overflow in Tx burst' has been queued to stable release 20.11.1 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/07/21. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/3f39b9182dd705b7e5aec944411cfee3987f79c4 Thanks. Luca Boccassi --- >From 3f39b9182dd705b7e5aec944411cfee3987f79c4 Mon Sep 17 00:00:00 2001 From: Alvin Zhang Date: Wed, 25 Nov 2020 17:46:22 +0800 Subject: [PATCH] test: fix buffer overflow in Tx burst [ upstream commit 58325f094a059e8ef4e1085d322a46107aad468f ] The Tx buffer may overflow when there is more than one port. Fixes: 002ade70e933 ("app/test: measure cycles per packet in Rx/Tx") Signed-off-by: Alvin Zhang Acked-by: Jeff Guo Tested-by: Wei Ling --- app/test/test_pmd_perf.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c index 4db816a360..3a248d512c 100644 --- a/app/test/test_pmd_perf.c +++ b/app/test/test_pmd_perf.c @@ -606,10 +606,10 @@ timeout: static int exec_burst(uint32_t flags, int lcore) { - unsigned i, portid, nb_tx = 0; + unsigned int portid, nb_tx = 0; struct lcore_conf *conf; uint32_t pkt_per_port; - int num, idx = 0; + int num, i, idx = 0; int diff_tsc; conf = &lcore_conf[lcore]; @@ -628,16 +628,14 @@ exec_burst(uint32_t flags, int lcore) rte_atomic64_set(&start, 1); /* start xmit */ + i = 0; while (num) { nb_tx = RTE_MIN(MAX_PKT_BURST, num); - for (i = 0; i < conf->nb_ports; i++) { - portid = conf->portlist[i]; - nb_tx = rte_eth_tx_burst(portid, 0, - &tx_burst[idx], nb_tx); - idx += nb_tx; - num -= nb_tx; - } - + portid = conf->portlist[i]; + nb_tx = rte_eth_tx_burst(portid, 0, &tx_burst[idx], nb_tx); + idx += nb_tx; + num -= nb_tx; + i = (i >= conf->nb_ports - 1) ? 0 : (i + 1); } sleep(5); -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:34.710114484 +0000 +++ 0123-test-fix-buffer-overflow-in-Tx-burst.patch 2021-02-05 11:18:28.994694692 +0000 @@ -1 +1 @@ -From 58325f094a059e8ef4e1085d322a46107aad468f Mon Sep 17 00:00:00 2001 +From 3f39b9182dd705b7e5aec944411cfee3987f79c4 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 58325f094a059e8ef4e1085d322a46107aad468f ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org