[dpdk-dev] [RFC 1/3] Replace lrand48-based rte_rand with LFSR generator

Mattias Rönnblom mattias.ronnblom at ericsson.com
Mon Apr 8 14:47:46 CEST 2019


On 2019-04-08 14:30, Mattias Rönnblom wrote:

> +static void
> +__rte_srand_lfsr113(uint32_t seed, struct rte_rand_state *state)
> +{
> +	uint32_t lcg32_seed = seed;
> +	state->z1 = __rte_rand_lfsr113_gen_seed(&lcg32_seed, 2U);
> +	state->z2 = __rte_rand_lfsr113_gen_seed(&lcg32_seed, 8U);
> +	state->z3 = __rte_rand_lfsr113_gen_seed(&lcg32_seed, 16U);
> +	state->z4 = __rte_rand_lfsr113_gen_seed(&lcg32_seed, 128U);
> +}
> +
> +void __rte_experimental
> +rte_srand(uint64_t seedval)

How do I best avoid around having this function marked as experimental?

If I removed the attribute, the compilation will fail (because of 
check-symbol-change.sh rules).



More information about the dev mailing list