X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Fpacket_burst_generator.c;h=f203f9d09efc7eecc75a36348973e5550cab99d8;hb=694fd2cb8d10be0deb8bd7d41dee73601f31d415;hp=9776d583b58cceab2d0252a0ef5ec7b956fe9998;hpb=0c9da7555da8c8373dfd69f798f832723ae6de71;p=dpdk.git diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c index 9776d583b5..f203f9d09e 100644 --- a/app/test/packet_burst_generator.c +++ b/app/test/packet_burst_generator.c @@ -4,6 +4,7 @@ #include #include +#include #include "packet_burst_generator.h" @@ -12,9 +13,6 @@ #define IP_DEFTTL 64 /* from RFC 1340. */ -#define IP_VERSION 0x40 -#define IP_HDRLEN 0x05 /* default IP header length == five 32-bits words. */ -#define IP_VHL_DEF (IP_VERSION | IP_HDRLEN) static void copy_buf_to_pkt_segs(void *buf, unsigned len, struct rte_mbuf *pkt, @@ -167,7 +165,7 @@ initialize_ipv4_header(struct rte_ipv4_hdr *ip_hdr, uint32_t src_addr, */ pkt_len = (uint16_t) (pkt_data_len + sizeof(struct rte_ipv4_hdr)); - ip_hdr->version_ihl = IP_VHL_DEF; + ip_hdr->version_ihl = RTE_IPV4_VHL_DEF; ip_hdr->type_of_service = 0; ip_hdr->fragment_offset = 0; ip_hdr->time_to_live = IP_DEFTTL; @@ -215,7 +213,7 @@ initialize_ipv4_header_proto(struct rte_ipv4_hdr *ip_hdr, uint32_t src_addr, */ pkt_len = (uint16_t) (pkt_data_len + sizeof(struct rte_ipv4_hdr)); - ip_hdr->version_ihl = IP_VHL_DEF; + ip_hdr->version_ihl = RTE_IPV4_VHL_DEF; ip_hdr->type_of_service = 0; ip_hdr->fragment_offset = 0; ip_hdr->time_to_live = IP_DEFTTL;