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: <cf37cf36-adca-3a1d-ff62-983d232f8bd1@gmail.com>
Date:   Fri, 30 Mar 2018 15:43:55 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Eric Dumazet <edumazet@...gle.com>,
        "David S . Miller" <davem@...emloft.net>
Cc:     netdev <netdev@...r.kernel.org>, Florian Westphal <fw@...len.de>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        Thomas Graf <tgraf@...g.ch>,
        Jesper Dangaard Brouer <brouer@...hat.com>,
        Alexander Aring <alex.aring@...il.com>,
        Stefan Schmidt <stefan@....samsung.com>,
        Kirill Tkhai <ktkhai@...tuozzo.com>,
        Nikolay Aleksandrov <nikolay@...hat.com>
Subject: Re: [PATCH v2 net-next 08/12] inet: frags: use rhashtables for
 reassembly units



On 03/30/2018 01:42 PM, Eric Dumazet wrote:
> Some applications still rely on IP fragmentation, and to be fair linux
> reassembly unit is not working under any serious load.

...

> -
>  static struct inet_frag_queue *inet_frag_alloc(struct netns_frags *nf,
>  					       struct inet_frags *f,
>  					       void *arg)
>  {
>  	struct inet_frag_queue *q;
>  
> -	if (!nf->high_thresh || frag_mem_limit(nf) > nf->high_thresh) {
> -		inet_frag_schedule_worker(f);
> +	if (!nf->high_thresh || frag_mem_limit(nf) > nf->high_thresh)
>  		return NULL;
> -	}
>  
>  	q = kmem_cache_zalloc(f->frags_cachep, GFP_ATOMIC);
>  	if (!q)
> @@ -374,59 +167,53 @@ static struct inet_frag_queue *inet_frag_alloc(struct netns_frags *nf,
>  
>  	timer_setup(&q->timer, f->frag_expire, 0);
>  	spin_lock_init(&q->lock);
> -	refcount_set(&q->refcnt, 1);
> +	refcount_set(&q->refcnt, 3);
>  
>  	return q;
>  }
>  
>  static struct inet_frag_queue *inet_frag_create(struct netns_frags *nf,
> -						struct inet_frags *f,
>  						void *arg)
>  {
> +	struct inet_frags *f = nf->f;
>  	struct inet_frag_queue *q;
> +	int err;
>  
>  	q = inet_frag_alloc(nf, f, arg);
>  	if (!q)
>  		return NULL;
>  
> -	return inet_frag_intern(nf, q, f, arg);
> +	mod_timer(&q->timer, jiffies + nf->timeout);
> +
> +	err = rhashtable_insert_fast(&nf->rhashtable, &q->node,
> +				     f->rhash_params);
> +	add_frag_mem_limit(nf, f->qsize);

When adding back inet_frag_alloc() to address Kirill feedback,
it looks like I forgot to remove this add_frag_mem_limit() :/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ