smoltcp-rs / smoltcp

a smol tcp/ip stack
BSD Zero Clause License
3.63k stars 402 forks source link

Proposal: Improve the routing table by radix tree #915

Closed hainesc closed 2 months ago

hainesc commented 2 months ago

I noticed that recently the routing table is a list of CIDR, see https://github.com/smoltcp-rs/smoltcp/blob/main/src/iface/route.rs#L68.

It is simple, but is not that high-performance, I know that the best solution for routing table may be radix tree, it was implemented in may other platforms.

thvdveld commented 2 months ago

I think that it is not necessary yet to have the routing table implementation as a radix tree, as it usually only contains the gateway address.