lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAL+tcoDS7UgZBqVO_TqKwftMzA+BA9kDG64KRDnDJ9B_-y5sTw@mail.gmail.com>
Date:   Wed, 27 Oct 2021 21:59:51 +0800
From:   Jason Xing <kerneljasonxing@...il.com>
To:     David Miller <davem@...emloft.net>, kuba@...nel.org,
        ast@...nel.org, daniel@...earbox.net, hawk@...nel.org,
        john.fastabend@...il.com, andrii@...nel.org, kafai@...com,
        songliubraving@...com, yhs@...com, kpsingh@...nel.org,
        Eric Dumazet <edumazet@...gle.com>, atenart@...nel.org,
        alobakin@...me, Wei Wang <weiwan@...gle.com>, bjorn@...nel.org,
        arnd@...db.de, memxor@...il.com
Cc:     netdev <netdev@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>, bpf@...r.kernel.org,
        Jason Xing <xingwanli@...ishou.com>
Subject: Re: [PATCH net] net: gro: flush the real oldest skb

This patch has some problems. I got wrong with the @skb->list. Please ignore it.

Thanks,
Jason

On Wed, Oct 27, 2021 at 4:50 PM <kerneljasonxing@...il.com> wrote:
>
> From: Jason Xing <xingwanli@...ishou.com>
>
> Prior to this patch, when the count of skbs of one flow is larger than
> MAX_GRO_SKBS, gro_flush_oldest() flushes the tail of the list. However,
> as we can see in the merge part of skb_gro_receive(), the tail of the
> list is the newest, head oldest.
>
> Here, we need to fetch the real oldest one and then process it to lower
> the latency.
>
> Fix: 07d78363dc ("net: Convert NAPI gro list into a small hash table.")
> Signed-off-by: Jason Xing <xingwanli@...ishou.com>
> ---
>  net/core/dev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 7ee9fec..d52ebdb 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -6012,7 +6012,7 @@ static void gro_flush_oldest(struct napi_struct *napi, struct list_head *head)
>  {
>         struct sk_buff *oldest;
>
> -       oldest = list_last_entry(head, struct sk_buff, list);
> +       oldest = list_first_entry(head, struct sk_buff, list);
>
>         /* We are called with head length >= MAX_GRO_SKBS, so this is
>          * impossible.
> --
> 1.8.3.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ