Thread (23 messages) 23 messages, 6 authors, 2021-05-12

Re: [PATCH 1/1] Add 'Transport Interface' (triface) option. This can be used to specify the IP interface to use for the connection. The driver uses that to set SO_BINDTODEVICE on the socket before connecting.

From: Hannes Reinecke <hare@suse.de>
Date: 2021-05-05 08:48:08

On 5/4/21 9:56 PM, Sagi Grimberg wrote:
quoted
From: Martin Belanger <redacted>
Change log is missing...
quoted
---
  drivers/nvme/host/core.c    |  5 +++++
  drivers/nvme/host/fabrics.c | 14 +++++++++++++
  drivers/nvme/host/fabrics.h |  6 +++++-
  drivers/nvme/host/tcp.c     | 41 ++++++++++++++++++++++++++++++++++---
  4 files changed, 62 insertions(+), 4 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 288ac47ff5b4..91ae11a1ae26 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3961,6 +3961,11 @@ static int nvme_class_uevent(struct device
*dev, struct kobj_uevent_env *env)
            ret = add_uevent_var(env, "NVME_HOST_TRADDR=%s",
                  opts->host_traddr ?: "none");
+        if (ret)
+            return ret;
+
+        ret = add_uevent_var(env, "NVME_HOST_TRIFACE=%s",
+                opts->host_triface ?: "none");
Given that this was the original intent for host_traddr, why not have
host_traddr resolve the iface from the address and set sockopt
SO_BINDTODEVICE on it?
That was my question, too.

I would vastly prefer to not have another option to deal with
(as it raises the question whether to add it eg during
'nvme connect-all')
And one could argue that this was the intention of _having_ the
host_traddr argument in the first place ...

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		        Kernel Storage Architect
hare@suse.de			               +49 911 74053 688
SUSE Software Solutions Germany GmbH, 90409 Nürnberg
GF: F. Imendörffer, HRB 36809 (AG Nürnberg)

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help