Re: Proposal: drop QPACK encoder stream framing

Dmitri Tikhonov <dtikhonov@litespeedtech.com> Tue, 07 August 2018 00:20 UTC

Return-Path: <dtikhonov@litespeedtech.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 932CD130E48 for <quic@ietfa.amsl.com>; Mon, 6 Aug 2018 17:20:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=litespeedtech-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 Gvv-SD-d_oYL for <quic@ietfa.amsl.com>; Mon, 6 Aug 2018 17:20:11 -0700 (PDT)
Received: from mail-qk0-x22b.google.com (mail-qk0-x22b.google.com [IPv6:2607:f8b0:400d:c09::22b]) (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 AF9E1130E3F for <quic@ietf.org>; Mon, 6 Aug 2018 17:20:11 -0700 (PDT)
Received: by mail-qk0-x22b.google.com with SMTP id x192-v6so10297170qkb.3 for <quic@ietf.org>; Mon, 06 Aug 2018 17:20:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=litespeedtech-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=x6MU2SD1ndXTg800RW/ExLNSH3bMYZj3ZVMNDRKWDsA=; b=xL9pdpL2vOLUZBhl6JSiRa+gJQ4lw5KgS2QXvMQXZMSOvImQUts2RKDpwCC57wjan+ UpbBAaHCAR9xrGM1TRFW78HUX3l/YeOEgqg1/n1MxOXdI6+DrmUB+ew9pnIZIhdj7DQi f9A/U6eTo64lN3M7uMZOLOk93FRIDEscZfcm23jKMFlwQK5OoHSda7VE80BUq4b3P5ju HoLOYHIHjYdLtPgpixEXHaxTvzYUIEyRK+ZbUFRsvv61YwbEqWQKXDHMbSfq24/xysZA U1s6bofb+0ACzWqLVebjlCYPFT8dASYO56sygUPTkAfQA0va5DaHJ0cGdrTcgOUv4JM2 /stQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=x6MU2SD1ndXTg800RW/ExLNSH3bMYZj3ZVMNDRKWDsA=; b=p59a+vtbFLysB78qrUb+r3NHjSC3hhX8Zc8O0Dv29Ql5+ictKvuD8hqo15ztNW3T2T Fg7WkXeu9Ec3LY8/0yJgwW+h1dA675KZdc9G64MfY/fd3He8Sj291LgnAB/mB6YpZWYA W6Z/KrUxHIcVc9AM/5LgvuYCQw1PU+fv0mqO1a5LtWTUh+bjJtOg5nURRQZ6qfhzChrn QjA0tHQ7d1doxDtaFpRMMuLUnzoUtZYW1iu9KteWs3UNLU/E4kulpziRyJ2D1XqT3iFZ 4tTOA/WU+Vkm0lEL4MLobQGrO/as+ghRZnOOx2g4+SfQpmSsOCXUtR+Kr8tFv1zN2P0m VaQA==
X-Gm-Message-State: AOUpUlFquezHqNPX+ZVCwZZzILQ0P0ZqOQnUDt8XuSTvFfiSsqzSYT5L hSrzl7SU+zB1vgEloyVOVzlHyg==
X-Google-Smtp-Source: AAOMgpcwLPNp/m2z0n70D3zz83/yh09ZyXevvV7Zhq3i9kTxC1J+o09R+lljlo9TYu5hwdz8gpHINg==
X-Received: by 2002:a37:14cd:: with SMTP id 74-v6mr15624932qku.184.1533601210913; Mon, 06 Aug 2018 17:20:10 -0700 (PDT)
Received: from ubuntu-dmitri (ool-44c1d219.dyn.optonline.net. [68.193.210.25]) by smtp.gmail.com with ESMTPSA id c11-v6sm9730028qkb.22.2018.08.06.17.20.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Aug 2018 17:20:10 -0700 (PDT)
Date: Mon, 6 Aug 2018 20:20:05 -0400
From: Dmitri Tikhonov <dtikhonov@litespeedtech.com>
To: Alan Frindell <afrind@fb.com>, Kazuho Oku <kazuhooku@gmail.com>, Martin Thomson <martin.thomson@gmail.com>, QUIC WG <quic@ietf.org>
Subject: Re: Proposal: drop QPACK encoder stream framing
Message-ID: <20180807002003.GA24583@ubuntu-dmitri>
Mail-Followup-To: Alan Frindell <afrind@fb.com>, Kazuho Oku <kazuhooku@gmail.com>, Martin Thomson <martin.thomson@gmail.com>, QUIC WG <quic@ietf.org>
References: <20180607151112.GA28823@ubuntu-dmitri> <CABkgnnXbfkVbq6vCvud100h6wr3+9ir3iO7dD6-qaykOmK3JBQ@mail.gmail.com> <CANatvzzzXF8WCXgDCahTa_7JWZ1c1i-9rU_c8c9QWk5_O5u4Ow@mail.gmail.com> <F04D1BA6-8EC6-43EB-ABEC-34C4B30352AB@fb.com> <20180609155530.GA6795@ubuntu-dmitri>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20180609155530.GA6795@ubuntu-dmitri>
User-Agent: Mutt/1.5.24 (2015-08-30)
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/x3jPleoQfah0Das__VDzm5utYlE>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.27
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: Tue, 07 Aug 2018 00:20:14 -0000

On Sat, Jun 09, 2018 at 11:55:30AM -0400, Dmitri Tikhonov wrote:
> And I hope I have demonstrated that the complexity increase is
> minimal.  Soon, I will demonstrate the same using C code.

Here is working code.  The function lsqpack_enc_dec_in() ingests
the next chunk of the encoder stream -- any number of bytes.  It
never buffers any of the bytes it reads; nor does it reparse.

https://github.com/litespeedtech/ls-qpack/blob/e5fd044d52c3a9c6b0891993e3f7ec9f3f7274cb/src/lsqpack.c#L3174

The increase in complexity -- saving state -- is offset handsomely
by not having to buffer anything inside or outside the QPACK library.
This makes the interface simple: have more encoder bytes? pass them
to the decoder.

  - Dmitri.