Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add virtio-net support to Lumper #3

Closed
sameo opened this issue Feb 4, 2024 · 2 comments · Fixed by #11 or #22
Closed

Add virtio-net support to Lumper #3

sameo opened this issue Feb 4, 2024 · 2 comments · Fixed by #11 or #22
Assignees

Comments

@sameo
Copy link
Contributor

sameo commented Feb 4, 2024

No description provided.

@sameo sameo moved this to Todo in Project 2024 Feb 4, 2024
@sylvain-pierrot sylvain-pierrot self-assigned this Feb 20, 2024
@Kuruyia
Copy link
Contributor

Kuruyia commented Mar 3, 2024

See this crate for an already existing implementation of virtio in Rust: https://github.com/rust-vmm/vm-virtio
The virtio-bindings crate might be interesting, as it contains a virtio_net module: https://docs.rs/virtio-bindings/

@Kuruyia
Copy link
Contributor

Kuruyia commented Mar 11, 2024

The three big steps for implementing networking support in Lumper:

  1. Set up a TAP interface on the host. feat(vmm): add tap device creation #11
    For this, there are two possibilities:

    • Either we let Lumper create the TAP interface itself (see cloud-hypervisor), and in that case we get the IP address of that interface from the CLI args (such as --network-host-ip x.x.x.x/x).
    • Or, we get a TAP interface that was already created for us (see rust-vmm/vmm-reference) from the CLI args (such as --network-tap tapX).

    This should leave us with a file descriptor open to read from/write to the TAP interface.
    Note: can we call the TAP interfaces taplets? Like taplet0, taplet1...

  2. Set up the virtio-net device in Lumper. feat(virtio): Adding Virtio-net Support to Cloudlet #22
    Because we don't really need the fancy features such as multi-queues, the control queue... we can directly use the implementation from rust-vmm/vmm-reference (and because it's free, we have support for segmentation and checksum offloads).

    We will be using Virtio over MMIO, so we shall not forget to add the virtio_mmio.device=4K@0x<device_register_address>:<notification_irq> thingy to the kernel cmdline.
    Note: it might be nice, but certainly more work, to explore vhost-net to move the virtio-net data plane outside of Lumper and into the host kernel.

  3. Set up the IP address of the interface inside the VM. feat: configure guest iface address + rename vmm cli args #35
    This one doesn't seem too hard, we can seemingly pass the IP configuration of a network interface right from the kernel cmdline. We'll also need to get the guest IP address from the CLI args (such as --network-guest-ip x.x.x.x/x).

@Kuruyia Kuruyia linked a pull request Mar 31, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from Todo to Done in Project 2024 Apr 4, 2024
@Kuruyia Kuruyia reopened this Apr 4, 2024
@Kuruyia Kuruyia moved this from Done to Todo in Project 2024 Apr 4, 2024
@sylvain-pierrot sylvain-pierrot linked a pull request Apr 21, 2024 that will close this issue
2 tasks
@github-project-automation github-project-automation bot moved this from Todo to Done in Project 2024 Apr 29, 2024
@Kuruyia Kuruyia reopened this Apr 29, 2024
@Kuruyia Kuruyia closed this as completed May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
4 participants