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

Rudimentary support of VPP #290529

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

RaitoBezarius
Copy link
Member

Description of changes

VPP is a packet processing framework building on the top of existing packet processors facilities like DPDK, XDP or similar.

https://s3-docs.fd.io/vpp/23.10/

TODO:

  • Network testing
  • Hugepages emulation in the VM (?)
  • Better support of DPDK
  • Documentation: manual and release notes.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Feb 22, 2024
This is a fairly primitive NixOS module, it does not offer RFC42 because
it can be hard to get right on the first try.

Your deployment on your baremetal system may vary and may require personal overrides.
It offers simple defaults for the hugepages setup and kernel modules stuff.

If you want a better NixOS module, please chime in with usecases.

Signed-off-by: Raito Bezarius <[email protected]>
This is a very simple NixOS test to assert the fact that the VPP socket
is receiving commands as intended and works more or less.

In the future, this should properly be extended to real test exchanging packets
between a non-VPP system and a VPP system.

Signed-off-by: Raito Bezarius <[email protected]>
Copy link

@pimvanpelt pimvanpelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super cool :) Just some thoughts on kernel module and libnl version, and one nit regarding a redundant test.

serviceConfig = {
ExecStartPre = [
"-${pkgs.coreutils}/bin/rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api"
"-/run/current-system/sw/bin/modprobe uio_pci_generic"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

be aware that many deployments will use vfio_pci kernel module instead of uio_pci_generic.
Perhaps load them both?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, will do

node.wait_for_unit("multi-user.target")
node.wait_for_unit("vpp.service")
node.succeed("vppctl show version | grep -i nixos")
node.succeed("vppctl show interface | grep -i local0")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since local0 always exists, this test will never fail.
If VPP is not up, the test on line 35 fails.
I think this line is redundant.

rdma-core
mbedtls_2
check
libnl

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the version of libnl? The Linux Control Plane wants >=3.7.0 for certain operations (like inter-family nexthop, and all MPLS).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.7.0, we usually have latest released versions, but I can hard assert on the libnl version to offer warnings to users.

@h7x4 h7x4 added 8.has: module (new) This PR adds a module in `nixos/` 8.has: tests This PR has tests labels Jun 1, 2024
@benaryorg
Copy link
Contributor

benaryorg commented Jul 26, 2024

I don't see #256601 mentioned anywhere here, which is a PR for the same package/module which seems to have stalled. It seems there is a small number of people who still do want to see this land, at the very least the package (leaving potential users to write their own opinionated service until an unopinionated one hits in upstream). So considering that this PR here is the one that has seen the more recent update and is ahead in the version, would it be possible to get the package part of this factored out (in an up-to-date version if possible) into a separate PR so that at least users have a package to work with until a module (and corresponding tests) hit? As the latter seem to be the parts that attract more review, the package would probably get merged earlier and allow people to get started in the mean time.

@romner-set
Copy link
Contributor

@RaitoBezarius are you still working on this? If not, I might try picking it up.

@RaitoBezarius
Copy link
Member Author

Feel free to pick up this. :)

@romner-set romner-set mentioned this pull request Oct 4, 2024
13 tasks
@romner-set
Copy link
Contributor

Not sure if PR mentions send notifications, so in case anyone's subscribed to this but didn't get one, feel free to check out my PRs. A review or sharing any thoughts would be much appreciated.

#346281 #347797

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: merge conflict This PR has merge conflicts with the target branch 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (new) This PR adds a module in `nixos/` 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 8.has: tests This PR has tests 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants