From a994009f3047b2d329dba682792964b7d529b6e3 Mon Sep 17 00:00:00 2001 From: Darek Stojaczyk Date: Tue, 11 Jun 2019 14:51:17 +0200 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457609 (master) (cherry picked from commit 1a8ee925b0087b29ee1a97b4d38e2a1232e53a57) Change-Id: I78b8104ed3bfe03397881a94f0f8bee14f9efae8 Signed-off-by: Tomasz Zawadzki Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458068 Reviewed-by: Ben Walker Reviewed-by: Darek Stojaczyk Tested-by: SPDK CI Jenkins --- lib/vhost/rte_vhost/vhost.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/vhost/rte_vhost/vhost.h b/lib/vhost/rte_vhost/vhost.h index 6f9e9a436..d738dba7f 100644 --- a/lib/vhost/rte_vhost/vhost.h +++ b/lib/vhost/rte_vhost/vhost.h @@ -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.