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 16AC7438DD; Wed, 17 Jan 2024 20:58:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 90ABF4014F; Wed, 17 Jan 2024 20:58:11 +0100 (CET) Received: from mail-yw1-f169.google.com (mail-yw1-f169.google.com [209.85.128.169]) by mails.dpdk.org (Postfix) with ESMTP id 800884003C for ; Wed, 17 Jan 2024 20:58:09 +0100 (CET) Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-5e54d40cca2so88747757b3.3 for ; Wed, 17 Jan 2024 11:58:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705521489; x=1706126289; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=EOu9q5wqHGRBcJnPVDB9Unz697Qak2pe2MH1V+cHtb0=; b=Yxb2iNfz+WZVOpDLWj2yNQoxfvU99w57zPEkZF9NToEcy8rOKl1DiuuMoWXuGJ9vnF g7Dxwotj8T3tVR9OA/hBzFFs5dD4fjMTZLKUr8044qP6VtGL7Eh2vChm72381qkanFae 5nHvKgn8tJkUsebNKKm/CjWph5ey0UYReOBWqxj7C3Si76O0KwiRNOY6yBfLseZuJhAa 5e54eodFLCfGw9K+R/NV4gDl9nNs8a6OcqL+1ezDzN6uT+sDHzP3SLX4CyQRiQzyUVsM IztGHgtcUded1X0YFFxeUJ39PgpX7RDBHFftmSM8ELYHEyyxYTC9FQEfdDzhDXjuuuDR nDSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705521489; x=1706126289; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EOu9q5wqHGRBcJnPVDB9Unz697Qak2pe2MH1V+cHtb0=; b=j+31tHV4kCEUUqqCFe4L6BqYKRUiYAfyy4el8LFGSeVriTxc66ShQ5+98G+v2pC5Jc 4ju0aS2Xc/+Hgy61vWRUE1GHB4eZJ0vEA1Vk8qf4iw+N/Z4T/7vmMXZteENJWYnZzgzn WF9LfuZpExL+tUvtYVuZcDAOJRWW+fKbCt9wEmPtGfjeFEwQuhishtdG+tEnrwSyoDGc ik4taa4GYzeHqHFR9SnQephddhRHWmBnqn8IOiWsmpC9hHkR5Nd6DfCkYuyLoC/KYKHD WMFmrrd3sDkYNI+c8OGv3NPbA9XAU9e5XIAFH1IJGvHPkBpaNIKa7UUh7jkr2QZOFEo4 JneQ== X-Gm-Message-State: AOJu0YygIzI5fj6MoO/WFRDTMDakhffzFyIOBnYQdI26T0Gno3AfmbjJ rmvWhN6OQdWDqBvwrhnyjM4+XXAuFhIVSJHDFvA= X-Google-Smtp-Source: AGHT+IFDK3SZXP+SEeJaEgh9HrLjVJ3Z9DHVgonwyeClCr/l5qwtCLgwIRwJ3hHZUBKwDKt06uIsToRBOQl/RCiL+ro= X-Received: by 2002:a05:6902:2847:b0:dbe:351a:5221 with SMTP id ee7-20020a056902284700b00dbe351a5221mr5139852ybb.123.1705521488717; Wed, 17 Jan 2024 11:58:08 -0800 (PST) MIME-Version: 1.0 References: <20240117195228.423261-1-kumaraparamesh92@gmail.com> In-Reply-To: <20240117195228.423261-1-kumaraparamesh92@gmail.com> From: kumaraparameshwaran rathinavel Date: Thu, 18 Jan 2024 01:27:57 +0530 Message-ID: Subject: Re: [PATCH v1] gro : packets not getting flushed in heavy-weight mode API To: hujiayu.hu@foxmail.com Cc: dev@dpdk.org Content-Type: multipart/alternative; boundary="0000000000007dea9c060f29aa79" 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 --0000000000007dea9c060f29aa79 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jan 18, 2024 at 1:22=E2=80=AFAM Kumara Parameshwaran < kumaraparamesh92@gmail.com> wrote: > In heavy-weight mode GRO which is based on timer, the GRO packets will no= t > 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 n= o > 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 =3D common_fwd_stream_receive(fs, pkts_burst, > nb_pkt_per_burst); > - if (unlikely(nb_rx =3D=3D 0)) > + if (unlikely(nb_rx =3D=3D 0)) { > +#ifdef RTE_LIB_GRO > + gro_enable =3D gro_ports[fs->rx_port].enable; > + if (unlikely(gro_enable && (gro_flush_cycles !=3D > GRO_DEFAULT_FLUSH_CYCLES))) { > + goto init; > + } else { > + return false; > + } > +#else > return false; > +#endif > + } > > +init: > rx_bad_ip_csum =3D 0; > rx_bad_l4_csum =3D 0; > rx_bad_outer_l4_csum =3D 0; > rx_bad_outer_ip_csum =3D 0; > -#ifdef RTE_LIB_GRO > - gro_enable =3D gro_ports[fs->rx_port].enable; > -#endif > > txp =3D &ports[fs->tx_port]; > tx_offloads =3D txp->dev_conf.txmode.offloads; > -- > 2.25.1 > >>Please ignore this patch, this has an issue will raise a new one. > > --0000000000007dea9c060f29aa79 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Jan 18, 2024 at 1:22=E2=80=AF= AM Kumara Parameshwaran <k= umaraparamesh92@gmail.com> wrote:
In heavy-weight mode GRO which is based on ti= mer, the GRO packets will not be
flushed inspite of timer expiry if there is no packet in the current poll.<= br> If timer mode GRO is enabled the rte_gro_timeout_flush API should be invoke= d.

Signed-off-by: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
---
v1:
=C2=A0 =C2=A0 Changes to make sure that the GRO flush API is invoked if the= re are no packets in
=C2=A0 =C2=A0 current poll and timer expiry.

=C2=A0app/test-pmd/csumonly.c | 16 ++++++++++++----
=C2=A01 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)

=C2=A0 =C2=A0 =C2=A0 =C2=A0 /* receive a burst of packet */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 nb_rx =3D common_fwd_stream_receive(fs, pkts_bu= rst, nb_pkt_per_burst);
-=C2=A0 =C2=A0 =C2=A0 =C2=A0if (unlikely(nb_rx =3D=3D 0))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0if (unlikely(nb_rx =3D=3D 0)) {
+#ifdef RTE_LIB_GRO
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gro_enable =3D gro_= ports[fs->rx_port].enable;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (unlikely(gro_en= able && (gro_flush_cycles !=3D GRO_DEFAULT_FLUSH_CYCLES))) {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0goto init;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} else {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0return false;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
+#else
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return false;
+#endif
+=C2=A0 =C2=A0 =C2=A0 =C2=A0}

+init:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 rx_bad_ip_csum =3D 0;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 rx_bad_l4_csum =3D 0;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 rx_bad_outer_l4_csum =3D 0;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 rx_bad_outer_ip_csum =3D 0;
-#ifdef RTE_LIB_GRO
-=C2=A0 =C2=A0 =C2=A0 =C2=A0gro_enable =3D gro_ports[fs->rx_port].enable= ;
-#endif

=C2=A0 =C2=A0 =C2=A0 =C2=A0 txp =3D &ports[fs->tx_port];
=C2=A0 =C2=A0 =C2=A0 =C2=A0 tx_offloads =3D txp->dev_conf.txmode.offload= s;
--
2.25.1
>>Please ignore this patch, this has an issue will ra= ise a new one.

--0000000000007dea9c060f29aa79--