summaryrefslogtreecommitdiff
path: root/examples/ip_fragmentation
diff options
context:
space:
mode:
authorDavid Marchand <david.marchand@redhat.com>2019-05-29 13:29:16 +0200
committerThomas Monjalon <thomas@monjalon.net>2019-06-03 16:54:54 +0200
commit0c9da7555da8c8373dfd69f798f832723ae6de71 (patch)
tree8f3265d9a34b302e2a69af1ec256f382fce26614 /examples/ip_fragmentation
parentaa5d6a72de4a7454a6142e5f5b032c35dbd165ff (diff)
downloaddpdk-0c9da7555da8c8373dfd69f798f832723ae6de71.zip
dpdk-0c9da7555da8c8373dfd69f798f832723ae6de71.tar.gz
dpdk-0c9da7555da8c8373dfd69f798f832723ae6de71.tar.xz
net: replace IPv4/v6 constants with uppercase name
Since we change these macros, we might as well avoid triggering complaints from checkpatch because of mixed case. old=RTE_IPv4 new=RTE_IPV4 git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g" old=RTE_ETHER_TYPE_IPv4 new=RTE_ETHER_TYPE_IPV4 git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g" old=RTE_ETHER_TYPE_IPv6 new=RTE_ETHER_TYPE_IPV6 git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g" Signed-off-by: David Marchand <david.marchand@redhat.com> Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Diffstat (limited to 'examples/ip_fragmentation')
-rw-r--r--examples/ip_fragmentation/main.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index f8b3033..a5101fa 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -169,14 +169,14 @@ struct l3fwd_ipv4_route {
};
struct l3fwd_ipv4_route l3fwd_ipv4_route_array[] = {
- {RTE_IPv4(100,10,0,0), 16, 0},
- {RTE_IPv4(100,20,0,0), 16, 1},
- {RTE_IPv4(100,30,0,0), 16, 2},
- {RTE_IPv4(100,40,0,0), 16, 3},
- {RTE_IPv4(100,50,0,0), 16, 4},
- {RTE_IPv4(100,60,0,0), 16, 5},
- {RTE_IPv4(100,70,0,0), 16, 6},
- {RTE_IPv4(100,80,0,0), 16, 7},
+ {RTE_IPV4(100,10,0,0), 16, 0},
+ {RTE_IPV4(100,20,0,0), 16, 1},
+ {RTE_IPV4(100,30,0,0), 16, 2},
+ {RTE_IPV4(100,40,0,0), 16, 3},
+ {RTE_IPV4(100,50,0,0), 16, 4},
+ {RTE_IPV4(100,60,0,0), 16, 5},
+ {RTE_IPV4(100,70,0,0), 16, 6},
+ {RTE_IPV4(100,80,0,0), 16, 7},
};
/*
@@ -359,10 +359,10 @@ l3fwd_simple_forward(struct rte_mbuf *m, struct lcore_queue_conf *qconf,
&eth_hdr->s_addr);
if (ipv6)
eth_hdr->ether_type =
- rte_be_to_cpu_16(RTE_ETHER_TYPE_IPv6);
+ rte_be_to_cpu_16(RTE_ETHER_TYPE_IPV6);
else
eth_hdr->ether_type =
- rte_be_to_cpu_16(RTE_ETHER_TYPE_IPv4);
+ rte_be_to_cpu_16(RTE_ETHER_TYPE_IPV4);
}
len += len2;
@@ -680,9 +680,9 @@ parse_ptype(struct rte_mbuf *m)
eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
ether_type = eth_hdr->ether_type;
- if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4))
+ if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4))
packet_type |= RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
- else if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6))
+ else if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6))
packet_type |= RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;
m->packet_type = packet_type;