Subject: Re: [rtcweb] [MMUSIC] draft-ejzak-mmusic-data-channel-sdpneg: external rejection of channel

From: "Makaraju, Maridi Raju (Raju)" <[email-masked]>
Date: Thu, 27 Feb 2014 19:55:11 +0000

+ rtcweb as it impacts DCP draft.

Please see comments inline.

> I would like some clarity about how this interacts with DCEP.
> 
> IMO these are not mutually exclusive. But they must be used with care.

[Raju] I debated on this with myself before concluding in my earlier
reply that they are mutually exclusive. My mistake, instead of 
concluding I should have given options. To make this internal or 
external per data channel granuality we need to add more 
restrictions/notes to these draft. 

http://tools.ietf.org/html/draft-ietf-rtcweb-data-protocol-03#section-4 says:
   "To avoid glare in opening Channels, each side MUST use either even or
   odd Streams when sending a DATA_CHANNEL_OPEN message.  The method
   used to determine which side uses odd or even is based on the
   underlying DTLS connection role when used in WebRTC, with the side
   acting as the DTLS client using even stream identifiers."

Where as draft-ejzak-mmusic-data-channel-sdpneg determines this 
based on SDP offerer (even) and answerer (odd).

What if the SDP answerer becomes TLS client? The stream #id assignments
conflict with SDP offer/answer.
So, to avoid such conflict we need to add the following clarifications:
1. draft-ejzak-mmusic-data-channel-sdpneg
   If DCP is used along with external negotiation, when creating
   data channel the client should always specify the stream id 
   to use. Leaving selection to data channel stack (DCSK) will 
   result in conflicts as DCSK (browser) will assign stream ids 
   per DTLS role.

2. draft-ietf-rtcweb-data-protocol-03
   Item (1) above conflicts with DCP's odd/even rule, for which
   the draft says "MUST" ("each side MUST use either even or 
   odd Streams").
   This section 4 (and other sections) text has to be updated
   to "SHOULD" or "MAY".

If we all agree to these updates then I am ok to make 
internal or external negotiation granularity per data channel.

Best Regards
Raju

> 
> So, when a channel that was in the SDP previously then disappears from
> the SDP it is necessary to close the corresponding channel. But channels
> that were opened via DCEP should not be closed.
> 
> That also means that one should never mention a DCEP channel in SDP.
> 
> 	Thanks,
> 	Paul
> 
> On 2/26/14 3:12 PM, Makaraju, Maridi Raju (Raju) wrote:
> > Please find my comments inline.
> >
> > But, there is no text on rejecting a data channel in the SDP answer.
> >
> > The answer can of course reject the whole m- line, using port zero in
> > the Answer m- line. But, how does the answerer reject an individual
> > sub-protocol data channel?
> >
> > Only attributes for "accepted data channels" are included in the SDP
> > answer, which indicates back to the offerer which ones are rejected
> > (they just aren't there).  This should be made clearer in the text.
> >
> >     Section 5.1.1 says, regarding the SDP dcmap attribute, for accepted
> >     data channels:
> >
> >     "This line MUST be replicated without changes in the SDP answer, if
> >
> >                      the answerer accepts the offered data channel."
> >
> >     I guess one way to reject would be to simply not include the dcmap
> >     attribute in the Answer, and the Offerer then needs to figure out
> >     what was rejected based on the stream values not present in the
> Answer.
> >
> > Yes.  That is what was intended.
> >
> > /[Raju] In addition to the above mentiooed cases, if we all agree we
> > need to add the following cases in the next draft:/
> >
> > */1./*SDP offer has no a=dcmap. This has two use cases:
> >
> > a.Initial SDP offer: no data channel streams (DCS) are open yet.
> >
> > b.Subsequent SDP offer: Remove all previously opened data
> channels/streams.
> >
> > In either case, the SCTP association is kept open (and ICE procedures
> > are performed) even when no data channels are in use.
> >
> > */2./*Creation of new DCS(s) using SDP offer (initial or subsequent)
> >
> > a.Offerer has to create the data channels locally first by doing
> > createDataChannel or equivalent API into data channel stack before
> > sending offer.
> >
> > */3./*SDP offer was rejected
> >
> > a.DCSs are kept per previous SDP offer/answer. This means DCSs that are
> > to be deleted has to be deleted (i.e. calling createDataChannel or
> > equivalent API) only after successful SDP answer.
> >
> > b.If any new DCSs are attempted to be created per new SDP offer, these
> > have to be closed now.
> >
> > */4./*Per
> > http://dev.w3.org/2011/webrtc/editor/webrtc.html#dom-peerconnection-
> createdatachannel
> > createDataChannel() API the 'external' negotiation field is per data
> > channel.  But this draft only allows external negotiation to be used for
> > all or no streams; it can't be selective. This restriction is also
> > needed so that the SDP offer/answer odd/even stream id allocation won't
> > conflict DCP's TLS role based odd/even mechanism.
> >
> > Best Regards!
> >
> > Raju
> >
> >
> >
> > _______________________________________________
> > mmusic mailing list
> > [email-masked]
> > https://www.ietf.org/mailman/listinfo/mmusic
> >
> 
> _______________________________________________
> mmusic mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/mmusic

---

From: Christer Holmberg <[email-masked]>
Date: Thu, 27 Feb 2014 21:51:11 +0000

Hi,

Isn't it enough to, in the data channel protocol spec, say that the odd/even rule applies unless the stream id is explicitly negotiated using some other mechanism?

Or something like that...

Regards,

Christer

-----Alkuperäinen viesti-----
Lähettäjä: mmusic [mailto:[email-masked]] Puolesta Makaraju, Maridi Raju (Raju)
Lähetetty: 27. helmikuuta 2014 21:55
Vastaanottaja: Paul Kyzivat; [email-masked]; [email-masked]
Aihe: Re: [MMUSIC] draft-ejzak-mmusic-data-channel-sdpneg: external rejection of channel

> IMO these are not mutually exclusive. But they must be used with care.

[Raju] I debated on this with myself before concluding in my earlier reply that they are mutually exclusive. My mistake, instead of concluding I should have given options. To make this internal or external per data channel granuality we need to add more restrictions/notes to these draft. 

Where as draft-ejzak-mmusic-data-channel-sdpneg determines this based on SDP offerer (even) and answerer (odd).

What if the SDP answerer becomes TLS client? The stream #id assignments conflict with SDP offer/answer.

If we all agree to these updates then I am ok to make internal or external negotiation granularity per data channel.

Best Regards
Raju

> the SDP it is necessary to close the corresponding channel. But 
> channels that were opened via DCEP should not be closed.
> 
> > The answer can of course reject the whole m- line, using port zero 
> > in the Answer m- line. But, how does the answerer reject an 
> > individual sub-protocol data channel?
> >
> > In either case, the SCTP association is kept open (and ICE 
> > procedures are performed) even when no data channels are in use.
> >
> > a.DCSs are kept per previous SDP offer/answer. This means DCSs that 
> > are to be deleted has to be deleted (i.e. calling createDataChannel 
> > or equivalent API) only after successful SDP answer.
> >
> > b.If any new DCSs are attempted to be created per new SDP offer, 
> > these have to be closed now.
> >
> > */4./*Per
> > channel.  But this draft only allows external negotiation to be used 
> > for all or no streams; it can't be selective. This restriction is 
> > also needed so that the SDP offer/answer odd/even stream id 
> > allocation won't conflict DCP's TLS role based odd/even mechanism.
> >
> > Best Regards!
> >
> > Raju
> >
> >
> >

---

From: "Makaraju, Maridi Raju (Raju)" <[email-masked]>
Date: Thu, 27 Feb 2014 22:59:02 +0000

Hi Christer,

> Hi,
> 
> Isn't it enough to, in the data channel protocol spec, say that the odd/even
> rule applies unless the stream id is explicitly negotiated using some other
> mechanism?
> 
[Raju] Yes, that is sufficient from DCP draft. draft-ejzak-mmusic-data-channel-sdpneg should still need to say that "when both external and DCP are used, even for DCP created streams the stream ids have to be specified and managed by the application (else DCP stack will default to odd/even rule per DTLS role which may conflict with SDP offer/answer rule)".

Thanks for agreeing to add this to the draft!

Raju

---

From: Paul Kyzivat <[email-masked]>
Date: Fri, 28 Feb 2014 10:54:54 -0500

Raju,

> [Raju] Yes, that is sufficient from DCP draft. draft-ejzak-mmusic-data-channel-sdpneg should still need to say that "when both external and DCP are used, even for DCP created streams the stream ids…

Can we assume there must be a mechanism for using DCEP and still 
controlling which channels are used?

It might help if the O/A negotiation also followed the even/odd rule.
But there are difficulties in knowing who is even and who is odd for the 
first O/A.

If the offerer always creates the channel before sending the offer, then 
that will prevent the two mechanisms from stepping on one another's 
stream ids.

	Thanks,
	Paul

---

From: "Makaraju, Maridi Raju (Raju)" <[email-masked]>
Date: Fri, 28 Feb 2014 16:46:33 +0000

Hi Paul,

> > [Raju] Yes, that is sufficient from DCP draft. draft-ejzak-mmusic-data-
> channel-sdpneg should still need to say that "when both external and DCP are
> used, even for DCP created streams the stream ids have to be specified and
> managed by the application (else DCP stack will default to odd/even rule per
> DTLS role which may conflict with SDP offer/answer rule)".
> 

[Raju] Yes, we can assume that and it is already supported by :
http://tools.ietf.org/html/draft-ietf-rtcweb-data-channel-07#section-6.5
and
http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-RTCDataChannel-id
I believe it is safe to assume non-browser implementations of 
data channel stack gives an option for application to select 
stream ids independent of DCEP or external negotiation.

> It might help if the O/A negotiation also followed the even/odd rule.
[Raju] May be I am missing something here. Richard's draft already has
a specific even/odd rule for O/A. But the issue is TLS based rule may
conflict with the O/A rule as TLS roles may change depending on a=setup.

> But there are difficulties in knowing who is even and who is odd for the

[Raju] Not related to first or subsequent O/A, but rather a conflict 
between TLS roles vs. O/A.

> that will prevent the two mechanisms from stepping on one another's
[Raju] 
In some cases, initial offer may not have a data channel stream created. 
I don't know how this can prevent stepping on each other?!
May be I am missing something here?! In most cases TLS role is 
determined after O/A is completed, but offerer creates a data 
channel before answer, then how does it know even/odd rule? 
So, trying to use TLS role for external negotiation is problematic.

Thanks
Raju