On Fri, 06 Jan 2017 22:10:42 -0500 (EST)
David Miller wrote:
> BTW Eric, you asked about kmalloc() allocation, you were CC:'d in the
> patch which did this :-)
>
> commit 9a99d4a50cb8ce516adf0f2436138d4c8e6e4535
> Author: Cong Wang
> Date: Sun Jun 2 15:00:52 2013 +
>
> icmp: avoid al
On Fri, 06 Jan 2017 14:08:06 -0800
Eric Dumazet wrote:
> On Fri, 2017-01-06 at 11:40 -0800, Eric Dumazet wrote:
> > On Fri, 2017-01-06 at 18:39 +0100, Jesper Dangaard Brouer wrote:
> >
> >
> > > @@ -648,13 +668,17 @@ void icmp_send(struct sk_buff *skb_in, int type,
> > > int code, __be32 inf
From: Eric Dumazet
Date: Fri, 06 Jan 2017 14:08:06 -0800
> On Fri, 2017-01-06 at 11:40 -0800, Eric Dumazet wrote:
>> On Fri, 2017-01-06 at 18:39 +0100, Jesper Dangaard Brouer wrote:
>>
>>
>> > @@ -648,13 +668,17 @@ void icmp_send(struct sk_buff *skb_in, int type, int
>> > code, __be32 info)
>>
On Fri, 2017-01-06 at 11:40 -0800, Eric Dumazet wrote:
> On Fri, 2017-01-06 at 18:39 +0100, Jesper Dangaard Brouer wrote:
>
>
> > @@ -648,13 +668,17 @@ void icmp_send(struct sk_buff *skb_in, int type, int
> > code, __be32 info)
> > }
> > }
> >
> > - icmp_param = kmalloc(sizeo
On Fri, 2017-01-06 at 18:39 +0100, Jesper Dangaard Brouer wrote:
> @@ -648,13 +668,17 @@ void icmp_send(struct sk_buff *skb_in, int type, int
> code, __be32 info)
> }
> }
>
> - icmp_param = kmalloc(sizeof(*icmp_param), GFP_ATOMIC);
> - if (!icmp_param)
> -
This patch split the global and per (inet)peer ICMP-reply limiter
code, and moves the global limit check to earlier in the packet
processing path. Thus, avoid spending cycles on ICMP replies that
gets limited/suppressed anyhow.
The global ICMP rate limiter icmp_global_allow() is a good solution,