vhost: workaround the build dependency on mbuf header

rte_mbuf struct is something more likely will be used only in vhost-user
net driver, while we have made vhost-user generic enough that it can
be used for implementing other drivers (such as vhost-user SCSI), they
have also include <rte_mbuf.h>. Otherwise, the build will be broken.

We could workaround it by using forward declaration, so that other
non-net drivers won't need include <rte_mbuf.h>.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This commit is contained in:
Yuanhan Liu 2017-04-01 15:22:58 +08:00
parent a798beb47c
commit ea67f6ccf7

View File

@ -354,6 +354,8 @@ int rte_vhost_get_ifname(int vid, char *buf, size_t len);
*/
uint16_t rte_vhost_avail_entries(int vid, uint16_t queue_id);
struct rte_mbuf;
struct rte_mempool;
/**
* This function adds buffers to the virtio devices RX virtqueue. Buffers can
* be received from the physical port or from another virtual device. A packet