vhost: allocate async memory dynamically
authorPatrick Fu <patrick.fu@intel.com>
Tue, 13 Oct 2020 01:45:44 +0000 (09:45 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 16 Oct 2020 17:48:19 +0000 (19:48 +0200)
commit9287d3a5a71a434e493fd6b01d20d30ea3706ffd
tree610bf93b7c579cfba6c1c7b4dfd40de6687137d2
parent6b3c81db8bb7427dc69402a25018781a689bd37a
vhost: allocate async memory dynamically

Allocate async internal memory buffer by rte_malloc(), replacing array
declaration inside vq structure. Dynamic allocation can help to save
memory footprint when async path is not registered.

Signed-off-by: Patrick Fu <patrick.fu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/vhost.c
lib/librte_vhost/vhost.h