[dpdk-dev] [PATCH 0/5] eal: check socket memory

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Wed Jun 21 13:33:52 CEST 2017

> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Wednesday, June 21, 2017 12:26 AM
> To: thomas at monjalon.net; Doherty, Declan <declan.doherty at intel.com>
> Cc: dev at dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch at intel.com>
> Subject: [PATCH 0/5] eal: check socket memory
> Several drivers, libraries and apps check if a socket has reserved memory, by
> implementing their own function, which returns the total number of sockets that
> have memory.
> First of all, this function is not completely correct, as it really returns the highest
> socket id that has memory.
> So, if all the sockets up to that one has memory, then it really returns the total
> number of sockets with memory, but it there is at least one in the middle
> without memory, then total number of sockets should be less than the value
> returned.
> Besides, this function is not really useful, as the main goal is to check if memory
> on a specific socket is available, rather than checking if a socket id is beyond the
> total number of sockets.
> Therefore, it looks more useful to have a function in EAL that returns if a socket
> has memory reserved, which can be used in these files.

Looking at this again, probably having this check is not necessary,
as this will be checked when attempting to allocate the memory.
Will send a v2, to remove the check completely.

More information about the dev mailing list