[dpdk-dev] [PATCH 4/6] examples/ntb: enable an example for ntb
xiaoyun.li at intel.com
Wed Jun 5 10:32:50 CEST 2019
> > I noticed that there are two allocations, one for pkts_recv and another for
> > pkts_recv->buf_addr, How about we declare
> > struct rte_rawdev_buf pkts_recv;
> > and allocate memory for its buf_addr
> > pkts_recv.buf_addr = malloc(size);
> > then we call
> > rte_rawdev_dequeue_buffers(dev_id, &pkts_recv, 1, (void *)size);
> > After that, we just need to free once.
> > free(pkts_recv.buf_addr);
Double pointer does not represent 2D arrays. Please refer to
It will cause segment fault in enqueue/dequeue.
I will free twice.
> > >2.17.1
> > >
More information about the dev