Skip to content
Snippets Groups Projects
Commit a52ca62c authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller
Browse files

ipv4: Drop suffix update from resize code


It has been reported that update_suffix can be expensive when it is called
on a large node in which most of the suffix lengths are the same.  The time
required to add 200K entries had increased from around 3 seconds to almost
49 seconds.

In order to address this we need to move the code for updating the suffix
out of resize and instead just have it handled in the cases where we are
pushing a node that increases the suffix length, or will decrease the
suffix length.

Fixes: 5405afd1 ("fib_trie: Add tracking value for suffix length")
Reported-by: default avatarRobert Shearman <rshearma@brocade.com>
Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Reviewed-by: default avatarRobert Shearman <rshearma@brocade.com>
Tested-by: default avatarRobert Shearman <rshearma@brocade.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1a239173
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment