diff options
Diffstat (limited to 'src/pal/linux')
-rwxr-xr-x | src/pal/linux/mbuf.cpp | 7 | ||||
-rwxr-xr-x | src/pal/linux/mbuf.h | 2 |
2 files changed, 9 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, |