RE: Apparent SCTP API oversights, draft-ietf-tsvwg-sctpsocket-30

"Dan Wing" <dwing@cisco.com> Mon, 08 August 2011 18:21 UTC

Return-Path: <dwing@cisco.com>
X-Original-To: tsvwg@ietfa.amsl.com
Delivered-To: tsvwg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id ACDA821F8B5E for <tsvwg@ietfa.amsl.com>; Mon, 8 Aug 2011 11:21:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.615
X-Spam-Level:
X-Spam-Status: No, score=-101.615 tagged_above=-999 required=5 tests=[AWL=-3.004, BAYES_00=-2.599, FRT_STOCK2=3.988, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JXrd6uY8QcRE for <tsvwg@ietfa.amsl.com>; Mon, 8 Aug 2011 11:21:23 -0700 (PDT)
Received: from rcdn-iport-3.cisco.com (rcdn-iport-3.cisco.com [173.37.86.74]) by ietfa.amsl.com (Postfix) with ESMTP id 8492A21F8B5C for <tsvwg@ietf.org>; Mon, 8 Aug 2011 11:21:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=dwing@cisco.com; l=8227; q=dns/txt; s=iport; t=1312827710; x=1314037310; h=from:to:cc:references:in-reply-to:subject:date: message-id:mime-version:content-transfer-encoding; bh=TO9k1UZnGjN6Yn/flaCrnkjDw4LKuTgF+XIYgS4Wb4s=; b=SR5G1wsbxUD9PvIrTCYp1v3neJ568Kuwl80V0jdhGwvNTbOAzoTsQ6Gc Xg8UJ6OPz9p1rLd93VfBCAMaMlZsDwtytaS3Rpj0lr8TqYtOfg8wwnZG2 l8JVE2WgC2k4YdO6ft6AIDpjD9VOAm/OzCs+7TImhqJ3GBOy0/ySdz49u U=;
X-IronPort-AV: E=Sophos;i="4.67,338,1309737600"; d="scan'208";a="10920351"
Received: from mtv-core-3.cisco.com ([171.68.58.8]) by rcdn-iport-3.cisco.com with ESMTP; 08 Aug 2011 18:21:49 +0000
Received: from dwingWS (sjc-vpn2-837.cisco.com [10.21.115.69]) by mtv-core-3.cisco.com (8.14.3/8.14.3) with ESMTP id p78ILmbe005588; Mon, 8 Aug 2011 18:21:48 GMT
From: Dan Wing <dwing@cisco.com>
To: 'Michael Tuexen' <tuexen@fh-muenster.de>
References: <026301cc5303$611e3a40$235aaec0$@com> <7A0DE9E5-DE21-49BB-B75E-8150A2068334@fh-muenster.de> <028f01cc53c8$7f665800$7e330800$@com> <A9266759-56E1-4D53-A909-E2BE42746148@fh-muenster.de>
In-Reply-To: <A9266759-56E1-4D53-A909-E2BE42746148@fh-muenster.de>
Subject: RE: Apparent SCTP API oversights, draft-ietf-tsvwg-sctpsocket-30
Date: Mon, 08 Aug 2011 11:21:48 -0700
Message-ID: <00a001cc55f8$09b810d0$1d283270$@com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AcxVEVqdZ0xKTikPRAKXz3Y9IkPabgA5iZjw
Content-Language: en-us
Cc: ka-cheong.poon@oracle.com, tsvwg@ietf.org, vladislav.yasevich@hp.com, draft-ietf-tsvwg-sctpsocket@tools.ietf.org, "'Peter Lei (peterlei)'" <peterlei@cisco.com>, randall@lakerest.net, "'James M. Polk'" <jmpolk@cisco.com>
X-BeenThere: tsvwg@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Transport Area Working Group <tsvwg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tsvwg>
List-Post: <mailto:tsvwg@ietf.org>
List-Help: <mailto:tsvwg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 08 Aug 2011 18:21:24 -0000

> -----Original Message-----
> From: Michael Tuexen [mailto:tuexen@fh-muenster.de]
> Sent: Sunday, August 07, 2011 7:50 AM
> To: Dan Wing
> Cc: ka-cheong.poon@oracle.com; 'James M. Polk'; draft-ietf-tsvwg-
> sctpsocket@tools.ietf.org; tsvwg@ietf.org; randall@lakerest.net; 'Peter
> Lei (peterlei)'; vladislav.yasevich@hp.com
> Subject: Re: Apparent SCTP API oversights, draft-ietf-tsvwg-sctpsocket-
> 30
> 
> On Aug 6, 2011, at 1:36 AM, Dan Wing wrote:
> 
> >> -----Original Message-----
> >> From: Michael Tuexen [mailto:tuexen@fh-muenster.de]
> >> Sent: Friday, August 05, 2011 1:59 PM
> >> To: Dan Wing; ka-cheong.poon@oracle.com; James M. Polk
> >> Cc: draft-ietf-tsvwg-sctpsocket@tools.ietf.org; tsvwg@ietf.org;
> >> randall@lakerest.net; Peter Lei (peterlei);
> vladislav.yasevich@hp.com
> >> Subject: Re: Apparent SCTP API oversights, draft-ietf-tsvwg-
> sctpsocket-
> >> 30
> >>
> >> Hi Dan,
> >>
> >> thank you very much for your comments.
> >> See my answers in-line.
> >>
> >> Best regards
> >> Michael
> >>
> >> On Aug 5, 2011, at 2:05 AM, Dan Wing wrote:
> >>
> >>> I would like clarification on my misunderstanding, or changes
> >>> to draft-ietf-tsvwg-sctpsocket, to accommodate what appear to
> >>> be some oversights in the SCTP API:
> >>>
> >>> 1. The infotype parameter of sctp_sendv() allows indicating if the
> >>> data should be sent with partial reliability or full reliability
> >>> using sctp_prinfo.  However, there does not appear to be a way to
> >>> adjust the IPv4 or IPv6 DSCP bits when switching between
> >>> full/partial reliablity, except by modifying the entire
> >>> association itself (using spp_ipv4_tos).  This is quite limiting.
> >> A couple of points:
> >> * The DSCP stuff applies to packets, not to user messages. Any
> >>  send() call applies to a user message. So this does not really
> >>  fit.
> >> * The sendv() is a convenience function, so you can't do everything
> >>  with it. The generic way is by using CMSGs.
> >> * The DCSP stuff is related to the IP layer, not the SCTP layer.
> >> * I'm also not sure if you can easily map PR-SCTP policies to
> >>  DCSP code points. You might want to do that for particular
> >>  usages of particular policies, but in general a mapping seems
> >>  to be hard.
> >> * For IPv6 you can do that by using the IPV6_TCLASS CMSG.
> >> * For IPv4 there is no CMSG for specifying the TOS (as far
> >>  as I know). But adding such a CMSG at the IPv4 layer would
> >>  be the way to address this.
> >
> > To me this seems necessary, or else SCTP's ability to carry
> > multiple streams (of different application delivery precedence, e.g.,
> > partial reliability) cannot influence the network's drop precedence.
> If you want a per user message DSCP, that is required. However,
> we don't define any IPv[46] layer socket option or CMSG in the
> SCTP socket API ID.
> > Without this capability the only workable alternative, if someone
> > wants the  network to know the drop precedence for a packet, is
> > to create two separate SCTP associations and carry the reliable
> stream
> > in one association and the unreliable stream in the other
> association.
> > Creating a separate connection with certain DSCP values is what we
> > do with UDP and TCP today.  This limitation seems the antithesis of
> > SCTP's design which allows a single SCTP association to carry several
> > streams where each stream can have different retransmit
> > characteristics.
> Hmm. Assuming you would send user messages with a limited lifetime of,
> let's say, 5 seconds. What DSCP would you use?

The value depends on that network's configuration.  RFC4594 provides
some guidance on different values.

> For different PR-SCTP policies, this might be clearer. For example,
> FreeBSD allows to limit the number of retransmissions. For limiting
> it to 0, it might be clear, but what would be an appropriate DSCP
> with you allow, let's say, 3 retransmissions?
> 
> Or do you have a different PR-SCTP policy in mind?
> 
> In general I'm wondering how SCTP behaves if you use different
> DSCP within the same SCTP association. Not that it might break
> the association, but I'm not sure about interactions with the
> CC.
> >
> >
> >>> 2. When modifying an association (e.g., to have different DSCP
> >>> value), I could not find text in draft-ietf-tsvwg-sctpsocket-30
> that
> >>> indicates if the modification applies immediately (including to
> >>> packets queued and to packets not yet acknowledged by the
> >>> receiver) or if the modification applies to subsequent calls
> >>> to send().
> >>>
> >>> This means that to attempt to work around (1), it isn't clear
> >>> if the API would permit me to modify the association's DSCP
> >>> value, call send(), and know that payload will be sent with
> >>> the desired DSCP value.
> >> At least for the FreeBSD implementation this applies to all
> >> packets (transmitted or retransmitted) sent after the socket option
> >> has been set. The values do NOT stick to user messages.
> >
> > This seems significant, and means an application cannot work
> > around the missing functionality in the API.  Can this be
> > added to the document?
> Up to the chairs...

?  As in, this vagueness in the API is acceptable to you?

> >>> 3. Related to (1), it is desirable that full reliable packets not
> >>> be bundled with partial reliability packets, so that they can have
> >>> different DSCP markings.
> >> ... which means the workaround doesn't really work...
> >>>
> >>> http://tools.ietf.org/html/rfc4960#section-10.1 mentions a no-
> bundle
> >>> flag.  However, I could not find in draft-ietf-tsvwg-sctpsocket-30
> >>> where this is controlled; it appears the API lacks this ability.
> >> The functionality is provide by the SCTP_NODELAY socket option.
> >
> > Can the word "bundle" be added somewhere in the description of
> > SCTP_NODELAY?  Such consistency of terminology eases searching for
> > things like this.
> >
> >
> >>> 4. draft-ietf-tsvwg-sctpsocket-30 uses the archaic term ToS
> >>> rather than DSCP.  At a minimum, to ease string searching, please
> >>> add text near spp_ipv4_tos something like "This is also called the
> >>> DSCP field [RFC2474]".  I would prefer, though, that
> >>> draft-ietf-tsvwg-sctpsocket-30 use the term DSCP in compliance
> >>> with RFC3260 and other DiffServ documents.
> >> I'm happy to change this text. However, the document has passed
> >> the WG LC. Not sure how to handle this? WG chairs?
> >> We can either reissue he document with the small changes discussed
> >> in this mail or handle it as comments during the IESG review.
> >> Up to the chairs.
> >>
> >>> 5. I believe it is an oversight that draft-ietf-tsvwg-sctpsocket-30
> >>> provides a way to adjust the IPv4 ToS (spp_ipv4_tos) and the IPv6
> >>> flow label (spp_ipv6_flowlabel), but lacks a way to query or adjust
> >>> the IPv6 Traffic Class field.  Please correct this oversight or
> >>> add text justifying the inability to adjust the IPv6 Traffic Class
> >>> field.
> >> Hmmm. You have a point here...
> >> It is hard to change he structure anymore since implementations are
> >> out... However, the spp_ipv6_flowlabel is 32-bit, enough space to
> >> contain the flowlabel and the DSCP. We could add text how to [sg]et
> >> the DSCP.
> >
> > That seems a reasonable solution which makes only a small change
> > to existing code.
> However, this does not solve your problem of being able to provide a
> per packet DSCP.

Agreed.  But at least it brings IPv6 on par with IPv4.

> You can do this with the IPV6_TCLASS cmsg for
> IPv6, but I'm not aware of something similar for IPv4.
> Maybe the reason is that for UDP you can do this my using a
> setsockopt()
> call before each send() call. I'm not sure if it makes sense for TCP
> to use multiple DSCPs per TCP connection.

I agree it makes little sense for TCP to change DSCP values of
a flow.  But SCTP isn't TCP, of course.

-d


> Best regards
> Michael
> >
> > -d
> >
> >> Kacheong: Do you have some suggestions here?
> >>>
> >>> -d
> >>>
> >>>
> >>>
> >
> >