X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=examples%2Ftep_termination%2Fvxlan.c;h=52c35a74bb0b46b993674d22f42921135f6b6faf;hb=9a45c4981c351bdef78a69d1f7b7788f2614913f;hp=44a39a409f4984c452afe8e6073512814fbd022e;hpb=e73e3547ce54d7ae48dff82d87efac0b7a30692a;p=dpdk.git diff --git a/examples/tep_termination/vxlan.c b/examples/tep_termination/vxlan.c index 44a39a409f..52c35a74bb 100644 --- a/examples/tep_termination/vxlan.c +++ b/examples/tep_termination/vxlan.c @@ -16,9 +16,9 @@ static uint16_t get_psd_sum(void *l3_hdr, uint16_t ethertype, uint64_t ol_flags) { - if (ethertype == RTE_ETHER_TYPE_IPv4) + if (ethertype == RTE_ETHER_TYPE_IPV4) return rte_ipv4_phdr_cksum(l3_hdr, ol_flags); - else /* assume ethertype == RTE_ETHER_TYPE_IPv6 */ + else /* assume ethertype == RTE_ETHER_TYPE_IPV6 */ return rte_ipv6_phdr_cksum(l3_hdr, ol_flags); } @@ -46,13 +46,13 @@ parse_ethernet(struct rte_ether_hdr *eth_hdr, union tunnel_offload_info *info, } switch (ethertype) { - case RTE_ETHER_TYPE_IPv4: + case RTE_ETHER_TYPE_IPV4: ipv4_hdr = (struct rte_ipv4_hdr *) ((char *)eth_hdr + info->outer_l2_len); info->outer_l3_len = sizeof(struct rte_ipv4_hdr); *l4_proto = ipv4_hdr->next_proto_id; break; - case RTE_ETHER_TYPE_IPv6: + case RTE_ETHER_TYPE_IPV6: ipv6_hdr = (struct rte_ipv6_hdr *) ((char *)eth_hdr + info->outer_l2_len); info->outer_l3_len = sizeof(struct rte_ipv6_hdr); @@ -94,14 +94,14 @@ process_inner_cksums(struct rte_ether_hdr *eth_hdr, l3_hdr = (char *)eth_hdr + info->l2_len; - if (ethertype == RTE_ETHER_TYPE_IPv4) { + if (ethertype == RTE_ETHER_TYPE_IPV4) { ipv4_hdr = (struct rte_ipv4_hdr *)l3_hdr; ipv4_hdr->hdr_checksum = 0; ol_flags |= PKT_TX_IPV4; ol_flags |= PKT_TX_IP_CKSUM; info->l3_len = sizeof(struct rte_ipv4_hdr); l4_proto = ipv4_hdr->next_proto_id; - } else if (ethertype == RTE_ETHER_TYPE_IPv6) { + } else if (ethertype == RTE_ETHER_TYPE_IPV6) { ipv6_hdr = (struct rte_ipv6_hdr *)l3_hdr; info->l3_len = sizeof(struct rte_ipv6_hdr); l4_proto = ipv6_hdr->proto;