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

Pablo de Lara pablo.de.lara.guarch at intel.com
Wed Jun 21 01:25:50 CEST 2017


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.

Pablo de Lara (5):
  eal: check if socket has memory reserved
  cryptodev: check if socket id has memory
  crypto/scheduler: check if socket id has memory
  net/bonding: check if socket id has memory
  test/bonding: check if socket id has memory

 drivers/crypto/scheduler/scheduler_pmd.c        | 23 ++++-------------------
 drivers/net/bonding/rte_eth_bond_api.c          | 16 ----------------
 drivers/net/bonding/rte_eth_bond_args.c         |  2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c          |  7 ++++---
 drivers/net/bonding/rte_eth_bond_private.h      |  3 ---
 lib/librte_cryptodev/rte_cryptodev.c            | 23 ++++-------------------
 lib/librte_eal/bsdapp/eal/rte_eal_version.map   |  7 +++++++
 lib/librte_eal/common/eal_common_memory.c       | 17 +++++++++++++++++
 lib/librte_eal/common/include/rte_memory.h      |  9 +++++++++
 lib/librte_eal/linuxapp/eal/rte_eal_version.map |  7 +++++++
 test/test/virtual_pmd.c                         | 16 +---------------
 11 files changed, 54 insertions(+), 76 deletions(-)

-- 
2.9.4



More information about the dev mailing list