Re: [multipathtcp] API: which address to use

Yoshifumi Nishida <nishida@sfc.wide.ad.jp> Mon, 23 November 2009 00:22 UTC

Return-Path: <nishida@sfc.wide.ad.jp>
X-Original-To: multipathtcp@core3.amsl.com
Delivered-To: multipathtcp@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 781713A67D3 for <multipathtcp@core3.amsl.com>; Sun, 22 Nov 2009 16:22:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.904
X-Spam-Level:
X-Spam-Status: No, score=0.904 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_EQ_JP=1.244, HOST_EQ_JP=1.265, RELAY_IS_203=0.994]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RIYiN4dY196j for <multipathtcp@core3.amsl.com>; Sun, 22 Nov 2009 16:22:23 -0800 (PST)
Received: from mail.sfc.wide.ad.jp (mail.sfc.wide.ad.jp [203.178.142.146]) by core3.amsl.com (Postfix) with ESMTP id 6C06D3A67A1 for <multipathtcp@ietf.org>; Sun, 22 Nov 2009 16:22:23 -0800 (PST)
Received: from localhost (cpu.sfc.wide.ad.jp [IPv6:2001:200:0:8803:203:178:142:143]) by mail.sfc.wide.ad.jp (Postfix) with ESMTP id 112D64C13D; Mon, 23 Nov 2009 09:22:15 +0900 (JST)
Date: Mon, 23 Nov 2009 09:22:14 +0900
Message-Id: <20091123.092214.140617438.nishida@sfc.wide.ad.jp>
To: pasi.sarolahti@iki.fi
From: Yoshifumi Nishida <nishida@sfc.wide.ad.jp>
In-Reply-To: <E03D46E1-51EA-4273-A8A7-4F37F88B2E92@iki.fi>
References: <E9EE0C1A-C9D3-4EBC-97FD-E1B1628CD2E7@iki.fi> <3c3e3fca0911090542h54e45784qbdbf1f338a4c3e90@mail.gmail.com> <E03D46E1-51EA-4273-A8A7-4F37F88B2E92@iki.fi>
X-Mailer: Mew version 6.2 on Emacs 22.1 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Cc: multipathtcp@ietf.org
Subject: Re: [multipathtcp] API: which address to use
X-BeenThere: multipathtcp@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Multi-path extensions for TCP <multipathtcp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/multipathtcp>, <mailto:multipathtcp-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/multipathtcp>
List-Post: <mailto:multipathtcp@ietf.org>
List-Help: <mailto:multipathtcp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/multipathtcp>, <mailto:multipathtcp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 23 Nov 2009 00:22:24 -0000

Hello Pasi,

I like the idea. 
But I have several questions. I think there might be an alternative: having 
SOCK_MULTISTREAM or using a combination socket type like SOCK_STREAM | SOCK_MULTIPATH 
from the following reasons.

 Strictly speaking, AF_MULTIPATH is not a new address type. 

 SCTP socket can be created with AF_INET or AF_INET6, but the socket can
 support multiple addresses. It's a bit orthgonal behavior from AF_MULTIPATH

 If the main point of having AF_MULTIPATH is to distinguish between the current 
 TCP socket and multipath TCP socket, using SOCK_MULTISTRAM is not a problem.

 we might support one-ended approach with the same API.
 
Also, in my feeling, we will need new bind(), connect() to specify multiple 
addresses. just like sctp_bindx(), sctp_connectx(). 

Thanks,
--
Yoshifumi Nishida
nishida@sfc.wide.ad.jp


From: Pasi Sarolahti <pasi.sarolahti@iki.fi>
Subject: Re: [multipathtcp] API: which address to use
Date: Tue, 10 Nov 2009 14:01:59 +0900
Message-ID: <E03D46E1-51EA-4273-A8A7-4F37F88B2E92@iki.fi>

 > On Nov 9, 2009, at 10:42 PM, William Herrin wrote:
 > 
 > > On Mon, Nov 9, 2009 at 5:49 AM, Pasi Sarolahti <pasi.sarolahti@iki.fi>
 > > wrote:
 > >> This problem was just discussed in the meeting. Could one possible
 > >> solution
 > >> to the getsockname semantics problem be to use a separate address
 > >> family for
 > >> multipath connections? It could be similarly structured to the
 > >> traditional
 > >> AF, but from the different AF the app would know the semantics are
 > >> different.
 > >
 > > Not really, no.
 > >
 > > Backwards compatibility is an issue, as you mentioned. So is a desire
 > > to be able to use both IPv4 and IPv6 paths in a single multipath TCP
 > > connection. If it's a legacy app then it's expecting getsockname to
 > > return the same address family that it used to initiate the socket. If
 > > you provide something else you could open a path for buffer overflows
 > > or other mischief.
 > 
 > Ok, so there could be a non-backwards compatible way and a
 > (pseudo)backwards compatible way. I don't think these had to be
 > exclusive, and both could be supported at the same time.
 > 
 > Non-backwards compatible version would be to use new AF_MULTIPATH,
 > that would be an array of AF_INET and AF_INET6 entries. Of course that
 > would need to be used consistently throughout the connection
 > lifetime. gethostname and getpeername would return the current set of
 > active addresses at local or remote end. bind() could use this to bind
 > to several addresses at a time. connect() could use this to give more
 > than one known destination addresses to connect to (although the MPTCP
 > protocol logic may prevent the actual connect operation from happening
 > simultaneously).  gethostbyname might return several addresses from
 > DNS in a single AF_MULTIPATH record, to be directly used by
 > connect(AF_MULTIPATH), instead of needing to cycle through the
 > addresses separately, as a traditional single-homed version would
 > do. This would require modifications also elsewhere than TCP code, but
 > that's what you get for having an API that exposes the IP address to
 > the application and assumes only one address is in use at a time.
 > 
 > The backwards compatible version could just return the oldest active
 > address and hope nothing breaks on legacy apps. I don't know if this
 > is better or worse choice than returning the first used address that
 > might not exist anymore. Has it been specified anywhere that
 > getsockname/getpeername should return same result through the
 > connection lifetime?
 > 
 > - Pasi
 > 
 > _______________________________________________
 > multipathtcp mailing list
 > multipathtcp@ietf.org
 > https://www.ietf.org/mailman/listinfo/multipathtcp