git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net: use IPV4 VHL constant
[dpdk.git]
/
examples
/
tep_termination
/
vxlan_setup.c
diff --git
a/examples/tep_termination/vxlan_setup.c
b/examples/tep_termination/vxlan_setup.c
index
f9f857c
..
eca119a
100644
(file)
--- 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 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_DEFTTL 64 /* from RFC 1340. */
-#define IP_VHL_DEF (IP_VERSION | IP_HDRLEN)
#define IP_DN_FRAGMENT_FLAG 0x0040
#define IP_DN_FRAGMENT_FLAG 0x0040
@@
-323,7
+320,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];
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;
ip->type_of_service = 0;
ip->total_length = 0;
ip->packet_id = 0;