summaryrefslogtreecommitdiffstats
path: root/rules.d
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2022-10-13 13:49:22 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-10-14 05:18:08 +0200
commit73bf6859cb1b356cc6bb63e624b8be88dc224d49 (patch)
treedf24db1b0005307f36a47b371b56a8c62dacba50 /rules.d
parentMerge pull request #24461 from keszybz/better-unmask-message (diff)
downloadsystemd-73bf6859cb1b356cc6bb63e624b8be88dc224d49.tar.xz
systemd-73bf6859cb1b356cc6bb63e624b8be88dc224d49.zip
udev/rules: add by-path and by-ibdev links to infiniband verbs
The uverbs devices are sequentially numbered and are not guarranteed to stay stable across reboot. At least one good person was disappointed by this, because they couldn't find their device: https://bugzilla.redhat.com/show_bug.cgi?id=2036515 Let's add a few helpful links.
Diffstat (limited to 'rules.d')
-rw-r--r--rules.d/60-infiniband.rules12
1 files changed, 12 insertions, 0 deletions
diff --git a/rules.d/60-infiniband.rules b/rules.d/60-infiniband.rules
new file mode 100644
index 0000000000..da3eea60bc
--- /dev/null
+++ b/rules.d/60-infiniband.rules
@@ -0,0 +1,12 @@
+# do not edit this file, it will be overwritten on update
+
+ACTION=="remove", GOTO="infiniband_end"
+SUBSYSTEM!="infiniband_verbs", GOTO="infiniband_end"
+KERNEL!="uverbs*", GOTO="infiniband_end"
+
+IMPORT{builtin}="path_id"
+
+ENV{ID_PATH}=="?*", SYMLINK+="infiniband/by-path/$env{ID_PATH}"
+ATTR{ibdev}=="?*", SYMLINK+="infiniband/by-ibdev/uverbs-$attr{ibdev}"
+
+LABEL="infiniband_end"