From: Eric Dumazet <eric.dumazet@gmail.com>
To: Eric Dumazet <edumazet@google.com>,
"David S . Miller" <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>, Florian Westphal <fw@strlen.de>,
Herbert Xu <herbert@gondor.apana.org.au>,
Thomas Graf <tgraf@suug.ch>,
Jesper Dangaard Brouer <brouer@redhat.com>,
Alexander Aring <alex.aring@gmail.com>,
Stefan Schmidt <stefan@osg.samsung.com>,
Kirill Tkhai <ktkhai@virtuozzo.com>,
Nikolay Aleksandrov <nikolay@redhat.com>
Subject: Re: [PATCH v2 net-next 08/12] inet: frags: use rhashtables for reassembly units
Date: Fri, 30 Mar 2018 15:43:55 -0700 [thread overview]
Message-ID: <cf37cf36-adca-3a1d-ff62-983d232f8bd1@gmail.com> (raw)
In-Reply-To: <20180330204236.43675-9-edumazet@google.com>
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() :/
next prev parent reply other threads:[~2018-03-30 22:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-30 20:42 [PATCH v2 net-next 00/12] inet: frags: bring rhashtables to IP defrag Eric Dumazet
2018-03-30 20:42 ` [PATCH v2 net-next 01/12] ipv6: frag: remove unused field Eric Dumazet
2018-03-30 20:42 ` [PATCH v2 net-next 02/12] inet: frags: change inet_frags_init_net() return value Eric Dumazet
2018-03-30 20:42 ` [PATCH v2 net-next 03/12] inet: frags: add a pointer to struct netns_frags Eric Dumazet
2018-03-30 20:42 ` [PATCH v2 net-next 04/12] inet: frags: refactor ipv6_frag_init() Eric Dumazet
2018-03-30 20:42 ` [PATCH v2 net-next 05/12] inet: frags: refactor lowpan_net_frag_init() Eric Dumazet
2018-03-30 20:42 ` [PATCH v2 net-next 06/12] inet: frags: refactor ipfrag_init() Eric Dumazet
2018-03-30 20:42 ` [PATCH v2 net-next 07/12] rhashtable: add schedule points Eric Dumazet
2018-03-31 4:19 ` Herbert Xu
2018-03-30 20:42 ` [PATCH v2 net-next 08/12] inet: frags: use rhashtables for reassembly units Eric Dumazet
2018-03-30 22:43 ` Eric Dumazet [this message]
2018-03-30 22:44 ` Kirill Tkhai
2018-03-30 22:54 ` Eric Dumazet
2018-03-30 20:42 ` [PATCH v2 net-next 09/12] inet: frags: remove some helpers Eric Dumazet
2018-03-30 20:42 ` [PATCH v2 net-next 10/12] inet: frags: get rif of inet_frag_evicting() Eric Dumazet
2018-03-30 20:42 ` [PATCH v2 net-next 11/12] inet: frags: remove inet_frag_maybe_warn_overflow() Eric Dumazet
2018-03-30 20:42 ` [PATCH v2 net-next 12/12] inet: frags: break the 2GB limit for frags storage Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cf37cf36-adca-3a1d-ff62-983d232f8bd1@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=alex.aring@gmail.com \
--cc=brouer@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=herbert@gondor.apana.org.au \
--cc=ktkhai@virtuozzo.com \
--cc=netdev@vger.kernel.org \
--cc=nikolay@redhat.com \
--cc=stefan@osg.samsung.com \
--cc=tgraf@suug.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).