[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.
Sagi Grimberg
sagi at grimberg.me
Tue May 4 20:56:51 BST 2021
> From: Martin Belanger <martin.belanger at dell.com>
Change log is missing...
>
> ---
> 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?
More information about the Linux-nvme
mailing list