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 8E2D043875; Wed, 17 Jan 2024 21:20:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3DC6E4014F; Wed, 17 Jan 2024 21:20:39 +0100 (CET) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mails.dpdk.org (Postfix) with ESMTP id 846894003C for ; Wed, 17 Jan 2024 21:20:37 +0100 (CET) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-6d9cdd0a5e6so6540317b3a.3 for ; Wed, 17 Jan 2024 12:20:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705522836; x=1706127636; 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=20NfA3D8rjj1ZJyrVaGaOGiz57cYohV+xme4MiKFUGY=; b=GDumpcsPRK6uvpn4zBCkYcN3ZQ8ACdPsQUKH+yrIM80gann8hYJHRhpk0YoQ7WwqGV Tyu66u71mLRA01tctuW5Pdk8LL7cYTMfCjnQngdKxib4PYg0exWO6cpgN3UVP1apXvFc p82krGKlO70Vvqih3WIOF4lkY1+7m4vzD5RjVETMIPji9+5duUY8FzCxm7ylLgCHlv1u oyvJvgweznwwJh4PWRlvIyUhUAkxbndJuYLEuo0uied6kxfCCTHYZsDgAbnQqhW+Ii8G sNC5ed04iWwB8XyUrTxHo8bzvZyRMV9jxMXtlvO+9BbmOsithrzkyR1xu2OIkWwYZ+Td dbjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705522836; x=1706127636; 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=20NfA3D8rjj1ZJyrVaGaOGiz57cYohV+xme4MiKFUGY=; b=i41zZD7vmydLlZqM45h6HE+CBmoNffI5njUUdy4W6BjdJRnkHtvZVgxBFgMwxinNkO wtEcFoqLS99VXimCCEZ10kWnq0IvSIy+BXUR1Us571nDSoa03yWIPjv/hMgFk0CQgEON +AZdQCQTiAS8k4SGMjKWiqFQCRumLOVL0wOLvVeJAGNTT8wetjLOXiPoTkszwHaeb+Qv AHbefiny/q3/pIPHNW9Lt5W1m1Wj/YvmtOnyqFHoHolAAzC7O3hCawwWvIblm0zIdjob TMmsHll/MYj+Ip0B0zkSpnruUSX+BKtJvec61+FyC8k2Vh/B3tjiOiA4Jkqn0ORQROvB SOag== X-Gm-Message-State: AOJu0Yy9Z/mOgM07bITNhTzmF0dU8yUVaqYMffnhT5y5EIXoZhjZ3WVe PPC2IUskWeJ8shHDOwnnDgQ= X-Google-Smtp-Source: AGHT+IH/WLAiiMu+37A48+HuYGTtCqD8r78RfD8IvfMIrhp9paUSgX+lJldlz3t4qvoTr7VIbKhRUw== X-Received: by 2002:a05:6a00:1492:b0:6db:c92:edd3 with SMTP id v18-20020a056a00149200b006db0c92edd3mr6510537pfu.62.1705522836590; Wed, 17 Jan 2024 12:20:36 -0800 (PST) Received: from IDCREDBOX918.fareast.corp.microsoft.com ([167.220.238.25]) by smtp.gmail.com with ESMTPSA id kq9-20020a056a004b0900b006db85b12036sm1861850pfb.137.2024.01.17.12.20.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 12:20:36 -0800 (PST) From: Kumara Parameshwaran To: hujiayu.hu@foxmail.com Cc: dev@dpdk.org, Kumara Parameshwaran Subject: [PATCH v3] gro : packets not getting flushed in heavy-weight mode API Date: Thu, 18 Jan 2024 01:50:21 +0530 Message-Id: <20240117202021.427409-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 v3: Fix 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..b50f1b01d0 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