[v1] app/testpmd : return if no packets in GRO heavy weight mode

Message ID 20240225061636.389218-1-kumaraparamesh92@gmail.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series [v1] app/testpmd : return if no packets in GRO heavy weight mode |

Checks

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

Commit Message

Kumara Parameshwaran Feb. 25, 2024, 6:16 a.m. UTC
  If there are no packets flushed in GRO heavy weight mode,
return false as this fall through code would return true
indicating that packets are available

Fixes: 461c287ab553 ("app/testpmd: fix GRO packets flush on timeout")
Cc: stable@dpdk.org

Signed-off-by: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
---
 app/test-pmd/csumonly.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Ferruh Yigit Feb. 26, 2024, 10:43 a.m. UTC | #1
On 2/25/2024 6:16 AM, Kumara Parameshwaran wrote:
> If there are no packets flushed in GRO heavy weight mode,
> return false as this fall through code would return true
> indicating that packets are available
> 
> Fixes: 461c287ab553 ("app/testpmd: fix GRO packets flush on timeout")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
> 
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
Applied to dpdk-next-net/main, thanks.
  

Patch

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index d73f08b2c6..6711dda42e 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -1142,6 +1142,8 @@  pkt_burst_checksum_forward(struct fwd_stream *fs)
 						gro_pkts_num);
 				fs->gro_times = 0;
 			}
+			if (nb_rx == 0)
+				return false;
 		}
 
 		pkts_ip_csum_recalc(pkts_burst, nb_rx, tx_offloads);