Skip to content

Commit cf8986a

Browse files
mwilckjohannbg
authored andcommitted
feat(nvmf): set rd.neednet=1 if tcp records encountered
This is currently always the case for NBFT records. We can do this now, as we run before parse-ip-options.sh
1 parent 4b69e63 commit cf8986a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

modules.d/95nvmf/parse-nvmf-boot-connections.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ parse_nvmf_discover() {
6262
warn "traddr is mandatory for $trtype"
6363
return 0
6464
fi
65-
if [ "$trtype" = "fc" ]; then
65+
if [ "$trtype" = "tcp" ]; then
66+
: > /tmp/nvmf_needs_network
67+
elif [ "$trtype" = "fc" ]; then
6668
if [ "$traddr" = "auto" ]; then
6769
rm /etc/nvme/discovery.conf
6870
return 1
@@ -71,7 +73,7 @@ parse_nvmf_discover() {
7173
warn "host traddr is mandatory for fc"
7274
return 0
7375
fi
74-
elif [ "$trtype" != "rdma" ] && [ "$trtype" != "tcp" ]; then
76+
elif [ "$trtype" != "rdma" ]; then
7577
warn "unsupported transport $trtype"
7678
return 0
7779
fi
@@ -100,6 +102,11 @@ for d in $(getargs rd.nvmf.discover -d nvmf.discover=); do
100102
}
101103
done
102104

105+
if [ -e /tmp/nvmf_needs_network ]; then
106+
echo "rd.neednet=1" > /etc/cmdline.d/nvmf-neednet.conf
107+
rm -f /tmp/nvmf_needs_network
108+
fi
109+
103110
# Host NQN and host id are mandatory for NVMe-oF
104111
if [ -f "/etc/nvme/hostnqn" ] && [ -f "/etc/nvme/hostid" ]; then
105112

0 commit comments

Comments
 (0)