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 6EDAD438DD; Wed, 17 Jan 2024 20:52:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F1F894014F; Wed, 17 Jan 2024 20:52:55 +0100 (CET) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id 669124003C for ; Wed, 17 Jan 2024 20:52:54 +0100 (CET) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1d50d0c98c3so48875ad.1 for ; Wed, 17 Jan 2024 11:52:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705521173; x=1706125973; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ASbbeJWSG/ust3eb0+nyf7zmwRsNlRDBDNR3+070zbQ=; b=FrhvjOoMztCvvwaEmMDKmjk8xd5f/RqUHupUtmTJkQ+kS2/0MYpop9VbbbIBQvYSJ0 JPp9H7ohbrkf5mYbI7iPngwP4Xh/fcXvOhoVMzSXPyy+JS5pOdoVkv94bdZXcghUVSfK s5g/0rH7y8KqIAPxysYwRNxfb0Ta/RHFyBHlLCBChwU3cACNBwNx8LTla4sh/SVHfpn4 D025zTZVDuBM+SsaRK1DP+7puVkSKTGIH0pwT37k6E5Mqi6atanGejxzCkSnXRPldxRg +SnIafJJAZMv+yCsWnXN5Kyc2Bu7JwlHGwDpdy2+Sm2wJXDHXCmGaMIt+9Yn3ryolOqs TdYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705521173; x=1706125973; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ASbbeJWSG/ust3eb0+nyf7zmwRsNlRDBDNR3+070zbQ=; b=iL7qEwZVjr4pmAbrGWq7a2U8fBvac/wLicBSBCD0B+Np6bJ+cW8/ycoisHeKyBbSaF G27rytAYj+sGD1rbZbqNHMkgCCRjm4dQlFmBCd2iar1+iNAx2VkJi+oBcR1l30iR3CFl +Atqel67F6b/i1Ibm5ohRV/DGKpVksTDxxX7G7F3nKL0KKX7g7a47kQbTImybo30IShJ CajXDZ6nM7wk1yoZJSi/KC4iARiB4VDF/p6xKAkzLWi88p1ZZSK1dLISD1Kqp9j/vo9b ljgz+wbqilTk/gjNL699f9e3YaYksQ0vdDpgPRYZJiBrmgwiClCOZREDWboRvQluxhyi HGiQ== X-Gm-Message-State: AOJu0YxW6qv0cqjxe1EmVCdktGLW3z80KDXfZtF9shVcmBdy4pQUP3P5 xoJa1Jfz8gyMpIPGkEBA2N4= X-Google-Smtp-Source: AGHT+IGPt4LEF4Ca3tLc2shCZo5uL2v4M4DLzDxX3+8KgctrH5L+7hGDH8gmzmnfMNKfyjD6y+3jdw== X-Received: by 2002:a17:903:18f:b0:1d5:f0f9:b8fc with SMTP id z15-20020a170903018f00b001d5f0f9b8fcmr2183351plg.55.1705521173338; Wed, 17 Jan 2024 11:52:53 -0800 (PST) Received: from IDCREDBOX918.fareast.corp.microsoft.com ([167.220.238.89]) by smtp.gmail.com with ESMTPSA id lo3-20020a170903434300b001d4160c4f97sm32147plb.188.2024.01.17.11.52.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 11:52:53 -0800 (PST) From: Kumara Parameshwaran To: hujiayu.hu@foxmail.com Cc: dev@dpdk.org, Kumara Parameshwaran Subject: [PATCH v1] gro : packets not getting flushed in heavy-weight mode API Date: Thu, 18 Jan 2024 01:22:28 +0530 Message-Id: <20240117195228.423261-1-kumaraparamesh92@gmail.com> X-Mailer: git-send-email 2.25.1 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. app/test-pmd/csumonly.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index c103e54111..42f105ac16 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); - if (unlikely(nb_rx == 0)) + if (unlikely(nb_rx == 0)) { +#ifdef RTE_LIB_GRO + gro_enable = gro_ports[fs->rx_port].enable; + if (unlikely(gro_enable && (gro_flush_cycles != GRO_DEFAULT_FLUSH_CYCLES))) { + goto init; + } else { + return false; + } +#else 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