X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Ftep_termination%2Fvxlan_setup.c;h=4b44ccc143078e67d4838038156649944a062526;hb=3d4b2afb73f7f0988f8e66ba1b37f2a446e33868;hp=f9f857c098bbc45e755121b715c32e072d585500;hpb=70febdcfd60f278be598ec9bcf1ff5bb5c5a59a8;p=dpdk.git diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c index f9f857c098..4b44ccc143 100644 --- a/examples/tep_termination/vxlan_setup.c +++ b/examples/tep_termination/vxlan_setup.c @@ -28,10 +28,7 @@ #define UDP_HEADER_LEN 8 #define VXLAN_HEADER_LEN 8 -#define IP_VERSION 0x40 -#define IP_HDRLEN 0x05 /* default IP header length == five 32-bits words. */ #define IP_DEFTTL 64 /* from RFC 1340. */ -#define IP_VHL_DEF (IP_VERSION | IP_HDRLEN) #define IP_DN_FRAGMENT_FLAG 0x0040 @@ -197,8 +194,6 @@ vxlan_port_init(uint16_t port, struct rte_mempool *mbuf_pool) ports_eth_addr[port].addr_bytes[5]); if (tso_segsz != 0) { - struct rte_eth_dev_info dev_info; - rte_eth_dev_info_get(port, &dev_info); if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_TCP_TSO) == 0) RTE_LOG(WARNING, PORT, "hardware TSO offload is not supported\n"); @@ -323,7 +318,7 @@ vxlan_link(struct vhost_dev *vdev, struct rte_mbuf *m) app_l2_hdr[portid].ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4); ip = &app_ip_hdr[portid]; - ip->version_ihl = IP_VHL_DEF; + ip->version_ihl = RTE_IPV4_VHL_DEF; ip->type_of_service = 0; ip->total_length = 0; ip->packet_id = 0;