DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1] gro : packets not getting flushed in heavy-weight mode API
@ 2024-01-17 19:52 Kumara Parameshwaran
  2024-01-17 19:57 ` kumaraparameshwaran rathinavel
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Kumara Parameshwaran @ 2024-01-17 19:52 UTC (permalink / raw)
  To: hujiayu.hu; +Cc: dev, Kumara Parameshwaran

In heavy-weight mode GRO which is based on timer, the GRO packets will not be
flushed inspite of timer expiry if there is no packet in the current poll.
If timer mode GRO is enabled the rte_gro_timeout_flush API should be invoked.

Signed-off-by: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
---
v1:
    Changes to make sure that the GRO flush API is invoked if there are no packets in 
    current poll and timer expiry.

 app/test-pmd/csumonly.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index c103e54111..42f105ac16 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -863,16 +863,24 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
 
 	/* receive a burst of packet */
 	nb_rx = common_fwd_stream_receive(fs, pkts_burst, nb_pkt_per_burst);
-	if (unlikely(nb_rx == 0))
+	if (unlikely(nb_rx == 0)) {
+#ifdef RTE_LIB_GRO
+		gro_enable = gro_ports[fs->rx_port].enable;
+		if (unlikely(gro_enable && (gro_flush_cycles != GRO_DEFAULT_FLUSH_CYCLES))) {
+			goto init;
+		} else {
+			return false;
+		}
+#else
 		return false;
+#endif
+	}
 
+init:
 	rx_bad_ip_csum = 0;
 	rx_bad_l4_csum = 0;
 	rx_bad_outer_l4_csum = 0;
 	rx_bad_outer_ip_csum = 0;
-#ifdef RTE_LIB_GRO
-	gro_enable = gro_ports[fs->rx_port].enable;
-#endif
 
 	txp = &ports[fs->tx_port];
 	tx_offloads = txp->dev_conf.txmode.offloads;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-02-22 11:15 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-17 19:52 [PATCH v1] gro : packets not getting flushed in heavy-weight mode API Kumara Parameshwaran
2024-01-17 19:57 ` kumaraparameshwaran rathinavel
2024-01-17 20:14 ` [PATCH v2] " Kumara Parameshwaran
2024-01-17 20:20 ` [PATCH v3] " Kumara Parameshwaran
2024-01-17 20:24 ` [PATCH v4] " Kumara Parameshwaran
2024-01-18  8:36 ` [PATCH v5] " Kumara Parameshwaran
2024-02-07 22:57   ` Ferruh Yigit
2024-02-11  4:55 ` [PATCH v6] " Kumara Parameshwaran
2024-02-12 15:05   ` Ferruh Yigit
2024-02-16  3:40 ` [PATCH v7] app/testpmd : fix " Kumara Parameshwaran
2024-02-16  4:13   ` Stephen Hemminger
2024-02-16  3:47 ` [PATCH v8] " Kumara Parameshwaran
2024-02-16 13:56   ` Ferruh Yigit
2024-02-21 18:02     ` Ferruh Yigit
2024-02-22 11:15       ` kumaraparameshwaran rathinavel

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).