diff options
author | Hanoh Haim <hhaim@cisco.com> | 2015-11-11 15:37:46 +0200 |
---|---|---|
committer | Hanoh Haim <hhaim@cisco.com> | 2015-11-11 15:37:46 +0200 |
commit | cc352e04fd45913132f3e1ddc86d88571c926879 (patch) | |
tree | 7d295ea1a2d68ec7587781a7567d3e17997d4eba /src/pal | |
parent | d04fb533c0843ebcd3eac5fbefa6f418582db7fc (diff) |
add first stl test and cleanup valgrind
Diffstat (limited to 'src/pal')
-rwxr-xr-x | src/pal/linux/mbuf.cpp | 7 | ||||
-rwxr-xr-x | src/pal/linux/mbuf.h | 2 | ||||
-rwxr-xr-x | src/pal/linux_dpdk/mbuf.h | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/src/pal/linux/mbuf.cpp b/src/pal/linux/mbuf.cpp index 7eca8fd5..26a54fe9 100755 --- a/src/pal/linux/mbuf.cpp +++ b/src/pal/linux/mbuf.cpp @@ -78,6 +78,13 @@ rte_mempool_t * utl_rte_mempool_create(const char *name, return p; } +void utl_rte_mempool_delete(rte_mempool_t * & pool){ + if (pool) { + delete pool; + pool=0; + } +} + uint16_t rte_mbuf_refcnt_update(rte_mbuf_t *m, int16_t value) { diff --git a/src/pal/linux/mbuf.h b/src/pal/linux/mbuf.h index 35a442bf..4132f842 100755 --- a/src/pal/linux/mbuf.h +++ b/src/pal/linux/mbuf.h @@ -65,6 +65,8 @@ typedef struct rte_mempool rte_mempool_t; #define RTE_PKTMBUF_HEADROOM 0 +void utl_rte_mempool_delete(rte_mempool_t * &pool); + rte_mempool_t * utl_rte_mempool_create(const char *name, unsigned n, unsigned elt_size, diff --git a/src/pal/linux_dpdk/mbuf.h b/src/pal/linux_dpdk/mbuf.h index cde01077..339c0909 100755 --- a/src/pal/linux_dpdk/mbuf.h +++ b/src/pal/linux_dpdk/mbuf.h @@ -30,6 +30,10 @@ typedef struct rte_mbuf rte_mbuf_t; typedef struct rte_mempool rte_mempool_t; +inline void utl_rte_mempool_delete(rte_mempool_t * & pool){ +} + + rte_mempool_t * utl_rte_mempool_create(const char *name, unsigned n, unsigned elt_size, |