struct ofpbuf {
#ifdef DPDK_NETDEV
struct rte_mbuf mbuf; /* DPDK mbuf */
- void *private_p; /* private pointer for use by dpdk */
#else
void *base; /* First byte of allocated space. */
void *data; /* First byte actually in use. */
static inline void ofpbuf_delete(struct ofpbuf *b)
{
if (b) {
+ if (b->source == OFPBUF_DPDK) {
+ free_dpdk_buf(b);
+ return;
+ }
+
ofpbuf_uninit(b);
free(b);
}