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

Hannes Reinecke hare at suse.de
Fri Apr 16 15:26:16 BST 2021


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