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] [thread-next>] [day] [month] [year] [list]
Message-ID: <d9fc5af0-07b5-563e-ff4e-5c6147e38ead@cogentembedded.com>
Date:   Tue, 20 Nov 2018 14:30:07 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org
Cc:     "David S. Miller" <davem@...emloft.net>,
        Willem de Bruijn <willemb@...gle.com>,
        Eric Dumazet <eric.dumazet@...il.com>
Subject: Re: [RFC PATCH] net: don't keep lonely packets forever in the gro
 hash

On 11/20/2018 01:17 PM, Paolo Abeni wrote:

> Eric noted that with UDP GRO and napi timeout, we could keep a single

   NAPI, else you're simply inconsistent.

> UDP packet inside the GRO hash forever, if the related NAPI instance
> calls napi_gro_complete() at an higher frequency than the napi timeout.

   NAPI.

> Willem noted that even TCP packets could be trapped there, till the
> next retransmission.
> This patch tries to address the issue, flushing the oldest packets before
> scheduling the NAPI timeout. The rationale is that such a timeout should be
> well below a jiffy and we are not flushing packets eligible for sane GRO.
> 
> Reported-by: Eric Dumazet <eric.dumazet@...il.com>
> Signed-off-by: Paolo Abeni <pabeni@...hat.com>
> ---
> Sending as RFC, as I fear I'm missing some relevant pieces.
> Also I'm unsure if this should considered a fixes for "udp: implement
> GRO for plain UDP sockets." or for "net: gro: add a per device gro flush timer"
> ---
>  net/core/dev.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 5927f6a7c301..5cc4c4961869 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -5975,11 +5975,14 @@ bool napi_complete_done(struct napi_struct *n, int work_done)
>  		if (work_done)
>  			timeout = n->dev->gro_flush_timeout;
>  
> +		/* When the NAPI instance uses a timeout, we still need to
> +		 * someout bound the time packets are keept in the GRO layer

   Somehow?

> +		 * under heavy traffic
> +		 */
> +		napi_gro_flush(n, !!timeout);
>  		if (timeout)
>  			hrtimer_start(&n->timer, ns_to_ktime(timeout),
>  				      HRTIMER_MODE_REL_PINNED);
> -		else
> -			napi_gro_flush(n, false);
>  	}
>  	if (unlikely(!list_empty(&n->poll_list))) {
>  		/* If n->poll_list is not empty, we need to mask irqs */

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ