1 import ./make-test-python.nix ({ ... } :
4 node = { pkgs, ... } : {
7 allowedUDPPorts = [ 4791 ]; # open RoCE port
8 allowedTCPPorts = [ 4800 ]; # port for test utils
12 interfaces = [ "eth1" ];
16 environment.systemPackages = with pkgs; [ rdma-core screen ];
28 # Test if rxe interface comes up
29 server.wait_for_unit("default.target")
30 server.succeed("systemctl status rxe.service")
31 server.succeed("ibv_devices | grep rxe_eth1")
33 client.wait_for_unit("default.target")
36 for proto in "rc", "uc", "ud", "srq":
38 "screen -dmS {0}_pingpong ibv_{0}_pingpong -p 4800 -s 1024 -g0".format(proto)
40 client.succeed("sleep 2; ibv_{}_pingpong -p 4800 -s 1024 -g0 server".format(proto))
42 server.succeed("screen -dmS rping rping -s -a server -C 10")
43 client.succeed("sleep 2; rping -c -a server -C 10")