From: Jeff Guo <jia.guo@intel.com>
To: helin.zhang@intel.com, jingjing.wu@intel.com
Cc: dev@dpdk.org, jia.guo@intel.com
Subject: [dpdk-dev] [dpdk-dev 1/2] lib: fix ipv6 tunnel csum issue
Date: Wed, 5 Apr 2017 12:48:42 +0800 [thread overview]
Message-ID: <1491367723-53124-1-git-send-email-jia.guo@intel.com> (raw)
When packet is flag of "PKT_TX_OUTER_IPV6", it also need to be
considered to be tunnel case, in order to calculate the correct
csum value.
Fixes: 2b76648872c9 ("net/e1000: add Tx preparation")
Signed-off-by: Jeff Guo <jia.guo@intel.com>
---
lib/librte_net/rte_net.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/librte_net/rte_net.h b/lib/librte_net/rte_net.h
index 548eaed..79c764a 100644
--- a/lib/librte_net/rte_net.h
+++ b/lib/librte_net/rte_net.h
@@ -120,7 +120,8 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
struct udp_hdr *udp_hdr;
uint64_t inner_l3_offset = m->l2_len;
- if (ol_flags & PKT_TX_OUTER_IP_CKSUM)
+ if ((ol_flags & PKT_TX_OUTER_IP_CKSUM) ||
+ (ol_flags & PKT_TX_OUTER_IPV6))
inner_l3_offset += m->outer_l2_len + m->outer_l3_len;
if ((ol_flags & PKT_TX_UDP_CKSUM) == PKT_TX_UDP_CKSUM) {
--
2.7.4
next reply other threads:[~2017-04-05 4:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-05 4:48 Jeff Guo [this message]
2017-04-05 4:48 ` [dpdk-dev] [dpdk-dev 2/2] app/testpmd: " Jeff Guo
2017-04-10 20:50 ` [dpdk-dev] [dpdk-dev 1/2] lib: " Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1491367723-53124-1-git-send-email-jia.guo@intel.com \
--to=jia.guo@intel.com \
--cc=dev@dpdk.org \
--cc=helin.zhang@intel.com \
--cc=jingjing.wu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).