numam-dpdk/lib/librte_lpm
Olivier Matz f82f705b63 lpm: fix allocation of an existing object
Change rte_lpm*_create() functions to return NULL and set rte_errno to
EEXIST when the object name already exists. This is the behavior
described in the API documentation in the header file.

These functions were returning a pointer to the existing object in that
case, but it is a problem as the caller did not know if the object had
to be freed or not.

Doing this change also makes the lpm API more consistent with the other
APIs (mempool, rings, ...).

Fixes: 916e4f4f4e ("memory: fix for multi process support")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-04-06 17:30:06 +02:00
..
Makefile lpm/arm: support NEON 2016-03-11 15:56:07 +01:00
rte_lpm6.c lpm: fix allocation of an existing object 2016-04-06 17:30:06 +02:00
rte_lpm6.h tailq: move to dynamic tailq 2015-03-10 12:06:08 +01:00
rte_lpm_neon.h lpm/arm: support NEON 2016-03-11 15:56:07 +01:00
rte_lpm_sse.h lpm/x86: move SSE implementation to be architecture agnostic 2016-03-11 15:50:11 +01:00
rte_lpm_version.map lpm: extend IPv4 next hop field 2016-03-09 22:57:43 +01:00
rte_lpm.c lpm: fix allocation of an existing object 2016-04-06 17:30:06 +02:00
rte_lpm.h lpm/arm: support NEON 2016-03-11 15:56:07 +01:00