Re: [rtcweb] JSEP: codecs in answer: MUST vs. MAY

Jonathan Lennox <jonathan@vidyo.com> Fri, 27 October 2017 17:14 UTC

Return-Path: <jonathan@vidyo.com>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 433CF13B2BB for <rtcweb@ietfa.amsl.com>; Fri, 27 Oct 2017 10:14:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.1
X-Spam-Level:
X-Spam-Status: No, score=-1.1 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_SORBS_WEB=1.5, SPF_PASS=-0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=vidyo-com.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8PLRij2v7O-r for <rtcweb@ietfa.amsl.com>; Fri, 27 Oct 2017 10:14:36 -0700 (PDT)
Received: from mail-qk0-x22f.google.com (mail-qk0-x22f.google.com [IPv6:2607:f8b0:400d:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5C8181384B5 for <rtcweb@ietf.org>; Fri, 27 Oct 2017 10:14:36 -0700 (PDT)
Received: by mail-qk0-x22f.google.com with SMTP id q83so9179232qke.6 for <rtcweb@ietf.org>; Fri, 27 Oct 2017 10:14:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vidyo-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=Tb82Z/QzPWVChS5Ly4NxYaltJZRLfccaHSHGCNXsr7Q=; b=BZ5DWpjOnX11ctS60g3o4I0CNBVfYiMH+0xkgiZgcWjFP3tFsQZ1WP5Ph/IeOiKfPD Z1MWd3Q+N64s/spP8PLUjPe56y144u7SECXcL7oiLq3muoSXGkq4BkyWfYVcy0XgWDNO ou0sZuw/lwD2UhdECfhTS9uyvqg9nRAnUnsvfrZB/sEOP+O2whc4/PYDYfu7EBF7htv9 sV2I5vd35ZPtXNsdqCJzCSeybOSkg/ZehEFMD6t0r7a0+e89V48D8/imVFqxPRSY8c0W gZ676YigdC5hLbEECbkXYHFHdopTnypLyBRBajeZ1xKA/E+9WNdPqalalqn2M51NN+nS BZKw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=Tb82Z/QzPWVChS5Ly4NxYaltJZRLfccaHSHGCNXsr7Q=; b=Twha/W8A/iRSGb+Uc1Cr7G+Z4aXhhJjzMKGmGlaURiCehileDBe8aepcgPWLrJKiuZ YxhtlaFHaw923gP7mzlUoWtA/IevBI52nCZL7qGnm8bXQ4bv0rQ3QlsmVN4w9zEIRLwh nWvwhzVJSmhwRaJ5Vzge0SlidVIqXuivdRDALiBKwcoImM/2bf/D+jbKNJ1AOaJAqGuN 2MgjTDyHiiZJ3F+ZJyrungyYg+XHeSBHAHsz0RL/1J7/XxRgQHeorLzmU+vlWYthM1PS U5hYqLODOZHglH6EQnjWViqUgxm0i3zawO4iFK+rSTB1OH8tl/R9rrGreOcU8kGeGY0f FDFQ==
X-Gm-Message-State: AMCzsaVRaBK+OFs0T0R9i3uUjknHysOp0gLR5tMh8t6b5pSJDDkvgp/s E2Ng0r7P1h9Te0gORatt97ZPFA==
X-Google-Smtp-Source: ABhQp+TszeigynmdsmrZo0WDd8GHYIIZBy6YkWGr7rtib/BPrW1AcyBcHxwr48y+2AhuXPWlHr6PTg==
X-Received: by 10.55.157.78 with SMTP id g75mr1747692qke.347.1509124475520; Fri, 27 Oct 2017 10:14:35 -0700 (PDT)
Received: from [172.16.2.142] ([160.79.219.114]) by smtp.gmail.com with ESMTPSA id b26sm5472367qtc.39.2017.10.27.10.14.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Oct 2017 10:14:34 -0700 (PDT)
From: Jonathan Lennox <jonathan@vidyo.com>
Message-Id: <2CFCA859-B941-4AFF-B80A-792509EED6F5@vidyo.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_3EEB844B-26B7-4461-837E-C60E1F2B2A60"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Date: Fri, 27 Oct 2017 13:14:33 -0400
In-Reply-To: <CAOJ7v-2FEpidRsFf3Km5XjW5Jj7gXC2h9Pcy_GWOqb_P7jTHQw@mail.gmail.com>
Cc: Ted Hardie <ted.ietf@gmail.com>, "rtcweb@ietf.org" <rtcweb@ietf.org>
To: Justin Uberti <juberti@google.com>
References: <4CB5EF91-8CB2-433F-85E9-A86140CECC62@vidyo.com> <CA+9kkMDJEggHar5JbBb9GaNMBsZjgvO0F2VN5UVObv-3VTzE4w@mail.gmail.com> <CAOJ7v-2FEpidRsFf3Km5XjW5Jj7gXC2h9Pcy_GWOqb_P7jTHQw@mail.gmail.com>
X-Mailer: Apple Mail (2.3273)
Archived-At: <https://mailarchive.ietf.org/arch/msg/rtcweb/ISHt7C4K1q486uGsHIZ_vZMMG1Q>
Subject: Re: [rtcweb] JSEP: codecs in answer: MUST vs. MAY
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <rtcweb.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/rtcweb/>
List-Post: <mailto:rtcweb@ietf.org>
List-Help: <mailto:rtcweb-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 27 Oct 2017 17:14:38 -0000

> On Oct 25, 2017, at 12:47 AM, Justin Uberti <juberti@google.com> wrote:
> 
> Ted's interpretation is correct - this text is intentionally reiterating 3264's point that it is permissible to respond with codecs that weren't offered, as this has been a frequent misunderstanding.

Okay, good, that’s what I hoped; but this is mixing up normative text (MUST reject if no common codec) with informative, which is confusing.

> One option to clarify this could be to replace the "MAY" with "is permitted to”.

I would go further than this, clearly distinguishing the normative text from the informative. Perhaps:

In either case, the media formats in the answer MUST include at least one format that is present in the offer.  If no common format exists, the m= section is rejected as described above.
(Note that in SDP offer/answer, an answer is permitted to include formats that are locally supported but not present in the offer, as mentioned in [RFC3264], Section 6.1.  As described in the preceding paragraphs, in JSEP including these formats is mandatory.)


> On Tue, Oct 24, 2017 at 1:36 PM, Ted Hardie <ted.ietf@gmail.com <mailto:ted.ietf@gmail.com>> wrote:
> I read this slightly differently, see below.
> 
> On Tue, Oct 24, 2017 at 12:58 PM, Jonathan Lennox <jonathan@vidyo.com <mailto:jonathan@vidyo.com>> wrote:
> JSEP (section 5.3.1) seems to be inconsistent about how whether locally-supported codecs that weren’t listed in a remote offer MUST, or MAY, be included in an answer:
> 
>    o  If codec preferences have been set for the associated transceiver,
>       media formats MUST be generated in the corresponding order,
>       regardless of what was offered, and MUST exclude any codecs not
>       present in the codec preferences.
> 
> This is what you do if codec preferences are set (keep the order, and don't add new ones)
>  
>    o  Otherwise, the media formats on the m= line MUST be generated in
>       the same order as those offered in the current remote description,
>       excluding any currently unsupported formats.  Any currently
>       available media formats that are not present in the current remote
>       description MUST be added after all existing formats.
> 
> This is what you do if codec preferences are not set (keep the order, add any new ones to the end)
>    o  In either case, the media formats in the answer MUST include at
>       least one format that is present in the offer, but MAY include
>       formats that are locally supported but not present in the offer,
>       as mentioned in [RFC3264], Section 6.1 <https://tools.ietf.org/html/rfc3264#section-6.1>.  If no common format
>       exists, the m= section is rejected as described above.
> 
> 
> In either case, if you don't have at least one codec that matches, you reject the m= section (don't add any new ones). 
> 
> I think the MAY there from RFC 3264 permits the behavior in the  "if not codec preferences are set" behavior branch, but doesn't require it, which is why there can be a branch like the one where codec preferences are set and they are not sent.
>  
> The first two paragraphs certainly seem to indicate that these codecs MUST be included in the answer; however, the third paragraph suddenly weakens this to a MAY.
> 
> Is the intent of the third paragraph simply to restate RFC 3264’s loose requirements, whereas the first two are JSEP’s more binding ones?  If so, I think this should be stated more clearly, otherwise the required behavior is unclear.
> 
> _
> 
> So I don't personally see an inconsistency in this, but if you have other language, please suggest it.  We're already in IESG evaluation, but it might be a friendly amendment by Adam or someone else.
> 
> regards,
> 
> Ted
>  
> ______________________________________________
> rtcweb mailing list
> rtcweb@ietf.org <mailto:rtcweb@ietf.org>
> https://www.ietf.org/mailman/listinfo/rtcweb <https://www.ietf.org/mailman/listinfo/rtcweb>
> 
> 
> 
> _______________________________________________
> rtcweb mailing list
> rtcweb@ietf.org <mailto:rtcweb@ietf.org>
> https://www.ietf.org/mailman/listinfo/rtcweb <https://www.ietf.org/mailman/listinfo/rtcweb>
> 
>