ba9c021
# We list all the various kernel modules that drive hardware in the
ba9c021
# InfiniBand stack (and a few in the network stack that might not actually
ba9c021
# be RDMA capable, but we don't know that at this time and it's safe to
ba9c021
# enable the IB stack, so do so unilaterally) and on load of any of that
ba9c021
# hardware, we trigger the rdma.service load in systemd
ba9c021
b5e6e42
SUBSYSTEM=="module", KERNEL=="cxgb*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"
b5e6e42
SUBSYSTEM=="module", KERNEL=="ib_*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"
b5e6e42
SUBSYSTEM=="module", KERNEL=="mlx*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"
b5e6e42
SUBSYSTEM=="module", KERNEL=="iw_*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"
1cfb1e8
SUBSYSTEM=="module", KERNEL=="be2net", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"
2641c6e
SUBSYSTEM=="module", KERNEL=="usnic*", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"
b5e6e42
b5e6e42
# When we detect a new verbs device is added to the system, set the node
b5e6e42
# description on that device
ccf0ca5
# If rdma-ndd is installed, defer the setting of the node description to it.
ccf0ca5
SUBSYSTEM=="infiniband", KERNEL=="*", ACTION=="add", TEST!="/usr/sbin/rdma-ndd", RUN+="/bin/bash -c 'sleep 1; echo -n `hostname -s` %k > /sys/class/infiniband/%k/node_desc'"
b5e6e42