[dpdk-dev] [PATCH v3] eal: fix crash when the random init

David Marchand david.marchand at redhat.com
Tue Apr 21 18:17:48 CEST 2020


On Fri, Apr 17, 2020 at 1:37 PM <xiangxia.m.yue at gmail.com> wrote:
>
> From: Tonghao Zhang <xiangxia.m.yue at gmail.com>
>
> When rte_rand_init is invoked, and the kernel running dpdk does't
> support *getentropy, at the same time, the cpu does't support rdseed,
> then rte_rand_init invoked rte_get_timer_cycles.
>
> If HPET was enabled in the DPDK build (CONFIG_RTE_LIBEAL_USE_HPET=y).
> rte_get_timer_cycles will invoke rte_get_hpet_cycles while *eal_hpet
> is not available.
>
> To fix that, use rte_get_tsc_cycles instead of rte_get_timer_cycles.
>
> Fixes: 3f002f069612 ("eal: replace libc-based random generation with LFSR")
> Cc: stable at dpdk.org
>
> Signed-off-by: Tonghao Zhang <xiangxia.m.yue at gmail.com>
> Acked-by: Mattias Rönnblom <mattias.ronnblom at ericsson.com>

Applied, thanks.


-- 
David Marchand



More information about the dev mailing list