From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AD15C43C60 for ; Thu, 7 Mar 2024 02:38:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A08D542F0D; Thu, 7 Mar 2024 02:38:05 +0100 (CET) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mails.dpdk.org (Postfix) with ESMTP id 361D142F37 for ; Thu, 7 Mar 2024 02:38:02 +0100 (CET) Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-412f0655d81so3237675e9.2 for ; Wed, 06 Mar 2024 17:38:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709775482; x=1710380282; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oI/fCl4gymMaLNKlh1V1IL30GePITO5chhVr1qTACiM=; b=ASrJ2HuPCkwZfBs2JwfZqN4u4QSwbZjuvynUoeVvCDIUjBIfifLOXRzOJIUCq6k7iZ 2RMrRP2plidieaj8GkYe78W8ImGp3fjW08oXbERYaGL7UTYcVpZFVdalLp6MS4ory9A2 aw+HZNnyKM49OhRjadaLz8GESEAJzJ/Jb3sWUUoSVPKWnsMq1/LLgA1dmdoAfNJhkeNc B8kqWHBzLfI0+Sl5BNi+c/u9wix7ZX0/5e+MjVtGpSsv3md0PffY4sV0Gy1ppl+2NPgX 4PSzJVdLcJLQE1NoA4fQ+UMCsKJfcyH0uVMm+WXFxVQ4dqsZ2oKBrlhbg6rbKgminJUz +Gmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709775482; x=1710380282; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oI/fCl4gymMaLNKlh1V1IL30GePITO5chhVr1qTACiM=; b=Rs3x/n6RbrjxewnkCKCIbNIWlqpvVLcqlPjrnmRUnQ8cMnJ/o0NhgbR18kAwlXLUgT i2qJkPFxcqTDDdteWY9TEuQqC1orIoJMIFff2Bcg5O/P6HIcB/5TbGckt6vetxUCqdVB vXWI8f8PQlQgtgASqWq8u4fC2jXbDAEGDl1tbWCAUMG1QLgrIGxsUC4+saNFxjK7CfcQ ywooYRxyEODwYxwzSeu24UhBPowwgGxJ2eprZfF4qD8Rrn1umsX7AhjCnLbTQz8ai7aI IO9TfNvbm5Xsn+I8G9y3bhhE3hHJJjr5wFBZazlzvyjPz3OZzSnmwWG3VPdo2JaghaaA zhvg== X-Forwarded-Encrypted: i=1; AJvYcCUM/W+AA06OPf6CPX/5ColbKfcJsaJBvrpl72wPeo+PjQjLaCkRbFo+uRz3iT1bE16B8Rdidu1kwc1/uJT7VOg= X-Gm-Message-State: AOJu0YyEsOhwBgpcqV/szeVKWg9EiQjmkFbBEqaEbawirk//4Thd8iqk MF4cue9Yba07YAxwoj9bWJYxCXt0bgmuXzuJnl75IYl7kldF2oel X-Google-Smtp-Source: AGHT+IEjMl1MqFeTOGRuIwulbgoksYXBac3eUPuSgyln9kHhZjLitqYhHk4Rebx6McT7LJl1Tghr5w== X-Received: by 2002:a05:600c:4e91:b0:412:b489:14f9 with SMTP id f17-20020a05600c4e9100b00412b48914f9mr13762188wmq.15.1709775482462; Wed, 06 Mar 2024 17:38:02 -0800 (PST) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id u12-20020a05600c19cc00b004126afe04f6sm859268wmq.32.2024.03.06.17.38.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 17:38:01 -0800 (PST) From: luca.boccassi@gmail.com To: Kumara Parameshwaran Cc: Ferruh Yigit , dpdk stable Subject: patch 'app/testpmd: fix GRO packets flush on timeout' has been queued to stable release 22.11.5 Date: Thu, 7 Mar 2024 01:31:59 +0000 Message-Id: <20240307013159.1735343-102-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240307013159.1735343-1-luca.boccassi@gmail.com> References: <20240307013159.1735343-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/09/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/aa166bc2d3bab9d111afc944c0e101d38bb4d2a5 Thanks. Luca Boccassi --- >From aa166bc2d3bab9d111afc944c0e101d38bb4d2a5 Mon Sep 17 00:00:00 2001 From: Kumara Parameshwaran Date: Fri, 16 Feb 2024 09:17:50 +0530 Subject: [PATCH] app/testpmd: fix GRO packets flush on timeout [ upstream commit 461c287ab55303bad1e68bd1dfac6e6ec27953c3 ] In heavy-weight mode GRO which is based on timer, the GRO packets will not be flushed in spite 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. Fixes: b7091f1dcfbc ("app/testpmd: enable the heavyweight mode TCP/IPv4 GRO") Signed-off-by: Kumara Parameshwaran Reviewed-by: Ferruh Yigit --- app/test-pmd/csumonly.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index 4efb72be77..5520cc9db7 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -867,17 +867,29 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) nb_rx = rte_eth_rx_burst(fs->rx_port, fs->rx_queue, pkts_burst, nb_pkt_per_burst); inc_rx_burst_stats(fs, nb_rx); - if (unlikely(nb_rx == 0)) - return; + if (unlikely(nb_rx == 0)) { +#ifndef RTE_LIB_GRO + return ; +#else + gro_enable = gro_ports[fs->rx_port].enable; + /* + * Check if packets need to be flushed in the GRO context + * due to a timeout. + * + * Continue only in GRO heavyweight mode and if there are + * packets in the GRO context. + */ + if (!gro_enable || (gro_flush_cycles == GRO_DEFAULT_FLUSH_CYCLES) || + (rte_gro_get_pkt_count(current_fwd_lcore()->gro_ctx) == 0)) + return ; +#endif + } fs->rx_packets += nb_rx; 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; @@ -1105,6 +1117,7 @@ tunnel_update: } #ifdef RTE_LIB_GRO + gro_enable = gro_ports[fs->rx_port].enable; if (unlikely(gro_enable)) { if (gro_flush_cycles == GRO_DEFAULT_FLUSH_CYCLES) { nb_rx = rte_gro_reassemble_burst(pkts_burst, nb_rx, -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-07 01:05:43.440236373 +0000 +++ 0102-app-testpmd-fix-GRO-packets-flush-on-timeout.patch 2024-03-07 01:05:35.142947317 +0000 @@ -1 +1 @@ -From 461c287ab55303bad1e68bd1dfac6e6ec27953c3 Mon Sep 17 00:00:00 2001 +From aa166bc2d3bab9d111afc944c0e101d38bb4d2a5 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 461c287ab55303bad1e68bd1dfac6e6ec27953c3 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -19,2 +20,2 @@ - app/test-pmd/csumonly.c | 21 +++++++++++++++++---- - 1 file changed, 17 insertions(+), 4 deletions(-) + app/test-pmd/csumonly.c | 23 ++++++++++++++++++----- + 1 file changed, 18 insertions(+), 5 deletions(-) @@ -23 +24 @@ -index 21210aff43..d73f08b2c6 100644 +index 4efb72be77..5520cc9db7 100644 @@ -26,4 +27,4 @@ -@@ -870,16 +870,28 @@ 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); +@@ -867,17 +867,29 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) + nb_rx = rte_eth_rx_burst(fs->rx_port, fs->rx_queue, pkts_burst, + nb_pkt_per_burst); + inc_rx_burst_stats(fs, nb_rx); @@ -30,0 +32 @@ +- return; @@ -33 +35 @@ - return false; ++ return ; @@ -45 +47 @@ -+ return false; ++ return ; @@ -48,0 +51 @@ + fs->rx_packets += nb_rx; @@ -59 +62 @@ -@@ -1110,6 +1122,7 @@ tunnel_update: +@@ -1105,6 +1117,7 @@ tunnel_update: