Commit 33790cbc authored by Tom Barbette's avatar Tom Barbette

Netmap cleaning in case of NETMAP_PACKET_POOL

parent 8d013396
......@@ -125,7 +125,7 @@
/* Define if you have the <net/netmap.h> header file. */
#undef HAVE_NET_NETMAP_H
/* Define if you have the <net/netmap.h> header file. */
/* Define if you use only netmap buffer as data buffer. */
#undef HAVE_NETMAP_PACKET_POOL
/* Define if you have the <netpacket/packet.h> header file. */
......
......@@ -1325,6 +1325,11 @@ cleanup_pool(PacketPool *pp, int global)
while (WritablePacket *pd = pp->pd) {
++pdcount;
pp->pd = static_cast<WritablePacket *>(pd->next());
#if HAVE_NETMAP_PACKET_POOL
NetmapBufQ::local_pool()->insert(pd->buffer());
#else
::operator delete((void *) pd->buffer());
#endif
::operator delete((void *) pd);
}
#if !HAVE_BATCH_RECYCLE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment