mbuf: add bulk free function
[dpdk.git] / lib / librte_mbuf / rte_mbuf.h
index fb0849a..b1a92b1 100644 (file)
@@ -1914,6 +1914,21 @@ static inline void rte_pktmbuf_free(struct rte_mbuf *m)
        }
 }
 
+/**
+ * Free a bulk of packet mbufs back into their original mempools.
+ *
+ * Free a bulk of mbufs, and all their segments in case of chained buffers.
+ * Each segment is added back into its original mempool.
+ *
+ *  @param mbufs
+ *    Array of pointers to packet mbufs.
+ *    The array may contain NULL pointers.
+ *  @param count
+ *    Array size.
+ */
+__rte_experimental
+void rte_pktmbuf_free_bulk(struct rte_mbuf **mbufs, unsigned int count);
+
 /**
  * Create a "clone" of the given packet mbuf.
  *