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 5413D438ED; Thu, 18 Jan 2024 09:36:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1B087402B0; Thu, 18 Jan 2024 09:36:49 +0100 (CET) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id E4DA2400D7 for ; Thu, 18 Jan 2024 09:36:47 +0100 (CET) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-1d427518d52so4175965ad.0 for ; Thu, 18 Jan 2024 00:36:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705567007; x=1706171807; 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=cl8UXtsLgHdtSjQicRs+jtWqL4v2oxT3n24J7QAUMdc=; b=GiZpw5IPjC3LCV1rxLL/Xi6NUegfYwIScHd6a3YrhQ4vLl1ljCokg/oAKCtMMIpLT0 QKCpzpkQlZVZEvNTfCi8UATFGd1eKQUZpx+/I6KtvNsVgOiUTPDVgyK9XspnZkeTpG1e m6QVZyQ5q5BLG3mmJf9+QrwNjmBsub80E2niY+SVoQ46BV2ceB26zs64pVW1tsUKS8Ne sB7YCAPNH4pmKg82pRLaFz3q94DGtItVdbFVS75kq8ztrC5sj13YwDP4DaOyrf2Tf+pi JVLgE2ausiUU85CM5DN+DyEGNwbzEJJm0EqbfUpze1y/qkczN+IXIeZJqLejRWg1fGVv q+Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705567007; x=1706171807; 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=cl8UXtsLgHdtSjQicRs+jtWqL4v2oxT3n24J7QAUMdc=; b=axZDRp0u4yg0RtFWYJfLaJMClDjN6YHhcYNcA5d3IJZ8nqfKNY7gfOuh19Tv+oQWbh +g3cMMTAl9dlZTfm0Kz2E4BcITs4JSe3oDD/wmjkiOv/n7IDw6zN/fM52jGNynD0gV5d Ib4qHjIW55yXVb9mhX30tni5dAyPRF7LYdbP/sXF1qsQKxdmnJw2y0ZIZgh4P56gWsxI lIS5d5TYuI5UKNF03ZukIYgCXDjNd+v9XI7lbdGTSKfqsRFDBHD7SAMXUgGW3V5jTM+r iUQ7bnyqtY2SChAvlLA7gSOIfO/eVwdWl2M90ELcb28b7Jb2IGjhY5Oga2Q8qqClY3h6 JtpQ== X-Gm-Message-State: AOJu0YxJs3AofkBPiDhdAQqCYbYxr3Jd8IGbdlOS/Dov/H48WQsy7MBS 2+4vYSIZGE61mECxSXvqMYCM2VpvO6Em/DwXLaeIIzoFocqUSTsX X-Google-Smtp-Source: AGHT+IGJniGfyLI03i/bc4nRbkWAz+IwtPo+Gl/TXkJqAONnzasfsZftYHVgG5b3Vt9pqVAxrIxBhQ== X-Received: by 2002:a17:902:b607:b0:1d5:e6d0:209f with SMTP id b7-20020a170902b60700b001d5e6d0209fmr2596087pls.28.1705567006834; Thu, 18 Jan 2024 00:36:46 -0800 (PST) Received: from IDCREDBOX918.fareast.corp.microsoft.com ([167.220.238.25]) by smtp.gmail.com with ESMTPSA id kn7-20020a170903078700b001d6ff4a3ad7sm890166plb.85.2024.01.18.00.36.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 00:36:46 -0800 (PST) From: Kumara Parameshwaran To: hujiayu.hu@foxmail.com Cc: dev@dpdk.org, Kumara Parameshwaran Subject: [PATCH v5] gro : packets not getting flushed in heavy-weight mode API Date: Thu, 18 Jan 2024 14:06:26 +0530 Message-Id: <20240118083626.432048-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 v5: Fix compilation issue when GRO is not defined app/test-pmd/csumonly.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index c103e54111..6d9ce99500 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -863,16 +863,23 @@ 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); +#ifndef RTE_LIB_GRO if (unlikely(nb_rx == 0)) return false; - +#else + 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; + } +init: +#endif 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