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 9CF10A04F0 for ; Thu, 19 Dec 2019 15:42:04 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 874B71C030; Thu, 19 Dec 2019 15:42:04 +0100 (CET) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by dpdk.org (Postfix) with ESMTP id 3D0DF1C02D for ; Thu, 19 Dec 2019 15:42:03 +0100 (CET) Received: by mail-wr1-f46.google.com with SMTP id z7so6192300wrl.13 for ; Thu, 19 Dec 2019 06:42:03 -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=aOIpLOJulff1YOBv3FqajqFlods5F+/lB09ELHVkT3A=; b=nywQQWV4+0l5JJO8mSIuVSEkDas8I0s6r5wrPt/6wCL8K1+/cVKM2cbwbxBoOFp0Jz oBkV9kwY0c9Beaesduvb7VI+DdKiulO18xSKwv20AvAmQdcL9Ro+369a3ukQdDTC9Jiy iHs0KzhP6hAkCBkjhdvSODt43A9lrAahTo/AkY+J9FNllXbipDi9UQERkIPo9u/gZMZM l0pMcjSvuo49dU2MYyGLljmPM69Gonwl37COrm8Y/RKDPr0x8vb9WG8N9g6VK3UtdHEv Cmn3TgIaOtX5/2uU/bTs2C3q+9n3MHSskX2gH+J4AFY1+LhuwfyOZlIpPv3m+57OLRYs +mpg== 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=aOIpLOJulff1YOBv3FqajqFlods5F+/lB09ELHVkT3A=; b=lr8iBTzXDWYSw1vlDpLihj7X6Xrwm44r0GDmtuaXx/EagRPCnsNfkm3he77a2/3sQc UYOoeEtmVDdC2OO/Dl+HCtBszXgVFucUUYiuuER9kinRbE8l6oj1KC08XzGX3guPfaef sEcSZ8MbMv+CYf/zXE8OjNGUAmEdw5JpbLz7Mnanpy+jh+UGHITJK5qS3gfyLLyYViF7 wUFKayjsfeXDlQlMQmV61SnHli5iD4Mb9YzhI/bU2hWKBc96z80KbmV7zQRY8vvfW7XP TSw6HYewUZWDumu5TibGwSmdSD6CUwM/yT3X7elsjLIBzoRGVu7Tdmy9Hx7HxQ5LpfBX jI+g== X-Gm-Message-State: APjAAAVn/WiPGREdLqK9EGEkKiOD1s1MyvDnLmSyUWLNm0u8BtUI0mDZ 6TFYtt3SjUCaO8ejl6Csp8A= X-Google-Smtp-Source: APXvYqzW+DIqdIT9jDjP3vRknIF/ySt6ZqoDE+5d2UY22g6lFixKBxDwZapq0Z1Z83FNX298Oc5Npw== X-Received: by 2002:a5d:4204:: with SMTP id n4mr9952491wrq.123.1576766522979; Thu, 19 Dec 2019 06:42:02 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id p17sm6563056wrx.20.2019.12.19.06.42.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 06:42:02 -0800 (PST) From: luca.boccassi@gmail.com To: Pavan Nikhilesh Cc: Ferruh Yigit , dpdk stable Date: Thu, 19 Dec 2019 14:34:41 +0000 Message-Id: <20191219143447.21506-134-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 'app/testpmd: use better randomness for Tx split' 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 ebc4dda5675c55af6c0783095b808c9e09602349 Mon Sep 17 00:00:00 2001 From: Pavan Nikhilesh Date: Fri, 22 Nov 2019 01:04:06 +0530 Subject: [PATCH] app/testpmd: use better randomness for Tx split [ upstream commit 7392ad06f5263e33f1583365ef0532ab435fce38 ] Use rte_rand() instead of random() for better randomness. Coverity issue: 337666 Fixes: 79bec05b32b7 ("app/testpmd: add ability to split outgoing packets") Signed-off-by: Pavan Nikhilesh Reviewed-by: Ferruh Yigit --- app/test-pmd/txonly.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c index 4ce4d61cc9..c9e6db9578 100644 --- a/app/test-pmd/txonly.c +++ b/app/test-pmd/txonly.c @@ -234,7 +234,7 @@ pkt_burst_transmit(struct fwd_stream *fs) pkt->data_len = tx_pkt_seg_lengths[0]; pkt_seg = pkt; if (tx_pkt_split == TX_PKT_SPLIT_RND) - nb_segs = random() % tx_pkt_nb_segs + 1; + nb_segs = rte_rand() % tx_pkt_nb_segs + 1; else nb_segs = tx_pkt_nb_segs; pkt_len = pkt->data_len; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-12-19 14:32:31.652063841 +0000 +++ 0134-app-testpmd-use-better-randomness-for-Tx-split.patch 2019-12-19 14:32:26.341302504 +0000 @@ -1,13 +1,14 @@ -From 7392ad06f5263e33f1583365ef0532ab435fce38 Mon Sep 17 00:00:00 2001 +From ebc4dda5675c55af6c0783095b808c9e09602349 Mon Sep 17 00:00:00 2001 From: Pavan Nikhilesh Date: Fri, 22 Nov 2019 01:04:06 +0530 Subject: [PATCH] app/testpmd: use better randomness for Tx split +[ upstream commit 7392ad06f5263e33f1583365ef0532ab435fce38 ] + Use rte_rand() instead of random() for better randomness. Coverity issue: 337666 Fixes: 79bec05b32b7 ("app/testpmd: add ability to split outgoing packets") -Cc: stable@dpdk.org Signed-off-by: Pavan Nikhilesh Reviewed-by: Ferruh Yigit @@ -16,18 +17,18 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c -index 539043c347..3caf281cb8 100644 +index 4ce4d61cc9..c9e6db9578 100644 --- a/app/test-pmd/txonly.c +++ b/app/test-pmd/txonly.c -@@ -159,7 +159,7 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp, - uint8_t i; - - if (unlikely(tx_pkt_split == TX_PKT_SPLIT_RND)) -- nb_segs = random() % tx_pkt_nb_segs + 1; -+ nb_segs = rte_rand() % tx_pkt_nb_segs + 1; - else - nb_segs = tx_pkt_nb_segs; - +@@ -234,7 +234,7 @@ pkt_burst_transmit(struct fwd_stream *fs) + pkt->data_len = tx_pkt_seg_lengths[0]; + pkt_seg = pkt; + if (tx_pkt_split == TX_PKT_SPLIT_RND) +- nb_segs = random() % tx_pkt_nb_segs + 1; ++ nb_segs = rte_rand() % tx_pkt_nb_segs + 1; + else + nb_segs = tx_pkt_nb_segs; + pkt_len = pkt->data_len; -- 2.20.1