diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-05-13 20:13:24 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-05-18 08:40:55 +0000 |
commit | 64ad908eb80c9b494454f0e4ac06e691a89fdb22 (patch) | |
tree | ea090c079936d8f709064d3de3897dcb3dc8d4a7 /pkgs/os-specific/linux/chromium-os/crosvm/VIRTIO_NET_F_MAC.patch | |
parent | 5ebae3db48bfb2157bbbd36cad8b4dc6db96f148 (diff) | |
download | nixpkgs-64ad908eb80c9b494454f0e4ac06e691a89fdb22.tar nixpkgs-64ad908eb80c9b494454f0e4ac06e691a89fdb22.tar.gz nixpkgs-64ad908eb80c9b494454f0e4ac06e691a89fdb22.tar.bz2 nixpkgs-64ad908eb80c9b494454f0e4ac06e691a89fdb22.tar.lz nixpkgs-64ad908eb80c9b494454f0e4ac06e691a89fdb22.tar.xz nixpkgs-64ad908eb80c9b494454f0e4ac06e691a89fdb22.tar.zst nixpkgs-64ad908eb80c9b494454f0e4ac06e691a89fdb22.zip |
spectrumPackages: use link-local router addresses
There's no need for every interface on a router to have it's own unique IP. Using link-local addresses, we can assign every interface on a single router the same IP, and save the effort of adding/subtracting one all the time to infer the address of one side of a link from the other. This means that routers and clients are both only interested in what the IP of the client should be, since that's the only thing that is different between different links. So we change our MAC format to communicate the client IP to both sides. If we just made the whole NIC portion of the MAC the last three octets of an IP address like we did before, then both ends of the link would have the same MAC, so we still need to set a bit to encode whether a MAC is at the router side of the link or the client side. I've decided to simplify the implementation by using the most significant bit of the NIC part for that, and just declaring the rest of that octet to be reserved. This way, no calculation is required in the guests -- they just need to look at the last two octets. And we can still identify 65536 links in this scheme, which should be enough for anybody, right? Message-Id: <20210513201323.2087344-1-hi@alyssa.is> Reviewed-by: Cole Helbling <cole.e.helbling@outlook.com>
Diffstat (limited to 'pkgs/os-specific/linux/chromium-os/crosvm/VIRTIO_NET_F_MAC.patch')
0 files changed, 0 insertions, 0 deletions