forked from mirrors/nixpkgs
Merge pull request #81277 from markuskowa/upd-rdma-core
nixos/rdma-core: 27.0 -> 28.0, update RXE module
This commit is contained in:
commit
a9d7a1ee5b
|
@ -5,20 +5,6 @@ with lib;
|
||||||
let
|
let
|
||||||
cfg = config.networking.rxe;
|
cfg = config.networking.rxe;
|
||||||
|
|
||||||
runRxeCmd = cmd: ifcs:
|
|
||||||
concatStrings ( map (x: "${pkgs.rdma-core}/bin/rxe_cfg -n ${cmd} ${x};") ifcs);
|
|
||||||
|
|
||||||
startScript = pkgs.writeShellScriptBin "rxe-start" ''
|
|
||||||
${pkgs.rdma-core}/bin/rxe_cfg -n start
|
|
||||||
${runRxeCmd "add" cfg.interfaces}
|
|
||||||
${pkgs.rdma-core}/bin/rxe_cfg
|
|
||||||
'';
|
|
||||||
|
|
||||||
stopScript = pkgs.writeShellScriptBin "rxe-stop" ''
|
|
||||||
${runRxeCmd "remove" cfg.interfaces }
|
|
||||||
${pkgs.rdma-core}/bin/rxe_cfg -n stop
|
|
||||||
'';
|
|
||||||
|
|
||||||
in {
|
in {
|
||||||
###### interface
|
###### interface
|
||||||
|
|
||||||
|
@ -31,9 +17,8 @@ in {
|
||||||
example = [ "eth0" ];
|
example = [ "eth0" ];
|
||||||
description = ''
|
description = ''
|
||||||
Enable RDMA on the listed interfaces. The corresponding virtual
|
Enable RDMA on the listed interfaces. The corresponding virtual
|
||||||
RDMA interfaces will be named rxe0 ... rxeN where the ordering
|
RDMA interfaces will be named rxe_<interface>.
|
||||||
will be as they are named in the list. UDP port 4791 must be
|
UDP port 4791 must be open on the respective ethernet interfaces.
|
||||||
open on the respective ethernet interfaces.
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -44,7 +29,6 @@ in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
systemd.services.rxe = {
|
systemd.services.rxe = {
|
||||||
path = with pkgs; [ kmod rdma-core ];
|
|
||||||
description = "RoCE interfaces";
|
description = "RoCE interfaces";
|
||||||
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
@ -54,8 +38,13 @@ in {
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
ExecStart = "${startScript}/bin/rxe-start";
|
ExecStart = map ( x:
|
||||||
ExecStop = "${stopScript}/bin/rxe-stop";
|
"${pkgs.iproute}/bin/rdma link add rxe_${x} type rxe netdev ${x}"
|
||||||
|
) cfg.interfaces;
|
||||||
|
|
||||||
|
ExecStop = map ( x:
|
||||||
|
"${pkgs.iproute}/bin/rdma link delete rxe_${x}"
|
||||||
|
) cfg.interfaces;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -28,7 +28,7 @@ in {
|
||||||
# Test if rxe interface comes up
|
# Test if rxe interface comes up
|
||||||
server.wait_for_unit("default.target")
|
server.wait_for_unit("default.target")
|
||||||
server.succeed("systemctl status rxe.service")
|
server.succeed("systemctl status rxe.service")
|
||||||
server.succeed("ibv_devices | grep rxe0")
|
server.succeed("ibv_devices | grep rxe_eth1")
|
||||||
|
|
||||||
client.wait_for_unit("default.target")
|
client.wait_for_unit("default.target")
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ fetchurl, stdenv, flex, bash, bison, db, iptables, pkgconfig, libelf }:
|
{ fetchurl, stdenv, flex, bash, bison, db, iptables, pkgconfig, libelf, libmnl }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "iproute2";
|
pname = "iproute2";
|
||||||
|
@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
|
||||||
"CONFDIR=$(out)/etc/iproute2"
|
"CONFDIR=$(out)/etc/iproute2"
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [ db iptables libelf ];
|
buildInputs = [ db iptables libelf libmnl ];
|
||||||
nativeBuildInputs = [ bison flex pkgconfig ];
|
nativeBuildInputs = [ bison flex pkgconfig ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
} :
|
} :
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "27.0";
|
version = "28.0";
|
||||||
|
|
||||||
in stdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
pname = "rdma-core";
|
pname = "rdma-core";
|
||||||
|
@ -14,7 +14,7 @@ in stdenv.mkDerivation {
|
||||||
owner = "linux-rdma";
|
owner = "linux-rdma";
|
||||||
repo = "rdma-core";
|
repo = "rdma-core";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "04mhcrcmbwxcjhswlkhnr6m5nl2389jgjv6aqhd4v0x555cwnfvw";
|
sha256 = "0az2is6p5gkyphi2b978kwn7knry60y33kn6p7cxz49ca79a42cy";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkgconfig pandoc docutils makeWrapper ];
|
nativeBuildInputs = [ cmake pkgconfig pandoc docutils makeWrapper ];
|
||||||
|
@ -26,11 +26,6 @@ in stdenv.mkDerivation {
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace providers/rxe/rxe_cfg.in \
|
|
||||||
--replace ethtool "${ethtool}/bin/ethtool" \
|
|
||||||
--replace 'ip addr' "${iproute}/bin/ip addr" \
|
|
||||||
--replace 'ip link' "${iproute}/bin/ip link"
|
|
||||||
|
|
||||||
substituteInPlace srp_daemon/srp_daemon.sh.in \
|
substituteInPlace srp_daemon/srp_daemon.sh.in \
|
||||||
--replace /bin/rm rm
|
--replace /bin/rm rm
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue