summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsongyanchao <[email protected]>2023-02-08 10:43:42 +0000
committersongyanchao <[email protected]>2023-02-08 10:43:42 +0000
commit9308209d128e8540e1c31940753c6bde6ebdac52 (patch)
treeb8cfdc612a1713831a390274adb943bd3b42fffc
parent0f0ffa3b6f8ecb6d73b4884983fc8cc4b9604471 (diff)
🐞 fix(TSG-13497): 修正 marsio_buff_free 函数v4.6.12-20230208
修正 marsio_buff_free 函数
-rw-r--r--app/src/mrb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/src/mrb.c b/app/src/mrb.c
index 8291c23..c2b0964 100644
--- a/app/src/mrb.c
+++ b/app/src/mrb.c
@@ -92,6 +92,12 @@ int marsio_buff_malloc_global(struct mr_instance * instance, marsio_buff_t * mar
void marsio_buff_free(struct mr_instance * instance, marsio_buff_t * marsio_buff[], unsigned int nr_mbufs,
int socket_id, int thread_id)
{
+ for (int i = 0; i < nr_mbufs; i++)
+ {
+ PROTECT_rte_mbuf_unpoison_meta((struct rte_mbuf *)marsio_buff[i]);
+ PROTECT_rte_pktmbuf_free((struct rte_mbuf *)marsio_buff[i]);
+ }
+
instance->stat[thread_info.thread_id].mbuf_free_count += nr_mbufs;
}