From: Helin Zhang Date: Thu, 5 Jun 2014 05:09:00 +0000 (+0800) Subject: app/testpmd: add L3 packet type in offload flags X-Git-Tag: spdx-start~10668 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=00685b0fe2a34ae15cd1e305ec2c3ae075ed2ea8;p=dpdk.git app/testpmd: add L3 packet type in offload flags As i40e PMD need to know the L3 packet type for TX checksum offloading, the packet type has been added in rte_mbuf offload flags. Signed-off-by: Helin Zhang Signed-off-by: Jing Chen Acked-by: Cunming Liang Acked-by: Jijiang Liu Acked-by: Jingjing Wu Acked-by: Heqing Zhu Tested-by: Waterman Cao --- diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index dc2068f3cb..e5a1f52f7f 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -313,6 +313,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) ol_flags |= PKT_TX_IP_CKSUM; } else { + ol_flags |= PKT_TX_IPV4; /* SW checksum calculation */ ipv4_hdr->src_addr++; ipv4_hdr->hdr_checksum = get_ipv4_cksum(ipv4_hdr); @@ -373,6 +374,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) unsigned char *) + l2_len); l3_len = sizeof(struct ipv6_hdr) ; l4_proto = ipv6_hdr->proto; + ol_flags |= PKT_TX_IPV6; if (l4_proto == IPPROTO_UDP) { udp_hdr = (struct udp_hdr*) (rte_pktmbuf_mtod(mb,