diff options
Diffstat (limited to 'VNFs/DPPD-PROX/handle_swap.c')
-rw-r--r-- | VNFs/DPPD-PROX/handle_swap.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/handle_swap.c b/VNFs/DPPD-PROX/handle_swap.c index a7a153a4..b9029b6b 100644 --- a/VNFs/DPPD-PROX/handle_swap.c +++ b/VNFs/DPPD-PROX/handle_swap.c @@ -133,6 +133,15 @@ static inline void build_igmp_message(struct task_base *tbase, struct rte_mbuf * prox_ip_udp_cksum(mbuf, ip_hdr, sizeof(prox_rte_ether_hdr), sizeof(prox_rte_ipv4_hdr), task->offload_crc); } +static void stop_swap(struct task_base *tbase) +{ + struct task_swap *task = (struct task_swap *)tbase; + if (task->igmp_pool) { + rte_mempool_free(task->igmp_pool); + task->igmp_pool = NULL; + } +} + static int handle_swap_bulk(struct task_base *tbase, struct rte_mbuf **mbufs, uint16_t n_pkts) { struct task_swap *task = (struct task_swap *)tbase; @@ -432,6 +441,7 @@ static struct task_init task_init_swap = { .handle = handle_swap_bulk, .flag_features = 0, .size = sizeof(struct task_swap), + .stop_last = stop_swap }; __attribute__((constructor)) static void reg_task_swap(void) |