* [PATCH] net/iavf: fix Tx path
@ 2022-08-04 7:33 Ke Zhang
2022-08-08 1:13 ` Zhang, Qi Z
2022-08-10 9:57 ` [PATCH v2] net/iavf: fix Tx L3 checksum offload flag Ke Zhang
0 siblings, 2 replies; 4+ messages in thread
From: Ke Zhang @ 2022-08-04 7:33 UTC (permalink / raw)
To: xiaoyun.li, jingjing.wu, beilei.xing, dev; +Cc: Ke Zhang, stable
Fix the Tx path and Tx descriptor usage in order
to make the Tx offload flags and Tx data descriptor
consistent.
Fixes: 1e728b01120c ("net/iavf: rework Tx path")
Cc: stable@dpdk.org
Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
---
drivers/net/iavf/iavf_rxtx.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 109ba756f8..dfd021889e 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2538,9 +2538,11 @@ iavf_build_data_desc_cmd_offset_fields(volatile uint64_t *qw1,
offset |= (m->l2_len >> 1) << IAVF_TX_DESC_LENGTH_MACLEN_SHIFT;
/* Enable L3 checksum offloading inner */
- if (m->ol_flags & (RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_IPV4)) {
- command |= IAVF_TX_DESC_CMD_IIPT_IPV4_CSUM;
- offset |= (m->l3_len >> 2) << IAVF_TX_DESC_LENGTH_IPLEN_SHIFT;
+ if (m->ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
+ if (m->ol_flags & RTE_MBUF_F_TX_IPV4) {
+ command |= IAVF_TX_DESC_CMD_IIPT_IPV4_CSUM;
+ offset |= (m->l3_len >> 2) << IAVF_TX_DESC_LENGTH_IPLEN_SHIFT;
+ }
} else if (m->ol_flags & RTE_MBUF_F_TX_IPV4) {
command |= IAVF_TX_DESC_CMD_IIPT_IPV4;
offset |= (m->l3_len >> 2) << IAVF_TX_DESC_LENGTH_IPLEN_SHIFT;
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] net/iavf: fix Tx path
2022-08-04 7:33 [PATCH] net/iavf: fix Tx path Ke Zhang
@ 2022-08-08 1:13 ` Zhang, Qi Z
2022-08-10 9:57 ` [PATCH v2] net/iavf: fix Tx L3 checksum offload flag Ke Zhang
1 sibling, 0 replies; 4+ messages in thread
From: Zhang, Qi Z @ 2022-08-08 1:13 UTC (permalink / raw)
To: Zhang, Ke1X, Li, Xiaoyun, Wu, Jingjing, Xing, Beilei, dev
Cc: Zhang, Ke1X, stable
> -----Original Message-----
> From: Ke Zhang <ke1x.zhang@intel.com>
> Sent: Thursday, August 4, 2022 3:33 PM
> To: Li, Xiaoyun <xiaoyun.li@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>;
> dev@dpdk.org
> Cc: Zhang, Ke1X <ke1x.zhang@intel.com>; stable@dpdk.org
> Subject: [PATCH] net/iavf: fix Tx path
>
> Fix the Tx path and Tx descriptor usage in order to make the Tx offload flags
> and Tx data descriptor consistent.
Seems all the changes are about fix Tx l3 checksum offload, the title and commit log can be more specific.
>
> Fixes: 1e728b01120c ("net/iavf: rework Tx path")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
> ---
> drivers/net/iavf/iavf_rxtx.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index
> 109ba756f8..dfd021889e 100644
> --- a/drivers/net/iavf/iavf_rxtx.c
> +++ b/drivers/net/iavf/iavf_rxtx.c
> @@ -2538,9 +2538,11 @@ iavf_build_data_desc_cmd_offset_fields(volatile
> uint64_t *qw1,
> offset |= (m->l2_len >> 1) <<
> IAVF_TX_DESC_LENGTH_MACLEN_SHIFT;
>
> /* Enable L3 checksum offloading inner */
> - if (m->ol_flags & (RTE_MBUF_F_TX_IP_CKSUM |
> RTE_MBUF_F_TX_IPV4)) {
> - command |= IAVF_TX_DESC_CMD_IIPT_IPV4_CSUM;
> - offset |= (m->l3_len >> 2) <<
> IAVF_TX_DESC_LENGTH_IPLEN_SHIFT;
> + if (m->ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
> + if (m->ol_flags & RTE_MBUF_F_TX_IPV4) {
> + command |= IAVF_TX_DESC_CMD_IIPT_IPV4_CSUM;
> + offset |= (m->l3_len >> 2) <<
> IAVF_TX_DESC_LENGTH_IPLEN_SHIFT;
> + }
> } else if (m->ol_flags & RTE_MBUF_F_TX_IPV4) {
> command |= IAVF_TX_DESC_CMD_IIPT_IPV4;
> offset |= (m->l3_len >> 2) <<
> IAVF_TX_DESC_LENGTH_IPLEN_SHIFT;
> --
> 2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] net/iavf: fix Tx L3 checksum offload flag
2022-08-04 7:33 [PATCH] net/iavf: fix Tx path Ke Zhang
2022-08-08 1:13 ` Zhang, Qi Z
@ 2022-08-10 9:57 ` Ke Zhang
2022-08-12 2:36 ` Zhang, Qi Z
1 sibling, 1 reply; 4+ messages in thread
From: Ke Zhang @ 2022-08-10 9:57 UTC (permalink / raw)
To: jingjing.wu, beilei.xing, dev; +Cc: Ke Zhang, stable
When ol_flag is only RTE_MBUF_F_TX_IPV4, the Tx L3
checksum offload is still configured to IIPT in the
command field of Tx data descriptor.
This patch is to fix the issue to make the Tx L3
checksum offload flags and Tx data descriptor
consistent.
Fixes: 1e728b01120c ("net/iavf: rework Tx path")
Cc: stable@dpdk.org
Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
---
v2: Update the commit log
---
---
drivers/net/iavf/iavf_rxtx.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 109ba756f8..dfd021889e 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2538,9 +2538,11 @@ iavf_build_data_desc_cmd_offset_fields(volatile uint64_t *qw1,
offset |= (m->l2_len >> 1) << IAVF_TX_DESC_LENGTH_MACLEN_SHIFT;
/* Enable L3 checksum offloading inner */
- if (m->ol_flags & (RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_IPV4)) {
- command |= IAVF_TX_DESC_CMD_IIPT_IPV4_CSUM;
- offset |= (m->l3_len >> 2) << IAVF_TX_DESC_LENGTH_IPLEN_SHIFT;
+ if (m->ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
+ if (m->ol_flags & RTE_MBUF_F_TX_IPV4) {
+ command |= IAVF_TX_DESC_CMD_IIPT_IPV4_CSUM;
+ offset |= (m->l3_len >> 2) << IAVF_TX_DESC_LENGTH_IPLEN_SHIFT;
+ }
} else if (m->ol_flags & RTE_MBUF_F_TX_IPV4) {
command |= IAVF_TX_DESC_CMD_IIPT_IPV4;
offset |= (m->l3_len >> 2) << IAVF_TX_DESC_LENGTH_IPLEN_SHIFT;
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH v2] net/iavf: fix Tx L3 checksum offload flag
2022-08-10 9:57 ` [PATCH v2] net/iavf: fix Tx L3 checksum offload flag Ke Zhang
@ 2022-08-12 2:36 ` Zhang, Qi Z
0 siblings, 0 replies; 4+ messages in thread
From: Zhang, Qi Z @ 2022-08-12 2:36 UTC (permalink / raw)
To: Zhang, Ke1X, Wu, Jingjing, Xing, Beilei, dev; +Cc: Zhang, Ke1X, stable
> -----Original Message-----
> From: Ke Zhang <ke1x.zhang@intel.com>
> Sent: Wednesday, August 10, 2022 5:57 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; dev@dpdk.org
> Cc: Zhang, Ke1X <ke1x.zhang@intel.com>; stable@dpdk.org
> Subject: [PATCH v2] net/iavf: fix Tx L3 checksum offload flag
>
> When ol_flag is only RTE_MBUF_F_TX_IPV4, the Tx L3 checksum offload is still
> configured to IIPT in the command field of Tx data descriptor.
>
> This patch is to fix the issue to make the Tx L3 checksum offload flags and Tx
> data descriptor consistent.
>
> Fixes: 1e728b01120c ("net/iavf: rework Tx path")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ke Zhang <ke1x.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-08-12 2:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-04 7:33 [PATCH] net/iavf: fix Tx path Ke Zhang
2022-08-08 1:13 ` Zhang, Qi Z
2022-08-10 9:57 ` [PATCH v2] net/iavf: fix Tx L3 checksum offload flag Ke Zhang
2022-08-12 2:36 ` Zhang, Qi Z
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).