dsv41-mesh.service 851 B

123456789101112131415161718
  1. [Unit]
  2. Description=Hardware-forwarded opposite-node paths for RoCEnante on the ring (routes, tc rules, source markers)
  3. Wants=network-online.target
  4. After=network-online.target NetworkManager-wait-online.service
  5. [Service]
  6. Type=oneshot
  7. RemainAfterExit=yes
  8. TimeoutStartSec=300
  9. # The fabric links can come up a few seconds after network-online.
  10. ExecStartPre=/bin/bash -c 'for i in $(seq 1 60); do ok=1; for n in enp1s0f0np0 enp1s0f1np1 enP2p1s0f0np0 enP2p1s0f1np1; do [ "$(cat /sys/class/net/$n/operstate 2>/dev/null)" = up ] || ok=0; done; [ $ok = 1 ] && exit 0; sleep 2; done; exit 1'
  11. # hairpin_queue_size resets to the driver default at boot; 8192 packets lifts the clean RoCE size to ~480 KB.
  12. ExecStartPre=/opt/dsv41-mesh/hairpin.sh 8192
  13. ExecStart=/opt/dsv41-mesh/mesh-up.sh
  14. ExecStop=/opt/dsv41-mesh/mesh-down.sh
  15. [Install]
  16. WantedBy=multi-user.target