Commit d6177ca
authored
Cache routes received from
This PR inserts a caching layer in front of `next_hop` to store routes
for a given `(IpAddr6, L4Hash)` for around 100ms, and reorganises
routing-related code into `xde::route`. This is a necessary step as
today we spend around 21% of `xde_mc_tx` in route lookup on a
per-outbound-packet basis. As a consequence, we need install a new
`Periodic` to flush expired entries every 1s, as otherwise we can have a
large amountof detritus pileup from different L4Hash values.
Currently this is implemented as a per-port cache rather than shared
across the driver -- I've done this because it will give us better
sharding of concurrent readers/writers at higher port/guest counts. The
PR as-is pulls us up from ~1.74Gbps to 2Gbps on a single link between
sn9/14.next_hop (#499)1 parent cf268a6 commit d6177ca
6 files changed
Lines changed: 743 additions & 389 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
472 | | - | |
| 472 | + | |
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
| |||
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
557 | | - | |
| 557 | + | |
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
| |||
3945 | 3945 | | |
3946 | 3946 | | |
3947 | 3947 | | |
3948 | | - | |
| 3948 | + | |
3949 | 3949 | | |
3950 | 3950 | | |
3951 | 3951 | | |
| |||
3962 | 3962 | | |
3963 | 3963 | | |
3964 | 3964 | | |
3965 | | - | |
| 3965 | + | |
3966 | 3966 | | |
3967 | 3967 | | |
3968 | 3968 | | |
| |||
3976 | 3976 | | |
3977 | 3977 | | |
3978 | 3978 | | |
3979 | | - | |
| 3979 | + | |
3980 | 3980 | | |
3981 | 3981 | | |
3982 | 3982 | | |
| |||
4024 | 4024 | | |
4025 | 4025 | | |
4026 | 4026 | | |
4027 | | - | |
| 4027 | + | |
4028 | 4028 | | |
4029 | 4029 | | |
4030 | 4030 | | |
4031 | | - | |
| 4031 | + | |
4032 | 4032 | | |
4033 | 4033 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
837 | | - | |
| 837 | + | |
838 | 838 | | |
839 | 839 | | |
840 | 840 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
0 commit comments