git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c5b169
)
app/testpmd: use better randomness for Tx split
author
Pavan Nikhilesh
<pbhagavatula@marvell.com>
Thu, 21 Nov 2019 19:34:06 +0000
(
01:04
+0530)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Tue, 26 Nov 2019 17:05:15 +0000
(18:05 +0100)
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 <pbhagavatula@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
app/test-pmd/txonly.c
patch
|
blob
|
history
diff --git
a/app/test-pmd/txonly.c
b/app/test-pmd/txonly.c
index
539043c
..
3caf281
100644
(file)
--- 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 = r
andom
() % tx_pkt_nb_segs + 1;
+ nb_segs = r
te_rand
() % tx_pkt_nb_segs + 1;
else
nb_segs = tx_pkt_nb_segs;