summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorThomas Monjalon <thomas.monjalon@6wind.com>2015-08-31 16:51:21 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-09-03 19:22:48 +0200
commitab351fe1c95cc56f3c73066b1697f5590ef5c301 (patch)
treec4f9638e1462edc0cca2782b504f11f05fad1dcd /app
parentd8c4ae275582784ec0ff3b2c54a4c861b55bc056 (diff)
downloaddpdk-ab351fe1c95cc56f3c73066b1697f5590ef5c301.zip
dpdk-ab351fe1c95cc56f3c73066b1697f5590ef5c301.tar.gz
dpdk-ab351fe1c95cc56f3c73066b1697f5590ef5c301.tar.xz
mbuf: remove packet type from offload flags
The extended unified packet type is now part of the standard ABI. As mbuf struct is changed, the mbuf library version is incremented. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Neil Horman <nhorman@tuxdriver.com>
Diffstat (limited to 'app')
-rw-r--r--app/test-pipeline/pipeline_hash.c12
-rw-r--r--app/test-pmd/csumonly.c14
-rw-r--r--app/test-pmd/rxonly.c16
-rw-r--r--app/test/packet_burst_generator.c12
4 files changed, 0 insertions, 54 deletions
diff --git a/app/test-pipeline/pipeline_hash.c b/app/test-pipeline/pipeline_hash.c
index aa3f9e5..548615f 100644
--- a/app/test-pipeline/pipeline_hash.c
+++ b/app/test-pipeline/pipeline_hash.c
@@ -459,33 +459,21 @@ app_main_loop_rx_metadata(void) {
signature = RTE_MBUF_METADATA_UINT32_PTR(m, 0);
key = RTE_MBUF_METADATA_UINT8_PTR(m, 32);
-#ifdef RTE_NEXT_ABI
if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) {
-#else
- if (m->ol_flags & PKT_RX_IPV4_HDR) {
-#endif
ip_hdr = (struct ipv4_hdr *)
&m_data[sizeof(struct ether_hdr)];
ip_dst = ip_hdr->dst_addr;
k32 = (uint32_t *) key;
k32[0] = ip_dst & 0xFFFFFF00;
-#ifdef RTE_NEXT_ABI
} else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) {
-#else
- } else {
-#endif
ipv6_hdr = (struct ipv6_hdr *)
&m_data[sizeof(struct ether_hdr)];
ipv6_dst = ipv6_hdr->dst_addr;
memcpy(key, ipv6_dst, 16);
-#ifdef RTE_NEXT_ABI
} else
continue;
-#else
- }
-#endif
*signature = test_hash(key, 0, 0);
}
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 1bf3485..e561dde 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -202,14 +202,9 @@ parse_ethernet(struct ether_hdr *eth_hdr, struct testpmd_offload_info *info)
/* Parse a vxlan header */
static void
-#ifdef RTE_NEXT_ABI
parse_vxlan(struct udp_hdr *udp_hdr,
struct testpmd_offload_info *info,
uint32_t pkt_type)
-#else
-parse_vxlan(struct udp_hdr *udp_hdr, struct testpmd_offload_info *info,
- uint64_t mbuf_olflags)
-#endif
{
struct ether_hdr *eth_hdr;
@@ -217,12 +212,7 @@ parse_vxlan(struct udp_hdr *udp_hdr, struct testpmd_offload_info *info,
* (rfc7348) or that the rx offload flag is set (i40e only
* currently) */
if (udp_hdr->dst_port != _htons(4789) &&
-#ifdef RTE_NEXT_ABI
RTE_ETH_IS_TUNNEL_PKT(pkt_type) == 0)
-#else
- (mbuf_olflags & (PKT_RX_TUNNEL_IPV4_HDR |
- PKT_RX_TUNNEL_IPV6_HDR)) == 0)
-#endif
return;
info->is_tunnel = 1;
@@ -559,11 +549,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
struct udp_hdr *udp_hdr;
udp_hdr = (struct udp_hdr *)((char *)l3_hdr +
info.l3_len);
-#ifdef RTE_NEXT_ABI
parse_vxlan(udp_hdr, &info, m->packet_type);
-#else
- parse_vxlan(udp_hdr, &info, m->ol_flags);
-#endif
} else if (info.l4_proto == IPPROTO_GRE) {
struct simple_gre_hdr *gre_hdr;
gre_hdr = (struct simple_gre_hdr *)
diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c
index ee7fd8d..14555ab 100644
--- a/app/test-pmd/rxonly.c
+++ b/app/test-pmd/rxonly.c
@@ -91,11 +91,7 @@ pkt_burst_receive(struct fwd_stream *fs)
uint64_t ol_flags;
uint16_t nb_rx;
uint16_t i, packet_type;
-#ifdef RTE_NEXT_ABI
uint16_t is_encapsulation;
-#else
- uint64_t is_encapsulation;
-#endif
#ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES
uint64_t start_tsc;
@@ -138,13 +134,7 @@ pkt_burst_receive(struct fwd_stream *fs)
eth_type = RTE_BE_TO_CPU_16(eth_hdr->ether_type);
ol_flags = mb->ol_flags;
packet_type = mb->packet_type;
-
-#ifdef RTE_NEXT_ABI
is_encapsulation = RTE_ETH_IS_TUNNEL_PKT(packet_type);
-#else
- is_encapsulation = ol_flags & (PKT_RX_TUNNEL_IPV4_HDR |
- PKT_RX_TUNNEL_IPV6_HDR);
-#endif
print_ether_addr(" src=", &eth_hdr->s_addr);
print_ether_addr(" - dst=", &eth_hdr->d_addr);
@@ -171,7 +161,6 @@ pkt_burst_receive(struct fwd_stream *fs)
if (ol_flags & PKT_RX_QINQ_PKT)
printf(" - QinQ VLAN tci=0x%x, VLAN tci outer=0x%x",
mb->vlan_tci, mb->vlan_tci_outer);
-#ifdef RTE_NEXT_ABI
if (mb->packet_type) {
uint32_t ptype;
@@ -341,7 +330,6 @@ pkt_burst_receive(struct fwd_stream *fs)
printf("\n");
} else
printf("Unknown packet type\n");
-#endif /* RTE_NEXT_ABI */
if (is_encapsulation) {
struct ipv4_hdr *ipv4_hdr;
struct ipv6_hdr *ipv6_hdr;
@@ -355,11 +343,7 @@ pkt_burst_receive(struct fwd_stream *fs)
l2_len = sizeof(struct ether_hdr);
/* Do not support ipv4 option field */
-#ifdef RTE_NEXT_ABI
if (RTE_ETH_IS_IPV4_HDR(packet_type)) {
-#else
- if (ol_flags & PKT_RX_TUNNEL_IPV4_HDR) {
-#endif
l3_len = sizeof(struct ipv4_hdr);
ipv4_hdr = rte_pktmbuf_mtod_offset(mb,
struct ipv4_hdr *,
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index d9d808b..a93c3b5 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -273,21 +273,9 @@ nomore_mbuf:
if (ipv4) {
pkt->vlan_tci = ETHER_TYPE_IPv4;
pkt->l3_len = sizeof(struct ipv4_hdr);
-#ifndef RTE_NEXT_ABI
- if (vlan_enabled)
- pkt->ol_flags = PKT_RX_IPV4_HDR | PKT_RX_VLAN_PKT;
- else
- pkt->ol_flags = PKT_RX_IPV4_HDR;
-#endif
} else {
pkt->vlan_tci = ETHER_TYPE_IPv6;
pkt->l3_len = sizeof(struct ipv6_hdr);
-#ifndef RTE_NEXT_ABI
- if (vlan_enabled)
- pkt->ol_flags = PKT_RX_IPV6_HDR | PKT_RX_VLAN_PKT;
- else
- pkt->ol_flags = PKT_RX_IPV6_HDR;
-#endif
}
pkts_burst[nb_pkt] = pkt;