From: Zhichao Zeng <zhichaox.zeng@intel.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, yidingx.zhou@intel.com,
Zhichao Zeng <zhichaox.zeng@intel.com>,
Jingjing Wu <jingjing.wu@intel.com>,
Beilei Xing <beilei.xing@intel.com>,
Declan Doherty <declan.doherty@intel.com>,
Abhijit Sinha <abhijit.sinha@intel.com>,
Radu Nicolau <radu.nicolau@intel.com>
Subject: [PATCH] net/iavf: fix building data desc
Date: Thu, 12 Jan 2023 17:31:51 +0800 [thread overview]
Message-ID: <20230112093151.868142-1-zhichaox.zeng@intel.com> (raw)
Build correct data desc for UFO pkt by adding UDP_SEG flag, and disable
L4 checksum offload when TSO/UFO is enabled to prevent the MDD.
Fixes: 1e728b01120c ("net/iavf: rework Tx path")
Cc: stable@dpdk.org
Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
---
drivers/net/iavf/iavf_rxtx.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 8d49967538..3d9224b38d 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2619,10 +2619,21 @@ iavf_build_data_desc_cmd_offset_fields(volatile uint64_t *qw1,
offset |= (m->l3_len >> 2) << IAVF_TX_DESC_LENGTH_IPLEN_SHIFT;
}
- if (m->ol_flags & RTE_MBUF_F_TX_TCP_SEG) {
- command |= IAVF_TX_DESC_CMD_L4T_EOFT_TCP;
+ if (m->ol_flags & (RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_UDP_SEG)) {
+ if (m->ol_flags & RTE_MBUF_F_TX_TCP_SEG)
+ command |= IAVF_TX_DESC_CMD_L4T_EOFT_TCP;
+ else
+ command |= IAVF_TX_DESC_CMD_L4T_EOFT_UDP;
offset |= (m->l4_len >> 2) <<
IAVF_TX_DESC_LENGTH_L4_FC_LEN_SHIFT;
+
+ *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) &
+ IAVF_TXD_DATA_QW1_OFFSET_MASK) |
+ ((uint64_t)l2tag1 << IAVF_TXD_DATA_QW1_L2TAG1_SHIFT));
+
+ return;
}
/* Enable L4 checksum offloads */
--
2.25.1
next reply other threads:[~2023-01-12 9:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-12 9:31 Zhichao Zeng [this message]
2023-01-17 2:13 ` Zhang, Qi Z
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=20230112093151.868142-1-zhichaox.zeng@intel.com \
--to=zhichaox.zeng@intel.com \
--cc=abhijit.sinha@intel.com \
--cc=beilei.xing@intel.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=radu.nicolau@intel.com \
--cc=stable@dpdk.org \
--cc=yidingx.zhou@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).