> From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com] > Sent: Tuesday, 20 February 2024 09.49 >
[...] > @@ -124,11 +129,10 @@ struct rte_rand_state *__rte_rand_get_state(void) > > idx = rte_lcore_id(); > > - /* last instance reserved for unregistered non-EAL threads */ > if (unlikely(idx == LCORE_ID_ANY)) idx is now only used here, so you could get rid of it by comparing directly to rte_lcore_id() instead. Minor detail only; don't spin the patch for it. > - idx = RTE_MAX_LCORE; > + return &unregistered_rand_state; > > - return &rand_states[idx]; > + return RTE_LCORE_VAR_PTR(rand_state); > }