From d5ce8a0e97073169b5fe0b7c52bd020cdb017dfa Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 22 Jan 2008 21:57:22 -0800 Subject: [PATCH] [IPV4] fib_trie: avoid rescan on dump This converts dumping (and flushing) of large route tables form O(N^2) to O(N). If the route dump took multiple pages then the dump routine gets called again. The old code kept track of location by counter, the new code instead uses the last key. This is a really big win ( 0.3 sec vs 12 sec) for big route tables. One side effect is that if the table changes during the dump, then the last key will not be found, and we will return -EBUSY. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- Reading git-format-patch failed