Skip to contentSkip to conversation

nvme: consider also host_iface when checking ip options

PATCH Applied Daniel Wagner 3 participants 5 messages Jul 21, 2022 – Jul 22, 2022 NVMe

v1 of 3 Applied Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme: consider also host_iface when checking ip options

It's perfectly fine to use the same traddr and trsvcid more than once as long we use different host interface. This is used in setups where the host has more than one interface but the target exposes only one traddr/trsvcid combination.

---
 drivers/nvme/host/fabrics.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/nvme/host/fabrics.c +2 -1
index 604ab0e5a2ad..10ef2e249d88 100644
@@ -944,7 +944,8 @@ bool nvmf_ip_options_match(struct nvme_ctrl *ctrl,
 {
 	if (!nvmf_ctlr_matches_baseopts(ctrl, opts) ||
 	    strcmp(opts->traddr, ctrl->opts->traddr) ||
-	    strcmp(opts->trsvcid, ctrl->opts->trsvcid))
+	    strcmp(opts->trsvcid, ctrl->opts->trsvcid) ||
+	    strcmp(opts->host_iface, ctrl->opts->host_iface))
 		return false;
 
 	/*
Signature · 1 line
2.37.1
#3 lore raw
Quoted 3 lines · Christoph Hellwig

Thanks,

applied to nvme-5.20.

Argh, forgot to test the non host_iface case. We need to test for a null host_iface pointer. Do want a follow up on this patch or do you drop it?

#4 lore raw
Quoted 7 lines · Daniel Wagner
Quoted 3 lines · Christoph Hellwig

Thanks,

applied to nvme-5.20.

Argh, forgot to test the non host_iface case. We need to test for a null host_iface pointer. Do want a follow up on this patch or do you drop it?

Please send an incremental patch that I can fold in.