diff mbox

[dpdk-dev,RFC,11/17] app/test: support of unified packet type

Message ID 1421637803-17034-12-git-send-email-helin.zhang@intel.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Helin Zhang Jan. 19, 2015, 3:23 a.m. UTC
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(-)
diff mbox

Patch

diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index 4a89663..0a936ea 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -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;