[PATCH 0/1] Add Host Transport Interface option (host-triface)

Belanger, Martin Martin.Belanger at dell.com
Fri Apr 16 17:15:56 BST 2021


Hi Hannes,

For our use case, we need both features. We need to be able to specify the "interface" and we need to be able to specify the "source address". And we need both features to be controlled with separate "knobs".

Regards,
Martin

________________________________________
From: Hannes Reinecke <hare at suse.de>
Sent: Friday, April 16, 2021 10:26
To: Belanger, Martin; James Smart; Martin Belanger; linux-nvme at lists.infradead.org
Cc: kbusch at kernel.org; axboe at fb.com; hch at lst.de; sagi at grimberg.me
Subject: Re: [PATCH 0/1] Add Host Transport Interface option (host-triface)


[EXTERNAL EMAIL]

On 4/16/21 2:41 AM, Belanger, Martin wrote:
> Re-sending in Plain Text mode.
>
> Hi James,
>
> With HOST_TRADDR, we use bind() to bind to an address just before invoking connect(). I also used
> to think that this was the way to force packets to be routed onto the interface matching the address
> used in the bind(). But that is not the case (I tested it). bind() does not control the routing
> of transmitted packets. The only thing that bind() does is to set the source address on the socket
> so that when a remote process queries the peer address (getpeername), it will see that address as
> the source address.
>
> It's only a setsockopt() with SO_BINDTODEVICE that can force packets to go out on a specific
> interface (I tested that as well).
>
Hmm. But arguably this was what 'host_traddr' was supposed to achieve.
If you compare commit 8f4e8dace3d1 ("nvme-rdma: add support for
host_traddr") it clearly states that the request should be _send_ via
the interface specified with host_traddr.
So in the light of this I'd rather modify the current handling of
host_traddr for tcp.

Unless this was intentionally coded this way. Sagi?

Cheers,

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



More information about the Linux-nvme mailing list