[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1353942751.30446.1769.camel@edumazet-glaptop>
Date: Mon, 26 Nov 2012 07:12:31 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Cong Wang <amwang@...hat.com>
Cc: netdev@...r.kernel.org, Patrick McHardy <kaber@...sh.net>,
Pablo Neira Ayuso <pablo@...filter.org>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH net-next v2] net: clean up locking in inet_frag_find()
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@...il.com>
> Cc: Patrick McHardy <kaber@...sh.net>
> Cc: Pablo Neira Ayuso <pablo@...filter.org>
> Cc: David S. Miller <davem@...emloft.net>
> Signed-off-by: Cong Wang <amwang@...hat.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists