[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1302818357.2744.47.camel@edumazet-laptop>
Date: Thu, 14 Apr 2011 23:59:17 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] ipv4: Call fib_select_default() only when actually
necessary.
Le jeudi 14 avril 2011 à 14:50 -0700, David Miller a écrit :
> fib_select_default() is a complete NOP, and completely pointless
> to invoke, when we have no more than 1 default route installed.
>
> And this is far and away the common case.
>
> So remember how many prefixlen==0 routes we have in the routing
> table, and elide the call when we have no more than one of those.
>
> This cuts output route creation time by 157 cycles on Niagara2+.
>
> In order to add the new int to fib_table, we have to correct the type
> of ->tb_data[] to unsigned long, otherwise the private area will be
> unaligned on 64-bit systems.
>
> Signed-off-by: David S. Miller <davem@...emloft.net>
> ---
Excellent :)
Reviewed-by: Eric Dumazet <eric.dumazet@...il.com>
--
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