Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
62 lines
1.2 KiB
Nix
62 lines
1.2 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.networking.rxe;
|
|
|
|
in
|
|
{
|
|
###### interface
|
|
|
|
options = {
|
|
networking.rxe = {
|
|
enable = mkEnableOption "RDMA over converged ethernet";
|
|
interfaces = mkOption {
|
|
type = types.listOf types.str;
|
|
default = [ ];
|
|
example = [ "eth0" ];
|
|
description = ''
|
|
Enable RDMA on the listed interfaces. The corresponding virtual
|
|
RDMA interfaces will be named rxe_\<interface\>.
|
|
UDP port 4791 must be open on the respective ethernet interfaces.
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
###### implementation
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
systemd.services.rxe = {
|
|
description = "RoCE interfaces";
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
after = [
|
|
"systemd-modules-load.service"
|
|
"network-online.target"
|
|
];
|
|
wants = [
|
|
"network-pre.target"
|
|
"network-online.target"
|
|
];
|
|
|
|
serviceConfig = {
|
|
Type = "oneshot";
|
|
RemainAfterExit = true;
|
|
ExecStart = map (
|
|
x: "${pkgs.iproute2}/bin/rdma link add rxe_${x} type rxe netdev ${x}"
|
|
) cfg.interfaces;
|
|
|
|
ExecStop = map (x: "${pkgs.iproute2}/bin/rdma link delete rxe_${x}") cfg.interfaces;
|
|
};
|
|
};
|
|
};
|
|
}
|