Re: [multipathtcp] Multipath Address Family

Pasi Sarolahti <pasi.sarolahti@iki.fi> Thu, 26 November 2009 06:55 UTC

Return-Path: <pasi.sarolahti@iki.fi>
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 3A1493A684F for <multipathtcp@core3.amsl.com>; Wed, 25 Nov 2009 22:55:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, J_CHICKENPOX_34=0.6]
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 kmbTzUy9mCfl for <multipathtcp@core3.amsl.com>; Wed, 25 Nov 2009 22:55:44 -0800 (PST)
Received: from argo.otaverkko.fi (argo.otaverkko.fi [212.68.0.2]) by core3.amsl.com (Postfix) with ESMTP id 0B6EB3A677E for <multipathtcp@ietf.org>; Wed, 25 Nov 2009 22:55:44 -0800 (PST)
Received: from [192.168.1.66] (adsl-99-179-46-50.dsl.pltn13.sbcglobal.net [99.179.46.50]) by argo.otaverkko.fi (Postfix) with ESMTP id 2CB2D25ED06; Thu, 26 Nov 2009 08:55:36 +0200 (EET)
Message-Id: <CF39E229-87CE-4050-BB9A-8E69245DCB31@iki.fi>
From: Pasi Sarolahti <pasi.sarolahti@iki.fi>
To: "Laganier, Julien" <julienl@qualcomm.com>
In-Reply-To: <BF345F63074F8040B58C00A186FCA57F1C65FB2A1B@NALASEXMB04.na.qualcomm.com>
Content-Type: text/plain; charset="US-ASCII"; format="flowed"; delsp="yes"
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v936)
Date: Wed, 25 Nov 2009 22:55:34 -0800
References: <E9EE0C1A-C9D3-4EBC-97FD-E1B1628CD2E7@iki.fi> <3c3e3fca0911090542h54e45784qbdbf1f338a4c3e90@mail.gmail.com> <E03D46E1-51EA-4273-A8A7-4F37F88B2E92@iki.fi> <20091123.092214.140617438.nishida@sfc.wide.ad.jp> <48DA092B-F3BC-432E-A199-B265DDED39DA@iki.fi> <3c3e3fca0911240434p4d95ec7an34615ae218faa4f@mail.gmail.com> <809D0BC9-83EC-4E42-85DC-BCAB2905F403@iki.fi> <BF345F63074F8040B58C00A186FCA57F1C65FB2A1B@NALASEXMB04.na.qualcomm.com>
X-Mailer: Apple Mail (2.936)
Cc: "multipathtcp@ietf.org" <multipathtcp@ietf.org>
Subject: Re: [multipathtcp] Multipath Address Family
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: Thu, 26 Nov 2009 06:55:45 -0000

On Nov 25, 2009, at 8:31 AM, Laganier, Julien wrote:

>> Even if we had a new mptcp_connectx, bindx, etc. calls, the problem
>> still remains what to do with the old socket operations that assume
>> only single address per endpoint. A new address family would be one
>> (unfortunately non-backwards compatible) way to address that problem
>> (possibly with the cost of introducing new problems).
>
> The "old" socket can have its semantic preserved by exposing through  
> it only the initial address-port pair in use.
>
>   - connect() will connect to one address-port
>   - bind() will bind to one address:port
>   - getsockname() will return the address-port to which the socket  
> was first bound
>   - getpeername() will return the address-port from which the  
> connection with the peer was initially established.

Ok, so the confusion is about whether get*name really refers to a  
stable "name" that misleadingly looks very much like an address/port,  
or whether it should point to a current address. Posix spec says about  
getpeername that "The getpeername() function shall retrieve the peer  
address of the specified socket", which hints towards the latter  
interpretation, but there may be other references (such as man pages)  
that spell this differently. Man page for getsockname says  
"Getsockname() returns the current address for the specified socket",  
but getpeername talks about names.

If the connection was to survive over the loss of the first address,  
getsockname or getpeername could return an address that has not been  
used by that host for a while, and the returned address might as well  
be already allocated to a different host. This may be a problem for  
applications that have assumed the "current address" interpretation. I  
agree that there needs to be a mode that is backwards compatible with  
the old AF_INET sockets for legacy apps, but if new applications were  
implemented to be multipath-aware with new or extended API, then also  
these calls should return reasonable values that correspond with  
reality.

A different question is how many applications really need to be aware  
of the underlying addresses -- probably a small minority (with  
apologies to people who are fed up with this discussion thread by now).

>> I think there is a certain elegancy in having a minimal socket API
>> with just a small basic set of operations. Until now the same socket
>> API has provided to be flexible enough to support many uses over time
>> (Unix domain sockets that take pathname as sockaddr, IPsec PF_KEY
>> sockets, netlink sockets, ...). I'm not yet ready to buy it that we
>> have come to a point that the old API is not sufficient anymore, if
>> the same functionality could be implemented by specifying a couple of
>> new socket parameters for a feature that is supported by just some of
>> the protocols under the API.
>
> AFAICS all uses of the socket API so far had the property that a  
> socket is bound to a _single_ and _constant_ name (e.g., address,  
> pathname), or in other words, there's no more than one name, and the  
> name doesn't change.
>
> This property is no longer true with MPTCP because a socket can be  
> bound to multiple and changing addresses. So if we're to design an  
> API that exposes that, extending an API that assumed exactly the  
> contrary is IMHO the wrong way to go.

I agree that this is different from earlier uses, but why is this a  
problem, if both the application and the protocol implementation have  
a common understanding (indicated by the address family) how the new  
form of sockaddress works? The socket API itself should be transparent  
about the structure of sockaddr, right? Connected socket has a  
property that it has a local and a remote endpoint, but now we have a  
case that an endpoint may have multiple "aliases" to represent it.

- Pasi