DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH dpdk-dev] rte_random: fix crash when random init
@ 2020-04-12  8:27 xiangxia.m.yue
  2020-04-14  4:06 ` Stephen Hemminger
  0 siblings, 1 reply; 9+ messages in thread
From: xiangxia.m.yue @ 2020-04-12  8:27 UTC (permalink / raw)
  To: mattias.ronnblom; +Cc: dev, Tonghao Zhang, stable

From: Tonghao Zhang <xiangxia.m.yue@gmail.com>

When rte_rand_init is invoked, and the kernel
(kernel version < 3.17) running dpdk does't support
*getentropy, at the same time, the cpu does't support
rdseed, the rte_rand_init will invoke rte_get_timer_cycles
which function will invoke rte_get_hpet_cycles
(RTE_LIBEAL_USE_HPET was enabled) while *eal_hpet is not
allocated.

Fixes: faf8fd252785 ("eal: improve entropy for initial PRNG seed")
Fixes: 3f002f069612 ("eal: replace libc-based random generation with LFSR")

Cc: stable@dpdk.org

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
---
 lib/librte_eal/linux/eal_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/linux/eal_timer.c b/lib/librte_eal/linux/eal_timer.c
index a904a8297cd2..4067e46da534 100644
--- a/lib/librte_eal/linux/eal_timer.c
+++ b/lib/librte_eal/linux/eal_timer.c
@@ -26,7 +26,7 @@
 #include "eal_private.h"
 #include "eal_internal_cfg.h"
 
-enum timer_source eal_timer_source = EAL_TIMER_HPET;
+enum timer_source eal_timer_source = EAL_TIMER_TSC;
 
 #ifdef RTE_LIBEAL_USE_HPET
 
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-04-15  8:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-12  8:27 [dpdk-dev] [PATCH dpdk-dev] rte_random: fix crash when random init xiangxia.m.yue
2020-04-14  4:06 ` Stephen Hemminger
2020-04-14  4:43   ` Tonghao Zhang
2020-04-14 13:19     ` Mattias Rönnblom
2020-04-14 13:35       ` David Marchand
2020-04-14 15:37         ` Mattias Rönnblom
2020-04-14 23:42           ` Tonghao Zhang
2020-04-15  6:01             ` Mattias Rönnblom
2020-04-15  8:10               ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).