From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] ipv4: Call fib_select_default() only when actually necessary.
Date: Thu, 14 Apr 2011 23:59:17 +0200 [thread overview]
Message-ID: <1302818357.2744.47.camel@edumazet-laptop> (raw)
In-Reply-To: <20110414.145035.189701333.davem@davemloft.net>
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@davemloft.net>
> ---
Excellent :)
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
next prev parent reply other threads:[~2011-04-14 21:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-14 21:50 [PATCH] ipv4: Call fib_select_default() only when actually necessary David Miller
2011-04-14 21:59 ` Eric Dumazet [this message]
2011-04-14 22:05 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1302818357.2744.47.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox