From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
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 <dev@dpdk.org>; Wed, 17 Jan 2024 20:58:09 +0100 (CET)
Received: by mail-yw1-f169.google.com with SMTP id
 00721157ae682-5e54d40cca2so88747757b3.3
 for <dev@dpdk.org>; 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 <kumaraparamesh92@gmail.com>
Date: Thu, 18 Jan 2024 01:27:57 +0530
Message-ID: <CANxNyaszTnDf4kLBC2xgVtyrtu3aCm8G=nH19ZRUzwerqkx1EQ@mail.gmail.com>
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=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 <kumaraparamesh92@gmail.com>
> ---
> 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

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Thu, Jan 18, 2024 at 1:22=E2=80=AF=
AM Kumara Parameshwaran &lt;<a href=3D"mailto:kumaraparamesh92@gmail.com">k=
umaraparamesh92@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmai=
l_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,20=
4,204);padding-left:1ex"><div>In heavy-weight mode GRO which is based on ti=
mer, the GRO packets will not be<br>
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.<br>
<br>
Signed-off-by: Kumara Parameshwaran &lt;<a href=3D"mailto:kumaraparamesh92@=
gmail.com" target=3D"_blank">kumaraparamesh92@gmail.com</a>&gt;<br>
---<br>
v1:<br>
=C2=A0 =C2=A0 Changes to make sure that the GRO flush API is invoked if the=
re are no packets in <br>
=C2=A0 =C2=A0 current poll and timer expiry.<br>
<br>
=C2=A0app/test-pmd/csumonly.c | 16 ++++++++++++----<br>
=C2=A01 file changed, 12 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c<br>
index c103e54111..42f105ac16 100644<br>
--- a/app/test-pmd/csumonly.c<br>
+++ b/app/test-pmd/csumonly.c<br>
@@ -863,16 +863,24 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 /* receive a burst of packet */<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 nb_rx =3D common_fwd_stream_receive(fs, pkts_bu=
rst, nb_pkt_per_burst);<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0if (unlikely(nb_rx =3D=3D 0))<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0if (unlikely(nb_rx =3D=3D 0)) {<br>
+#ifdef RTE_LIB_GRO<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gro_enable =3D gro_=
ports[fs-&gt;rx_port].enable;<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (unlikely(gro_en=
able &amp;&amp; (gro_flush_cycles !=3D GRO_DEFAULT_FLUSH_CYCLES))) {<br>
+=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;<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} else {<br>
+=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;<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}<br>
+#else<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return false;<br>
+#endif<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0}<br>
<br>
+init:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 rx_bad_ip_csum =3D 0;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 rx_bad_l4_csum =3D 0;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 rx_bad_outer_l4_csum =3D 0;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 rx_bad_outer_ip_csum =3D 0;<br>
-#ifdef RTE_LIB_GRO<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0gro_enable =3D gro_ports[fs-&gt;rx_port].enable=
;<br>
-#endif<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 txp =3D &amp;ports[fs-&gt;tx_port];<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 tx_offloads =3D txp-&gt;dev_conf.txmode.offload=
s;<br>
-- <br>
2.25.1<br></div>&gt;&gt;Please ignore this patch, this has an issue will ra=
ise a new one. <br><div>
<br>
</div></blockquote></div></div>

--0000000000007dea9c060f29aa79--