rte_vhost: fix compilation against dpdk master

struct ether_addr was renamed to struct rte_ether_addr
in latest DPDK master, but our internal fork of rte_vhost
still used the old name, which can be now a non-defined type.

Together with the struct, the RTE_ETHER_ADDR_LEN define
was renamed as well, so we'll now check if it's defined and
we'll manually define struct ether_addr to keep the old
rte_vhost working.

Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457609 (master)

(cherry picked from commit 1a8ee925b0)
Change-Id: I78b8104ed3bfe03397881a94f0f8bee14f9efae8
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458068
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Darek Stojaczyk 2019-06-11 14:51:17 +02:00
parent 902bef378c
commit a994009f30

View File

@ -167,6 +167,13 @@ struct guest_page {
uint64_t size;
};
/* struct ether_addr was renamed to struct rte_ether_addr at one point */
#ifdef RTE_ETHER_ADDR_LEN
struct ether_addr {
uint8_t addr_bytes[RTE_ETHER_ADDR_LEN];
} __attribute__((__packed__));
#endif
/**
* Device structure contains all configuration information relating
* to the device.