app/testpmd: add L3 packet type in offload flags
authorHelin Zhang <helin.zhang@intel.com>
Thu, 5 Jun 2014 05:09:00 +0000 (13:09 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 17 Jun 2014 16:22:31 +0000 (18:22 +0200)
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 <helin.zhang@intel.com>
Signed-off-by: Jing Chen <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Heqing Zhu <heqing.zhu@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
app/test-pmd/csumonly.c

index dc2068f..e5a1f52 100644 (file)
@@ -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,