8

As I understand, routing cache was removed since Linux kernel 3.6. In systems with older Linux kernel one could view the content of the routing cache with ip route show cache command and routing cache was consulted before the routing tables. However, what is the status of routing cache in latest Linux kernels? Was it simply removed and all the packets go through the routing tables? Is there some sort of (similar) replacement system?

1 Answer 1

6
+50

From what I read in LinuxFR article (french)

This cache was suffering bad performance bottleneck relatively to today's latency needs and security problems where sometimes vulnerabilities allowed attackers to poison this cache. Also it's average hit rate was <10%.

There is now a small per-entry cache, but only for additionnal informations (TCP stats, PTMU,...)

Here's the developper's mail recap after 3.6 release

Another comment relative to the performance of the cache : LWN.net

3
  • 6
    Is there a way to view the content of this per-entry cache? And am I correct that after removing the routing cache each incoming and outgoing IPv4/IPv6 packet is checked directly against routing tables(local, main, etc)? Commented Jun 11, 2015 at 14:45
  • 1
    I doubt that there is a way to lookup this cache other than dev tools and analyzing kernel dumps. I also highly doubt it would be meaningful for any other purpose than developping this part of the kernel. For the "how" it now works, I suppose it does indeed check directly against the routing tables although the underlying mechanisms seems a bit more complex. See git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit/… Commented Jun 12, 2015 at 7:34
  • From the previous link, it suggests to use the net_test_tools kernel modules such as kbench_mod.so and then the perf tools Commented Jun 12, 2015 at 7:44

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.