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 7D9C543875; Wed, 17 Jan 2024 21:14:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A2494014F; Wed, 17 Jan 2024 21:14:25 +0100 (CET) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mails.dpdk.org (Postfix) with ESMTP id 907124003C for ; Wed, 17 Jan 2024 21:14:24 +0100 (CET) Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-5cd51c0e8ebso6041289a12.3 for ; Wed, 17 Jan 2024 12:14:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705522464; x=1706127264; 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=cgKkRvDej5GJ1Jt5XYXl6iTiI1Ho8jB8dUqhBUkmJBA=; b=A8mT91Wg/c8wuVEmIgohCidUXMAj13xs/sHhy7B4WhAkgirg9TMd0QONgq7yooFoDg gsznHEIaPb+ZdS1+kadwMbvkHULcWmodO6b8ewaHKoKl1/YsCZl03/1tiO9nY8KtrYM/ NjRRfpnPT3YsubLblC/2Bc2jlxoQAzIg5C19li5XMGjHIABFTcl5hey97+ubQ/I28Q9q Q95kFGZmtqCIJas1zBi9gEmI3+A3cRZBk4WPjZbi68LGKHQhJa6Gmu8qtngbDz0Q+/ic rjOhLJyAZ/XvAUmePgy3iBl80X2WqIdJjvGwIzzuaEcqq4+O/XiYEFFXffTvJkoYUxwo Fyfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705522464; x=1706127264; 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=cgKkRvDej5GJ1Jt5XYXl6iTiI1Ho8jB8dUqhBUkmJBA=; b=eQSYFUTD43y5aprWTqJqJIL+XS79YMzF8nkJgyzWRUVpVwEB38vsBBgLulyXCaKeSJ Zynpc4SYxK3s/mBxoEZMhtvzTicxkDJ36Ra5Wqs0DPtKh8iwk8CkMwGhnld+QyAm78j4 HOveRBNzZaLg3CBEwLsNEoZwIUpXctzPr6r1Lbk/9/XD8NtFUT8H8zxjqm+G7/tpBJFU tw6YV4H2zgYEVKPCdsGCnUlqHiPLrl2z95GUUXI2Xqy2TMmHRvQdEnSdwTtbNfTxbWiQ 9RGVo1W2bAvdkfVgnkdYYKdh43f9LnwFxWq0YvNCspK15m4v3PqoSO5obgKCFPPCVj5v YVhA== X-Gm-Message-State: AOJu0Yx3ku84icUpKIaq4+f4LWGocs4D6A02qlUvTa0DGiKFCIXN8y8U GRakdueTveSobINq3BBgRDQ= X-Google-Smtp-Source: AGHT+IEpZ/NXyBcL8mjIK3uVxNdKUcLvW3yWtnSh59GBYR+QTxKT1ODezpw5nZXHCn5XAnIlYPr3HA== X-Received: by 2002:a05:6a20:431f:b0:19b:7e1b:d8e1 with SMTP id h31-20020a056a20431f00b0019b7e1bd8e1mr1108179pzk.65.1705522463654; Wed, 17 Jan 2024 12:14:23 -0800 (PST) Received: from IDCREDBOX918.fareast.corp.microsoft.com ([167.220.238.89]) by smtp.gmail.com with ESMTPSA id du19-20020a056a002b5300b006d9ecb8e956sm1913587pfb.173.2024.01.17.12.14.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 12:14:23 -0800 (PST) From: Kumara Parameshwaran To: hujiayu.hu@foxmail.com Cc: dev@dpdk.org, Kumara Parameshwaran Subject: [PATCH v2] gro : packets not getting flushed in heavy-weight mode API Date: Thu, 18 Jan 2024 01:44:08 +0530 Message-Id: <20240117201408.426140-1-kumaraparamesh92@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240117195228.423261-1-kumaraparamesh92@gmail.com> References: <20240117195228.423261-1-kumaraparamesh92@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- v1: Changes to make sure that the GRO flush API is invoked if there are no packets in current poll and timer expiry. v2: Fix code organisation issue app/test-pmd/csumonly.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index c103e54111..c1fde50126 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -863,16 +863,25 @@ 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); +#ifdef RTE_LIB_GRO + gro_enable = gro_ports[fs->rx_port].enable; + if (unlikely(nb_rx == 0)) { + if (gro_enable && (gro_flush_cycles != GRO_DEFAULT_FLUSH_CYCLES)) { + goto init; + } else { + return false; + } + } +#else if (unlikely(nb_rx == 0)) 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