[dpdk-dev,11/17] app/test: support of unified packet type
Commit Message
To unify packet types among all PMDs, bit masks and relevant macros
of packet type for ol_flags are replaced by unified packet type and
relevant macros.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
---
app/test/packet_burst_generator.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
@@ -258,18 +258,16 @@ nomore_mbuf:
pkt->vlan_tci = ETHER_TYPE_IPv4;
pkt->l3_len = sizeof(struct ipv4_hdr);
+ pkt->packet_type = RTE_PTYPE_L3_IPV4;
if (vlan_enabled)
- pkt->ol_flags = PKT_RX_IPV4_HDR | PKT_RX_VLAN_PKT;
- else
- pkt->ol_flags = PKT_RX_IPV4_HDR;
+ pkt->ol_flags = PKT_RX_VLAN_PKT;
} else {
pkt->vlan_tci = ETHER_TYPE_IPv6;
pkt->l3_len = sizeof(struct ipv6_hdr);
+ pkt->packet_type = RTE_PTYPE_L3_IPV6;
if (vlan_enabled)
- pkt->ol_flags = PKT_RX_IPV6_HDR | PKT_RX_VLAN_PKT;
- else
- pkt->ol_flags = PKT_RX_IPV6_HDR;
+ pkt->ol_flags = PKT_RX_VLAN_PKT;
}
pkts_burst[nb_pkt] = pkt;