oxidecomputer/opte

Add per-ULP port allocations for `SNat`/`SNat6`

Closed this issue · 0 comments

Talking with Luqman, he raised the point that we could probably place ICMP traffic into a separate SNat pool. Since dendrite maps SNAT'd traffic back to an internal address using only the dest port range, we realised that this can be extended to each ULP to offer more port allocations.

This does require extra space for each free-list, but should be a net benefit. I expect we would modify SNat/SNat6 to each have a NatPool for TCP, UDP, and ICMP. I don't know if we also want to use this as an opportunity to move the Arc<NatPool<_>> handle into NatPoolEntry to make it easier to automatically return ports to the correct pool.