From: Eric Dumazet <eric.dumazet@gmail.com>
To: Cong Wang <amwang@redhat.com>
Cc: netdev@vger.kernel.org, Patrick McHardy <kaber@trash.net>,
Pablo Neira Ayuso <pablo@netfilter.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net-next v2] net: clean up locking in inet_frag_find()
Date: Mon, 26 Nov 2012 07:12:31 -0800 [thread overview]
Message-ID: <1353942751.30446.1769.camel@edumazet-glaptop> (raw)
In-Reply-To: <1353914786-10426-1-git-send-email-amwang@redhat.com>
On Mon, 2012-11-26 at 15:26 +0800, Cong Wang wrote:
> It is weird to take the read lock outside of inet_frag_find()
> but release it inside... This can be improved by refactoring
> the code, that is, introducing inet{4,6}_frag_find() which call
> the their own hash function, inet{4,6}_hash_frag(), hiding the
> details from their callers.
>
> Cc: Eric Dumazet <eric.dumazet@gmail.com>
> Cc: Patrick McHardy <kaber@trash.net>
> Cc: Pablo Neira Ayuso <pablo@netfilter.org>
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Cong Wang <amwang@redhat.com>
>
> ---
> include/net/inet_frag.h | 17 +++++-
> include/net/ipv6.h | 3 -
> net/ipv4/inet_fragment.c | 82 +++++++++++++++++++++++++++++--
> net/ipv4/ip_fragment.c | 16 +-----
> net/ipv6/netfilter/nf_conntrack_reasm.c | 7 +--
> net/ipv6/reassembly.c | 34 +------------
> 6 files changed, 97 insertions(+), 62 deletions(-)
Not clear to me its a win, as it adds 35 LOC. Nobody really complained
of this locking schem in the past.
Also Jesper is working on this stuff, so you dont really ease its work.
next prev parent reply other threads:[~2012-11-26 15:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-26 5:18 [PATCH net-next] net: clean up locking in inet_frag_find() Cong Wang
2012-11-26 5:43 ` Eric Dumazet
2012-11-26 5:53 ` Cong Wang
2012-11-26 7:26 ` [PATCH net-next v2] " Cong Wang
2012-11-26 13:42 ` Jesper Dangaard Brouer
2012-11-26 15:12 ` Eric Dumazet [this message]
2012-11-27 3:05 ` Cong Wang
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=1353942751.30446.1769.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=amwang@redhat.com \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.org \
/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