Re: Need your help: different connection IDs in the same datagram

David Schinazi <dschinazi.ietf@gmail.com> Wed, 15 July 2020 20:31 UTC

Return-Path: <dschinazi.ietf@gmail.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 950B23A0FA1 for <quic@ietfa.amsl.com>; Wed, 15 Jul 2020 13:31:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 73La0A3wFNd6 for <quic@ietfa.amsl.com>; Wed, 15 Jul 2020 13:30:59 -0700 (PDT)
Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) (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 700773A0AEF for <quic@ietf.org>; Wed, 15 Jul 2020 13:30:59 -0700 (PDT)
Received: by mail-lj1-x233.google.com with SMTP id x9so4171821ljc.5 for <quic@ietf.org>; Wed, 15 Jul 2020 13:30:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ck2mIz7tQp6xkjzHrGCz96hiu/Eo9UmIGh4pnzHvm4s=; b=R8FH9RHUMC/EFb2+Mkuf1jq5ejgbsbk5Onxqv68qGYOfeApF0P5x98RK0zKM40hK1I GB/+CGnLrCTxtL7sfuT8xCON/hGn81KGa1INNTcqVPUDhTiiHnB1mFNxDTS+lBvx6Iv5 3+pGae6cDj/M6ZlOZabIXJgmxAIPZ5i+UhWQGm7zzDmxtSjzfYXNOBHga8C/rDl6NN8n u2uaXtwHqoGh4VKQrh5Dqot7PbwdDiO8+zXPgi5i6W41jxKLDSUMp3Wg26/nL+LO91CN bc7SNvAfEza8egQAUz+v+fzoYIUzCysVg6QuXSmd1cgFO9MhXRwHAT5Hdd6k1925/EJd x4Hg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ck2mIz7tQp6xkjzHrGCz96hiu/Eo9UmIGh4pnzHvm4s=; b=dPUZOjpu1ySn1CkBFEQ9F9Zw+1mOfKjt05rnUM0aK4ag2XpkmGXNBBK11yoUhaiYi8 e5SzXFjxxfpMT0aC+d7ycx4yMwtdImuHb1H7kyv0IzxwKxRXBWtJyINKGR98QPfBp7xa cN5GljVWwTMJTmIGmpbBh/xJaVWeFkjkua6g8BDO0OMZjAX3NFCb+M8FDffqdDhRb97I MrBBp+x38HCoqxxlp1OQ1Rtzy0stNqu0670UQvAjKR5+ZgIh8gmUwRvhknxqk4ZaG2Uc vjE4Ls5UE2uGdo345ZSzjzJFgqK30IOrg4XAaswLlr7H1hfjsRFp5apwEByuK+NezCHw yrlQ==
X-Gm-Message-State: AOAM531pdPI4fD8VhPR+dmAo+EBj9gqA4wZigXPvZU7SRv6KVJKXIuCj rZGdrcf2gFQHiI3WqfNb6nz6NaN9uqETLRyi4Gt4hg==
X-Google-Smtp-Source: ABdhPJxxB1cIB1INTu2zmfTRsh2Sd8dyMhE4ureINMLrWK6K4aCckFv1LPf1D6LnNJGDkPz0emXJil5dnE46CP9jCDA=
X-Received: by 2002:a2e:858e:: with SMTP id b14mr411941lji.301.1594845057438; Wed, 15 Jul 2020 13:30:57 -0700 (PDT)
MIME-Version: 1.0
References: <ae21cc02-3357-40c8-a1e9-3966fdf575a5@www.fastmail.com> <20200715180231.GB9808@lubuntu> <CAKcm_gPfc3sFy0kuyTzUFk2XFMZ8NdXTd7CuNf0o0v+RXDG=xg@mail.gmail.com>
In-Reply-To: <CAKcm_gPfc3sFy0kuyTzUFk2XFMZ8NdXTd7CuNf0o0v+RXDG=xg@mail.gmail.com>
From: David Schinazi <dschinazi.ietf@gmail.com>
Date: Wed, 15 Jul 2020 13:30:46 -0700
Message-ID: <CAPDSy+4W7yqyt0musb+R+z6ODwzAhZtUsswbSbuQv5pxH5aDPw@mail.gmail.com>
Subject: Re: Need your help: different connection IDs in the same datagram
To: Ian Swett <ianswett=40google.com@dmarc.ietf.org>
Cc: Martin Thomson <mt@lowentropy.net>, IETF QUIC WG <quic@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000001ed8bd05aa80cde4"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/DEXj9MN4LRw3TFgbwKLbTDHCRWY>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 15 Jul 2020 20:31:02 -0000

As I understand this, the current draft contradicts itself: it allows
senders to coalesce packets with different CIDs, and recommends that
receivers drop them.
I'll second Ian's comment that for us either option will be easy to
implement, but I believe we should fix the contradiction in the draft
before publication.

David

On Wed, Jul 15, 2020 at 12:31 PM Ian Swett <ianswett=
40google.com@dmarc.ietf.org> wrote:

> I don't think this change would be difficult for our implementation, but I
> also don't see it as necessary.  Given where we are in the process, that
> alone argues for not changing it I believe.
>
> On Wed, Jul 15, 2020 at 2:02 PM Dmitri Tikhonov <
> dtikhonov@litespeedtech.com> wrote:
>
>> On Wed, Jul 15, 2020 at 05:23:57PM +1000, Martin Thomson wrote:
>> > There has been some opposition to the proposed resolution in PR 3870.
>> >
>> > Apparently, for some, having multiple connection IDs in the same
>> > datagram complicates processing.  I don't understand this objection.
>> > It seems to me more difficult to retain state across packets than it
>> > is to process each atomically.  I was hoping that Christian or Nick
>> > can explain more about how this affects them.
>>
>> I can provide an example from lsquic.  The datagram is parsed into
>> QUIC packets in one function, lsquic_engine_packet_in():
>>
>>
>> https://github.com/litespeedtech/lsquic/blob/v2.18.1/src/liblsquic/lsquic_engine.c#L2781L2816
>>
>> Each QUIC packet is processed by process_packet_in(), where a
>> connection is looked up:
>>
>>
>> https://github.com/litespeedtech/lsquic/blob/v2.18.1/src/liblsquic/lsquic_engine.c#L1352L1360
>>
>> The DCID check is performed lsquic_engine_packet_in(), before
>> process_packet_in() is called:
>>
>>
>> https://github.com/litespeedtech/lsquic/blob/v2.18.1/src/liblsquic/lsquic_engine.c#L2793L2806
>>
>> The DCID information is readily available in the datagram parsing
>> loop, while connection information is not.
>>
>> For lsquic to support the proposed change, it would have to remember
>> the current connection and then query it whether it is indeed the
>> owner of the next DCID (A) or look up DCID in the global hash (B):
>>
>>     conn = NULL;
>>     while (quic_packet = parse_udp(pointers)) {
>>         dcid = parse(quic_packet);
>>         if (conn)
>>         {
>>   #if VARIANT_A
>>             if (!conn_owns_scid(conn, dcid))
>>   #else
>>             if (conn != lookup_by_dcid(dcid))
>>   #endif
>>                 continue;
>>         }
>>         conn = process_packet(quic_packet);
>>     }
>>
>> Not that it could not be done, of course, but it is both extra work
>> to modify lsquic and a more inefficient mechanism: what was a simple
>> CID comparison is now a hash lookup.
>>
>> That's why I argued [1] for having solid rationale behind the change
>> rather than a personal preference.
>>
>>   - Dmitri.
>>
>> 1.
>> https://github.com/quicwg/base-drafts/issues/3800#issuecomment-656851626
>>
>>