vhost: allocate and free packets in bulk in Tx packed
authorBalazs Nemeth <bnemeth@redhat.com>
Fri, 16 Apr 2021 10:25:19 +0000 (12:25 +0200)
committerChenbo Xia <chenbo.xia@intel.com>
Wed, 28 Apr 2021 02:53:30 +0000 (04:53 +0200)
commita287ac28919d2808f09540cf5e36d474b06b8b2d
tree9a58d3e236d4517fb1a4918ed65268e9e4efccde
parent56fa279124091648e4502bdead1667f30ec22fa4
vhost: allocate and free packets in bulk in Tx packed

Move allocation out further and perform all allocation in bulk. The same
goes for freeing packets. In the process, also introduce
virtio_dev_pktmbuf_prep and make virtio_dev_pktmbuf_alloc use that.

Signed-off-by: Balazs Nemeth <bnemeth@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/vhost/virtio_net.c