net/iavf: fix SCTP tunnel packet forwarding issue

Message ID 1687310121-130508-1-git-send-email-wenzhuo.lu@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series net/iavf: fix SCTP tunnel packet forwarding issue |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/iol-broadcom-Performance success Performance Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-aarch-unit-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/loongarch-unit-testing success Unit Testing PASS
ci/loongarch-compilation success Compilation OK
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS

Commit Message

Wenzhuo Lu June 21, 2023, 1:15 a.m. UTC
  The SCTP tunnel packets cannot be forwarded in AVX2 mode.

As 2 features are developed in parallel, 5712bf9d6e14
("net/iavf: add Tx AVX2 offload path") doesn't consider
the impact of 4f8259df563a ("net/iavf: enable Tx outer
checksum offload on AVX512"). So, the wrong TX path is
selected.

Fixes: 5712bf9d6e14 ("net/iavf: add Tx AVX2 offload path")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Jiale, SongX June 28, 2023, 7:32 a.m. UTC | #1
> -----Original Message-----
> From: Wenzhuo Lu <wenzhuo.lu@intel.com>
> Sent: Wednesday, June 21, 2023 9:15 AM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>
> Subject: [PATCH] net/iavf: fix SCTP tunnel packet forwarding issue
> 
> The SCTP tunnel packets cannot be forwarded in AVX2 mode.
> 
> As 2 features are developed in parallel, 5712bf9d6e14
> ("net/iavf: add Tx AVX2 offload path") doesn't consider the impact of
> 4f8259df563a ("net/iavf: enable Tx outer checksum offload on AVX512"). So,
> the wrong TX path is selected.
> 
> Fixes: 5712bf9d6e14 ("net/iavf: add Tx AVX2 offload path")
> 
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> ---
Tested-by: Song Jiale <songx.jiale@intel.com>
  
Qi Zhang June 29, 2023, 8:57 a.m. UTC | #2
> -----Original Message-----
> From: Jiale, SongX <songx.jiale@intel.com>
> Sent: Wednesday, June 28, 2023 3:33 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>
> Subject: RE: [PATCH] net/iavf: fix SCTP tunnel packet forwarding issue
> 
> > -----Original Message-----
> > From: Wenzhuo Lu <wenzhuo.lu@intel.com>
> > Sent: Wednesday, June 21, 2023 9:15 AM
> > To: dev@dpdk.org
> > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>
> > Subject: [PATCH] net/iavf: fix SCTP tunnel packet forwarding issue
> >
> > The SCTP tunnel packets cannot be forwarded in AVX2 mode.
> >
> > As 2 features are developed in parallel, 5712bf9d6e14
> > ("net/iavf: add Tx AVX2 offload path") doesn't consider the impact of
> > 4f8259df563a ("net/iavf: enable Tx outer checksum offload on AVX512").
> > So, the wrong TX path is selected.
> >
> > Fixes: 5712bf9d6e14 ("net/iavf: add Tx AVX2 offload path")
> >
> > Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> > ---
> Tested-by: Song Jiale <songx.jiale@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  
Wenzhuo Lu July 6, 2023, 1:26 a.m. UTC | #3
Hi Qi,

> -----Original Message-----
> From: Zhang, Qi Z <qi.z.zhang@intel.com>
> Sent: Thursday, June 29, 2023 4:58 PM
> To: Jiale, SongX <songx.jiale@intel.com>; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>; dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>
> Subject: RE: [PATCH] net/iavf: fix SCTP tunnel packet forwarding issue
> 
> 
> 
> > -----Original Message-----
> > From: Jiale, SongX <songx.jiale@intel.com>
> > Sent: Wednesday, June 28, 2023 3:33 PM
> > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; dev@dpdk.org
> > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>
> > Subject: RE: [PATCH] net/iavf: fix SCTP tunnel packet forwarding issue
> >
> > > -----Original Message-----
> > > From: Wenzhuo Lu <wenzhuo.lu@intel.com>
> > > Sent: Wednesday, June 21, 2023 9:15 AM
> > > To: dev@dpdk.org
> > > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>
> > > Subject: [PATCH] net/iavf: fix SCTP tunnel packet forwarding issue
> > >
> > > The SCTP tunnel packets cannot be forwarded in AVX2 mode.
> > >
> > > As 2 features are developed in parallel, 5712bf9d6e14
> > > ("net/iavf: add Tx AVX2 offload path") doesn't consider the impact
> > > of 4f8259df563a ("net/iavf: enable Tx outer checksum offload on
> AVX512").
> > > So, the wrong TX path is selected.
> > >
> > > Fixes: 5712bf9d6e14 ("net/iavf: add Tx AVX2 offload path")
> > >
> > > Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> > > ---
> > Tested-by: Song Jiale <songx.jiale@intel.com>
> 
> Applied to dpdk-next-net-intel.
> 
> Thanks
> Qi
Sorry, this fix is not good because of some misunderstanding. Would you like helping to revert it? We'll send a new one to fix the issue. Thanks.
  
Qi Zhang July 6, 2023, 1:32 a.m. UTC | #4
> -----Original Message-----
> From: Lu, Wenzhuo <wenzhuo.lu@intel.com>
> Sent: Thursday, July 6, 2023 9:27 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Jiale, SongX <songx.jiale@intel.com>;
> dev@dpdk.org
> Subject: RE: [PATCH] net/iavf: fix SCTP tunnel packet forwarding issue
> 
> Hi Qi,
> 
> > -----Original Message-----
> > From: Zhang, Qi Z <qi.z.zhang@intel.com>
> > Sent: Thursday, June 29, 2023 4:58 PM
> > To: Jiale, SongX <songx.jiale@intel.com>; Lu, Wenzhuo
> > <wenzhuo.lu@intel.com>; dev@dpdk.org
> > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>
> > Subject: RE: [PATCH] net/iavf: fix SCTP tunnel packet forwarding issue
> >
> >
> >
> > > -----Original Message-----
> > > From: Jiale, SongX <songx.jiale@intel.com>
> > > Sent: Wednesday, June 28, 2023 3:33 PM
> > > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; dev@dpdk.org
> > > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>
> > > Subject: RE: [PATCH] net/iavf: fix SCTP tunnel packet forwarding
> > > issue
> > >
> > > > -----Original Message-----
> > > > From: Wenzhuo Lu <wenzhuo.lu@intel.com>
> > > > Sent: Wednesday, June 21, 2023 9:15 AM
> > > > To: dev@dpdk.org
> > > > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>
> > > > Subject: [PATCH] net/iavf: fix SCTP tunnel packet forwarding issue
> > > >
> > > > The SCTP tunnel packets cannot be forwarded in AVX2 mode.
> > > >
> > > > As 2 features are developed in parallel, 5712bf9d6e14
> > > > ("net/iavf: add Tx AVX2 offload path") doesn't consider the impact
> > > > of 4f8259df563a ("net/iavf: enable Tx outer checksum offload on
> > AVX512").
> > > > So, the wrong TX path is selected.
> > > >
> > > > Fixes: 5712bf9d6e14 ("net/iavf: add Tx AVX2 offload path")
> > > >
> > > > Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> > > > ---
> > > Tested-by: Song Jiale <songx.jiale@intel.com>
> >
> > Applied to dpdk-next-net-intel.
> >
> > Thanks
> > Qi
> Sorry, this fix is not good because of some misunderstanding. Would you like
> helping to revert it? We'll send a new one to fix the issue. Thanks.

OK, has the patch has not been merged in main branch, I have reverted in dpdk-next-net-intel.
  

Patch

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 4c59c1a..a22abb1 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -3919,7 +3919,7 @@  struct iavf_tx_context_desc_qws {
 
 	check_ret = iavf_tx_vec_dev_check(dev);
 
-	if (check_ret >= 0 &&
+	if ((check_ret == IAVF_VECTOR_PATH || check_ret == IAVF_VECTOR_OFFLOAD_PATH) &&
 	    rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) {
 		/* SSE not support offload path yet. */
 		if (check_ret == IAVF_VECTOR_PATH) {