[PATCH] nvme: add missing MODULE_ALIAS for fabrics transports
Geliang Tang
geliang at kernel.org
Tue Mar 31 01:17:31 PDT 2026
From: Geliang Tang <tanggeliang at kylinos.cn>
The generic fabrics layer uses request_module("nvme-%s", opts->transport)
to auto-load transport modules. Currently, the nvme-tcp, nvme-rdma, and
nvme-fc modules lack MODULE_ALIAS entries for these names, which prevents
the kernel from automatically finding and loading them when requested.
Signed-off-by: Geliang Tang <tanggeliang at kylinos.cn>
---
Hi,
Recently, I've been working on adding MPTCP support for NVMe over TCP, so
I added a new transport called "nvme-mptcp". The AI review in [1] reminded
me that I should add MODULE_ALIAS("nvme-mptcp"). Then I checked the other
transports and found that they were all missing the MODULE_ALIAS as well.
I felt it was necessary to add them, so I sent this patch.
Thanks,
-Geliang
[1]
https://sashiko.dev/#/patchset/cover.1774862875.git.tanggeliang@kylinos.cn
---
drivers/nvme/host/fc.c | 1 +
drivers/nvme/host/rdma.c | 1 +
drivers/nvme/host/tcp.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index e1bb4707183c..e4f4528fe2a2 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -3968,3 +3968,4 @@ module_exit(nvme_fc_exit_module);
MODULE_DESCRIPTION("NVMe host FC transport driver");
MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("nvme-fc");
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 57111139e84f..1ec6e867aedb 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -2432,3 +2432,4 @@ module_exit(nvme_rdma_cleanup_module);
MODULE_DESCRIPTION("NVMe host RDMA transport driver");
MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("nvme-rdma");
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 243dab830dc8..02c95c32b07e 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -3071,3 +3071,4 @@ module_exit(nvme_tcp_cleanup_module);
MODULE_DESCRIPTION("NVMe host TCP transport driver");
MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("nvme-tcp");
--
2.51.0
More information about the Linux-nvme
mailing list