DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/iavf: fix checksum offloading
@ 2023-08-18  9:03 David Marchand
  2023-08-21  8:03 ` Eelco Chaudron
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: David Marchand @ 2023-08-18  9:03 UTC (permalink / raw)
  To: dev
  Cc: echaudro, mkp, stable, Jingjing Wu, Beilei Xing, Declan Doherty,
	Abhijit Sinha, Radu Nicolau

The only presence of RTE_MBUF_F_TX_IPV4 can't be used as an indicator
that a checksum offload has been requested by an application.
Check that RTE_MBUF_F_TX_IP_CKSUM or others flags have been set.

Fixes: 1e728b01120c ("net/iavf: rework Tx path")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/iavf/iavf_rxtx.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index f7df4665d1..b9e2879764 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2652,6 +2652,9 @@ iavf_build_data_desc_cmd_offset_fields(volatile uint64_t *qw1,
 		offset |= (m->l2_len >> 1)
 			<< IAVF_TX_DESC_LENGTH_MACLEN_SHIFT;
 
+	if ((m->ol_flags & IAVF_TX_CKSUM_OFFLOAD_MASK) == 0)
+		goto skip_cksum;
+
 	/* Enable L3 checksum offloading inner */
 	if (m->ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
 		if (m->ol_flags & RTE_MBUF_F_TX_IPV4) {
@@ -2702,6 +2705,7 @@ iavf_build_data_desc_cmd_offset_fields(volatile uint64_t *qw1,
 		break;
 	}
 
+skip_cksum:
 	*qw1 = rte_cpu_to_le_64((((uint64_t)command <<
 		IAVF_TXD_DATA_QW1_CMD_SHIFT) & IAVF_TXD_DATA_QW1_CMD_MASK) |
 		(((uint64_t)offset << IAVF_TXD_DATA_QW1_OFFSET_SHIFT) &
-- 
2.41.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-08-24 15:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-18  9:03 [PATCH] net/iavf: fix checksum offloading David Marchand
2023-08-21  8:03 ` Eelco Chaudron
2023-08-21  8:22   ` David Marchand
2023-08-21 11:54 ` Zhang, Qi Z
2023-08-21 17:29   ` David Marchand
2023-08-22  1:52     ` Zhang, Qi Z
2023-08-22  6:11       ` David Marchand
2023-08-22  7:33         ` Zhang, Qi Z
2023-08-22  7:39           ` David Marchand
2023-08-22  7:59             ` Zhang, Qi Z
2023-08-22 10:10               ` Zhang, Qi Z
2023-08-23  6:29 ` [PATCH v2] " David Marchand
2023-08-23  8:33   ` Zhang, Qi Z
2023-08-24 15:24     ` Patrick Robb

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).