[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1483983863.5846.5.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Mon, 09 Jan 2017 09:44:23 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Jesper Dangaard Brouer <brouer@...hat.com>
Cc: netdev@...r.kernel.org, xiyou.wangcong@...il.com
Subject: Re: [net-next PATCH 3/3] net: for rate-limited ICMP replies save
one atomic operation
On Mon, 2017-01-09 at 16:04 +0100, Jesper Dangaard Brouer wrote:
> It is possible to avoid the atomic operation in icmp{v6,}_xmit_lock,
> by checking the sysctl_icmp_msgs_per_sec ratelimit before these calls,
> as pointed out by Eric Dumazet, but the BH disabled state must be correct.
>
> The icmp_global_allow() call states it must be called with BH
> disabled. This protection was given by the calls icmp_xmit_lock and
> icmpv6_xmit_lock. Thus, split out local_bh_disable/enable from these
> functions and maintain it explicitly at callers.
>
> Suggested-by: Eric Dumazet <eric.dumazet@...il.com>
> Signed-off-by: Jesper Dangaard Brouer <brouer@...hat.com>
> ---
Acked-by: Eric Dumazet <edumazet@...gle.com>
Powered by blists - more mailing lists