[dpdk-stable] patch 'app/testpmd: use better randomness for Tx split' has been queued to LTS release 17.11.10

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Dec 19 15:34:41 CET 2019


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 <pbhagavatula at marvell.com>
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 <pbhagavatula at marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 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 <pbhagavatula at marvell.com>
 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 at dpdk.org
 
 Signed-off-by: Pavan Nikhilesh <pbhagavatula at marvell.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
@@ -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
 


More information about the stable mailing list