[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1458870680.6473.13.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Thu, 24 Mar 2016 18:51:20 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>,
Wei Wang <weiwan@...gle.com>,
Steffen Klassert <steffen.klassert@...unet.com>,
Martin KaFai Lau <kafai@...com>,
Hannes Frederic Sowa <hannes@...essinduktion.org>,
Julian Anastasov <ja@....bg>
Subject: Re: [RFT Patch net 1/2] ipv6: invalidate the socket cached route on
pmtu events if possible
On Thu, 2016-03-24 at 17:15 -0700, Cong Wang wrote:
> My understanding is that bh_lock_sock() prevents concurrent
> access to sock struct. Since this is in softirq context, multiple
> CPU's could call this function concurrently, the whole pmtu
> update needs to be done atomically.
>
> UDP, on the other hand, doesn't do this logic, it just looks up
> for dst and save it in sk_dst_cache.
Two ICMP messages processed on two different cpus can still get two
different sockets pointing to the same dst.
I do not see how dst pmtu update could be protected by a lock on each
socket. It would require a dst lock , or some simple memory writes that
do not require special synchro.
Powered by blists - more mailing lists