DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yuying Zhang <yuying.zhang@intel.com>
To: dev@dpdk.org, olivier.matz@6wind.com, qi.z.zhang@intel.com,
Cc: Yuying Zhang <yuying.zhang@intel.com>,
	David Marchand <david.marchand@redhat.com>
Subject: [dpdk-dev] [PATCH v3 1/1] net: fix bad checksum in offloaded TSOv6 packets
Date: Thu, 30 Jul 2020 02:00:43 +0000
Message-ID: <20200730020043.17546-1-yuying.zhang@intel.com> (raw)
In-Reply-To: <20200728085531.204296-1-yuying.zhang@intel.com>

The rte_net_intel_cksum_flags_prepare() function prepares the
pseudoheader checksum in packet data when doing checksum or TSO

It does nothing when no checksum offload flag is set in mbuf. But
in case of a IPv6/TCP TSO packet, it is not mandatory to have a
checksum flag. We also need to check the PKT_TX_TCP_SEG flag in addition
to checksum flags to fix offload preparation for such packets.

Fixes: 520059a41aa9 ("net: check fragmented headers in non-debug as well")

Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
 lib/librte_net/rte_net.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_net/rte_net.h b/lib/librte_net/rte_net.h
index 1edc283a4..94b06d9ee 100644
--- a/lib/librte_net/rte_net.h
+++ b/lib/librte_net/rte_net.h
@@ -125,7 +125,7 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
 	 * Mainly it is required to avoid fragmented headers check if
 	 * no offloads are requested.
-	if (!(ol_flags & (PKT_TX_IP_CKSUM | PKT_TX_L4_MASK)))
+	if (!(ol_flags & (PKT_TX_IP_CKSUM | PKT_TX_L4_MASK | PKT_TX_TCP_SEG)))
 		return 0;
 	if (ol_flags & (PKT_TX_OUTER_IPV4 | PKT_TX_OUTER_IPV6))

  parent reply	other threads:[~2020-07-30  2:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-28  8:55 [dpdk-dev] [PATCH v1] net: fix TSO packet checksum incorrect Yuying Zhang
2020-07-28  9:29 ` Olivier Matz
2020-07-29 15:58   ` Andrew Rybchenko
2020-07-28 17:09 ` [dpdk-dev] [PATCH v2 1/1] net: fix TSO packets " Yuying Zhang
2020-07-29  2:28   ` Xie, WeiX
2020-07-29  7:49   ` Olivier Matz
2020-07-29 16:00     ` Andrew Rybchenko
2020-07-29  8:54   ` David Marchand
2020-07-29 10:03     ` Ferruh Yigit
2020-07-30  2:00 ` Yuying Zhang [this message]
2020-07-30  2:25   ` [dpdk-dev] [PATCH v3 1/1] net: fix bad checksum in offloaded TSOv6 packets Zhang, Yuying

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200730020043.17546-1-yuying.zhang@intel.com \
    --to=yuying.zhang@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git