net/nfp: fix return path in TSO processing function

Message ID 20221118162306.975425-1-niklas.soderlund@corigine.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/nfp: fix return path in TSO processing function |

Checks

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

Commit Message

Niklas Söderlund Nov. 18, 2022, 4:23 p.m. UTC
  From: Fei Qin <fei.qin@corigine.com>

When enable TSO, nfp_net_nfdk_tx_tso() fills segment information in Tx
descriptor. However, the return path for TSO is lost and the LSO related
fields of Tx descriptor is filled with zeros which prevents packets from
being sent.

This patch fixes the return path in TSO processing function to make sure
TSO works fine.

Fixes: c73dced48c8c ("net/nfp: add NFDk Tx")
Cc: stable@dpdk.org

Signed-off-by: Fei Qin <fei.qin@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_rxtx.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Ferruh Yigit Nov. 22, 2022, 2:02 a.m. UTC | #1
On 11/18/2022 4:23 PM, Niklas Söderlund wrote:
> From: Fei Qin <fei.qin@corigine.com>
> 
> When enable TSO, nfp_net_nfdk_tx_tso() fills segment information in Tx
> descriptor. However, the return path for TSO is lost and the LSO related
> fields of Tx descriptor is filled with zeros which prevents packets from
> being sent.
> 
> This patch fixes the return path in TSO processing function to make sure
> TSO works fine.
> 
> Fixes: c73dced48c8c ("net/nfp: add NFDk Tx")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Fei Qin <fei.qin@corigine.com>
> Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
> Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
> Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>

Applied to dpdk-next-net/main, thanks.
  

Patch

diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c
index 38377ca2182e..01cffdfde0b4 100644
--- a/drivers/net/nfp/nfp_rxtx.c
+++ b/drivers/net/nfp/nfp_rxtx.c
@@ -1135,6 +1135,8 @@  nfp_net_nfdk_tx_tso(struct nfp_net_txq *txq, struct rte_mbuf *mb)
 	txd.lso_hdrlen = mb->l2_len + mb->l3_len + mb->l4_len;
 	txd.lso_totsegs = (mb->pkt_len + mb->tso_segsz) / mb->tso_segsz;
 
+	return txd.raw;
+
 clean_txd:
 	txd.l3_offset = 0;
 	txd.l4_offset = 0;