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 32F7043875; Wed, 17 Jan 2024 21:24:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AF5BC4014F; Wed, 17 Jan 2024 21:24:18 +0100 (CET) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mails.dpdk.org (Postfix) with ESMTP id 03F264003C for ; Wed, 17 Jan 2024 21:24:16 +0100 (CET) Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6d9b37f4804so22640b3a.1 for ; Wed, 17 Jan 2024 12:24:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705523056; x=1706127856; 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=r1ph68fLwIAHOJ+VDGmRkCvlDTc25tO3n/UQFU3LiMs=; b=aY1mcAnr+KiEvCx6u7Ry8+ycfYhwOGL28BcKPD7YrCY/MV8F1GdtmMZT0M0L7JiyE0 eohot5MJHIk9xK5DmRBDTTJq1TSIDD2R7hLO01cRdqi33uqQDPm6HhtXVH27T5+pJw3f of/YMEMfcynp5/6qJdSkWKUnurrCQT4BCuEHXgX80Dq/yLhPsdyR/WRyE1AgseWVgnhQ uJuiauFekLxqTyekSQ2/UQ0kZDDCbaw7QLY8Pl7zWQflIgnnCogm6UwPUtStpT93VW7y O5puH51gpPZJcJKXXuYgSuBD41jNNeRDLC4K9qfXXgeI5WKIcPlnG3zjNZ6bt0n7eHQy /hXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705523056; x=1706127856; 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=r1ph68fLwIAHOJ+VDGmRkCvlDTc25tO3n/UQFU3LiMs=; b=LzyywK65DWjN3KSEhuStQP27+O4R8DHIUfzidRQjAGunXvD5Xw4wX+Y6VxKyaUmp/T 5PWsNTwsFxmz0obKVRVrtqGXr1scusYHJJ8MzI/MC1TigXZ8CaiER5lJfaSb7ndiuyiy Uz6mb0MFoGtOPghDwa6vQ6pOaLAv1+Cz758qC2n+7diPh9AIeW/kO8JpYlGg/xZo5QrG qj7IvIUGO8YtViCY0qw8zPeRn7Y8vYpM7x25tLs6ZGkEtjGqVFiMYVyQFXaQeMTVsP1y DAKiNPYnTwhwEvwQtpH+VMlgb8X15vE3PcEJdhUCRzpsRS4B1cB2VsLAdCfPGW2dA+r8 rggA== X-Gm-Message-State: AOJu0YwY/R7w2yPpTfxXZj/50yu3OlbACK+nbaAFOkjFxikLlwfA/mLj IoTDD2k12RHQbV1QPsIHM7A= X-Google-Smtp-Source: AGHT+IFErYEjXzqQQpibjYE5i4k/wE443mdezPMCa4d3y+0Q1P6eej5bJZv4ET+QIIzSbq8cW7pAJg== X-Received: by 2002:a05:6a20:c90a:b0:19a:b7e3:978c with SMTP id gx10-20020a056a20c90a00b0019ab7e3978cmr2246958pzb.11.1705523055965; Wed, 17 Jan 2024 12:24:15 -0800 (PST) Received: from IDCREDBOX918.fareast.corp.microsoft.com ([167.220.238.25]) by smtp.gmail.com with ESMTPSA id y22-20020a63b516000000b005c60ad6c4absm66034pge.4.2024.01.17.12.24.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 12:24:15 -0800 (PST) From: Kumara Parameshwaran To: hujiayu.hu@foxmail.com Cc: dev@dpdk.org, Kumara Parameshwaran Subject: [PATCH v4] gro : packets not getting flushed in heavy-weight mode API Date: Thu, 18 Jan 2024 01:54:00 +0530 Message-Id: <20240117202400.428027-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 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. 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 v3: Fix warnings v4: Fix error and warnings app/test-pmd/csumonly.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index c103e54111..4265f98c15 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); +#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