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: replace IPv4/v6 constants with uppercase name
[dpdk.git]
/
app
/
test-pmd
/
csumonly.c
diff --git
a/app/test-pmd/csumonly.c
b/app/test-pmd/csumonly.c
index
105c7f2
..
e1cb7fb
100644
(file)
--- a/
app/test-pmd/csumonly.c
+++ b/
app/test-pmd/csumonly.c
@@
-92,9
+92,9
@@
struct simple_gre_hdr {
static uint16_t
get_udptcp_checksum(void *l3_hdr, void *l4_hdr, uint16_t ethertype)
{
static uint16_t
get_udptcp_checksum(void *l3_hdr, void *l4_hdr, uint16_t ethertype)
{
- if (ethertype == _htons(RTE_ETHER_TYPE_IP
v
4))
+ if (ethertype == _htons(RTE_ETHER_TYPE_IP
V
4))
return rte_ipv4_udptcp_cksum(l3_hdr, l4_hdr);
return rte_ipv4_udptcp_cksum(l3_hdr, l4_hdr);
- else /* assume ethertype == RTE_ETHER_TYPE_IP
v
6 */
+ else /* assume ethertype == RTE_ETHER_TYPE_IP
V
6 */
return rte_ipv6_udptcp_cksum(l3_hdr, l4_hdr);
}
return rte_ipv6_udptcp_cksum(l3_hdr, l4_hdr);
}
@@
-161,12
+161,12
@@
parse_ethernet(struct rte_ether_hdr *eth_hdr, struct testpmd_offload_info *info)
}
switch (info->ethertype) {
}
switch (info->ethertype) {
- case _htons(RTE_ETHER_TYPE_IP
v
4):
+ case _htons(RTE_ETHER_TYPE_IP
V
4):
ipv4_hdr = (struct rte_ipv4_hdr *)
((char *)eth_hdr + info->l2_len);
parse_ipv4(ipv4_hdr, info);
break;
ipv4_hdr = (struct rte_ipv4_hdr *)
((char *)eth_hdr + info->l2_len);
parse_ipv4(ipv4_hdr, info);
break;
- case _htons(RTE_ETHER_TYPE_IP
v
6):
+ case _htons(RTE_ETHER_TYPE_IP
V
6):
ipv6_hdr = (struct rte_ipv6_hdr *)
((char *)eth_hdr + info->l2_len);
parse_ipv6(ipv6_hdr, info);
ipv6_hdr = (struct rte_ipv6_hdr *)
((char *)eth_hdr + info->l2_len);
parse_ipv6(ipv6_hdr, info);
@@
-238,7
+238,7
@@
parse_vxlan_gpe(struct rte_udp_hdr *udp_hdr,
vxlan_gpe_len);
parse_ipv4(ipv4_hdr, info);
vxlan_gpe_len);
parse_ipv4(ipv4_hdr, info);
- info->ethertype = _htons(RTE_ETHER_TYPE_IP
v
4);
+ info->ethertype = _htons(RTE_ETHER_TYPE_IP
V
4);
info->l2_len = 0;
} else if (vxlan_gpe_hdr->proto == RTE_VXLAN_GPE_TYPE_IPV6) {
info->l2_len = 0;
} else if (vxlan_gpe_hdr->proto == RTE_VXLAN_GPE_TYPE_IPV6) {
@@
-251,7
+251,7
@@
parse_vxlan_gpe(struct rte_udp_hdr *udp_hdr,
ipv6_hdr = (struct rte_ipv6_hdr *)((char *)vxlan_gpe_hdr +
vxlan_gpe_len);
ipv6_hdr = (struct rte_ipv6_hdr *)((char *)vxlan_gpe_hdr +
vxlan_gpe_len);
- info->ethertype = _htons(RTE_ETHER_TYPE_IP
v
6);
+ info->ethertype = _htons(RTE_ETHER_TYPE_IP
V
6);
parse_ipv6(ipv6_hdr, info);
info->l2_len = 0;
parse_ipv6(ipv6_hdr, info);
info->l2_len = 0;
@@
-290,7
+290,7
@@
parse_gre(struct simple_gre_hdr *gre_hdr, struct testpmd_offload_info *info)
if (gre_hdr->flags & _htons(GRE_CHECKSUM_PRESENT))
gre_len += GRE_EXT_LEN;
if (gre_hdr->flags & _htons(GRE_CHECKSUM_PRESENT))
gre_len += GRE_EXT_LEN;
- if (gre_hdr->proto == _htons(RTE_ETHER_TYPE_IP
v
4)) {
+ if (gre_hdr->proto == _htons(RTE_ETHER_TYPE_IP
V
4)) {
info->is_tunnel = 1;
info->outer_ethertype = info->ethertype;
info->outer_l2_len = info->l2_len;
info->is_tunnel = 1;
info->outer_ethertype = info->ethertype;
info->outer_l2_len = info->l2_len;
@@
-300,10
+300,10
@@
parse_gre(struct simple_gre_hdr *gre_hdr, struct testpmd_offload_info *info)
ipv4_hdr = (struct rte_ipv4_hdr *)((char *)gre_hdr + gre_len);
parse_ipv4(ipv4_hdr, info);
ipv4_hdr = (struct rte_ipv4_hdr *)((char *)gre_hdr + gre_len);
parse_ipv4(ipv4_hdr, info);
- info->ethertype = _htons(RTE_ETHER_TYPE_IP
v
4);
+ info->ethertype = _htons(RTE_ETHER_TYPE_IP
V
4);
info->l2_len = 0;
info->l2_len = 0;
- } else if (gre_hdr->proto == _htons(RTE_ETHER_TYPE_IP
v
6)) {
+ } else if (gre_hdr->proto == _htons(RTE_ETHER_TYPE_IP
V
6)) {
info->is_tunnel = 1;
info->outer_ethertype = info->ethertype;
info->outer_l2_len = info->l2_len;
info->is_tunnel = 1;
info->outer_ethertype = info->ethertype;
info->outer_l2_len = info->l2_len;
@@
-312,7
+312,7
@@
parse_gre(struct simple_gre_hdr *gre_hdr, struct testpmd_offload_info *info)
ipv6_hdr = (struct rte_ipv6_hdr *)((char *)gre_hdr + gre_len);
ipv6_hdr = (struct rte_ipv6_hdr *)((char *)gre_hdr + gre_len);
- info->ethertype = _htons(RTE_ETHER_TYPE_IP
v
6);
+ info->ethertype = _htons(RTE_ETHER_TYPE_IP
V
6);
parse_ipv6(ipv6_hdr, info);
info->l2_len = 0;
parse_ipv6(ipv6_hdr, info);
info->l2_len = 0;
@@
-353,10
+353,10
@@
parse_encap_ip(void *encap_ip, struct testpmd_offload_info *info)
if (ip_version == 4) {
parse_ipv4(ipv4_hdr, info);
if (ip_version == 4) {
parse_ipv4(ipv4_hdr, info);
- info->ethertype = _htons(RTE_ETHER_TYPE_IP
v
4);
+ info->ethertype = _htons(RTE_ETHER_TYPE_IP
V
4);
} else {
parse_ipv6(ipv6_hdr, info);
} else {
parse_ipv6(ipv6_hdr, info);
- info->ethertype = _htons(RTE_ETHER_TYPE_IP
v
6);
+ info->ethertype = _htons(RTE_ETHER_TYPE_IP
V
6);
}
info->l2_len = 0;
}
}
info->l2_len = 0;
}
@@
-388,7
+388,7
@@
process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
tso_segsz = info->tunnel_tso_segsz;
}
tso_segsz = info->tunnel_tso_segsz;
}
- if (info->ethertype == _htons(RTE_ETHER_TYPE_IP
v
4)) {
+ if (info->ethertype == _htons(RTE_ETHER_TYPE_IP
V
4)) {
ipv4_hdr = l3_hdr;
ipv4_hdr->hdr_checksum = 0;
ipv4_hdr = l3_hdr;
ipv4_hdr->hdr_checksum = 0;
@@
-402,7
+402,7
@@
process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
ipv4_hdr->hdr_checksum =
rte_ipv4_cksum(ipv4_hdr);
}
ipv4_hdr->hdr_checksum =
rte_ipv4_cksum(ipv4_hdr);
}
- } else if (info->ethertype == _htons(RTE_ETHER_TYPE_IP
v
6))
+ } else if (info->ethertype == _htons(RTE_ETHER_TYPE_IP
V
6))
ol_flags |= PKT_TX_IPV6;
else
return 0; /* packet type not supported, nothing to do */
ol_flags |= PKT_TX_IPV6;
else
return 0; /* packet type not supported, nothing to do */
@@
-464,7
+464,7
@@
process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
struct rte_udp_hdr *udp_hdr;
uint64_t ol_flags = 0;
struct rte_udp_hdr *udp_hdr;
uint64_t ol_flags = 0;
- if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IP
v
4)) {
+ if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IP
V
4)) {
ipv4_hdr->hdr_checksum = 0;
ol_flags |= PKT_TX_OUTER_IPV4;
ipv4_hdr->hdr_checksum = 0;
ol_flags |= PKT_TX_OUTER_IPV4;
@@
-501,7
+501,7
@@
process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
/* do not recalculate udp cksum if it was 0 */
if (udp_hdr->dgram_cksum != 0) {
udp_hdr->dgram_cksum = 0;
/* do not recalculate udp cksum if it was 0 */
if (udp_hdr->dgram_cksum != 0) {
udp_hdr->dgram_cksum = 0;
- if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IP
v
4))
+ if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IP
V
4))
udp_hdr->dgram_cksum =
rte_ipv4_udptcp_cksum(ipv4_hdr, udp_hdr);
else
udp_hdr->dgram_cksum =
rte_ipv4_udptcp_cksum(ipv4_hdr, udp_hdr);
else