From: Chunsong Feng Date: Thu, 14 Nov 2019 01:54:21 +0000 (+0800) Subject: msg/async/dpdk: fix icmp_hdr build error X-Git-Tag: v15.1.0~717^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3222bbd81a0e13309b783d13151d6f324d2f7879;p=ceph.git msg/async/dpdk: fix icmp_hdr build error ‘struct icmp_hdr’ is defined in both IP.h and rte_icmp.h. DPDK.cc include rte_ethdev.h that references rte_icmp.h, and include IP.h. It cause redefinition of ‘struct icmp_hdr’ error. So move the definition of ‘struct icmp_hdr’ from IP.h to IP.cc. Signed-off-by: Chunsong Feng --- diff --git a/src/msg/async/dpdk/IP.cc b/src/msg/async/dpdk/IP.cc index f730cded9e12..fab534bb25b5 100644 --- a/src/msg/async/dpdk/IP.cc +++ b/src/msg/async/dpdk/IP.cc @@ -73,6 +73,17 @@ enum { l_dpdk_qp_last }; +struct icmp_hdr { + enum class msg_type : uint8_t { + echo_reply = 0, + echo_request = 8, + }; + msg_type type; + uint8_t code; + uint16_t csum; + uint32_t rest; +} __attribute__((packed)); + ipv4::ipv4(CephContext *c, EventCenter *cen, interface* netif) : cct(c), center(cen), _netif(netif), _global_arp(netif), _arp(c, _global_arp, cen), diff --git a/src/msg/async/dpdk/IP.h b/src/msg/async/dpdk/IP.h index 480b4b95b322..1fc60658235f 100644 --- a/src/msg/async/dpdk/IP.h +++ b/src/msg/async/dpdk/IP.h @@ -123,17 +123,6 @@ class ipv4_tcp final : public ip_protocol { friend class ipv4; }; -struct icmp_hdr { - enum class msg_type : uint8_t { - echo_reply = 0, - echo_request = 8, - }; - msg_type type; - uint8_t code; - uint16_t csum; - uint32_t rest; -} __attribute__((packed)); - class icmp { public: