From mboxrd@z Thu Jan 1 00:00:00 1970 From: Helin Zhang Subject: [PATCH v2 16/27] app/test-pmd: add L3 packet type in offload flags Date: Thu, 5 Jun 2014 13:09:00 +0800 Message-ID: <1401944951-23783-17-git-send-email-helin.zhang@intel.com> References: <1401944951-23783-1-git-send-email-helin.zhang@intel.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1401944951-23783-1-git-send-email-helin.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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 Tested-by: Waterman Cao --- app/test-pmd/csumonly.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index 3568ba0..0e6441a 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, -- 1.8.1.4