On Tue, Apr 21, 2020 at 6:03 PM Stephen Hemminger <step...@networkplumber.org> wrote: > > On Tue, 21 Apr 2020 16:54:45 -0300 > Dan Gora <d...@adax.com> wrote: > > > The getentropy() function was introduced into glibc v2.25 and so is > > not available on all supported platforms. Previously, if DPDK was > > compiled (using meson) on a system which has getentropy(), it would > > introduce a dependency on glibc v2.25 which would prevent that binary > > from running on a system with an older glibc. Similarly if DPDK was > > compiled on a system which did not have getentropy(), getentropy() > > could not be used even if the execution system supported it. > > > > Introduce a new static function, __rte_getentropy() which will try to > > resolve the getentropy() function dynamically using dlopen()/dlsym(), > > returning failure if the getentropy() function cannot be resolved or > > if it fails. > > > > This also allows getentropy() to be used as the random seed source > > when the traditional Makefile build for DPDK is used. > > > > Signed-off-by: Dan Gora <d...@adax.com> > > I don't think DPDK has a requirement that building on newer glibc > has to work when run on older version. Glibc doesn't support it.
Maybe it's not a requirement, but it's nice to not have to worry about it. Plus, you can compile on a machine which doesn't have getentropy(), but still use it if it's available on the execution machine. It just removes one more requirement that has to match between the compilation and target environement. thanks dan