Re: Idea for packet numbers

Dmitri Tikhonov <dtikhonov@litespeedtech.com> Tue, 25 July 2017 16:27 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 36FC5131D1D for <quic@ietfa.amsl.com>; Tue, 25 Jul 2017 09:27:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.601
X-Spam-Level:
X-Spam-Status: No, score=-2.601 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-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 P2d66jHxYayK for <quic@ietfa.amsl.com>; Tue, 25 Jul 2017 09:27:12 -0700 (PDT)
Received: from mail-qk0-x236.google.com (mail-qk0-x236.google.com [IPv6:2607:f8b0:400d:c09::236]) (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 684D9131D18 for <quic@ietf.org>; Tue, 25 Jul 2017 09:27:12 -0700 (PDT)
Received: by mail-qk0-x236.google.com with SMTP id d145so65246085qkc.2 for <quic@ietf.org>; Tue, 25 Jul 2017 09:27:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=litespeedtech-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=aHegjIQx5ijg32UUzKx+uFq1Ti7v2y1IeEDlbCMpqUQ=; b=2IlQussujDdAm2xroikslTokm/Rzj+28J0kd6GWYhAqLSqIoXUuA9uuqxGJrS4zq9g Yj3kPbZiv+kcdC+GH12fV+VOLYUWFccJhhts5Xxi/s4iXWEWbASd8UCGSf2fDDvB3fXY CXWWidZN3SaeICVLk1onRKfPBgeCqjiMleiOq72V4YpVQcry93n8JRvE6v/Lr+ShZYys GUto4iML6RI7yTN2n8qwJramM7zxER2WQPGRFfT+kPbDBFCQwdnvkrntBF7ELlyvlEwv FlnCqnijAHjn8SxlT8M1jSnc0ep90FWi2/CUJPtjguN3iim84MU5hwAMbBHBl3w8RKd3 06/A==
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:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=aHegjIQx5ijg32UUzKx+uFq1Ti7v2y1IeEDlbCMpqUQ=; b=U8oXSR9RBgBN4PLgdZj4uMkNYxHapg9Kv4NnG+FvlIGDrS271x9buqfrdK9K45u2tH QjhRLdJ3O0sCNifs8pBy9fD7zymhdWYXovcSdYO7MxsZ0AWa25d/9ITp5GFdRnKDGhJA +JKl+7E2ooUMbfOM+tBtE1TuFyv9MDtigK36AhrZbnM7pjncCH8RcviHGlICfkbsnK7P FYRrvexlZOY41JSK4Q1efLu/hRGhlWEHOkqYkKSA3wGwb1Km8kxm/kWhhvCNOvtIw4hh RC6OXcnmG65Rb+m6z/lpUU1ZYFQo1w1S93D9vprBk7vUAOyeC4mJTYV2trHHPUNIX3Q3 gY1g==
X-Gm-Message-State: AIVw111CZxEeQaMmAT1Wr45Mi/JwoQy0doCUtPqqHriUGD7bV752Y0vP JmwHnmRUIk/NxVsz
X-Received: by 10.55.33.195 with SMTP id f64mr26421802qki.208.1501000031477; Tue, 25 Jul 2017 09:27:11 -0700 (PDT)
Received: from ubuntu-dmitri (ool-2f1636b6.static.optonline.net. [47.22.54.182]) by smtp.gmail.com with ESMTPSA id e32sm10115263qtb.63.2017.07.25.09.27.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jul 2017 09:27:10 -0700 (PDT)
Date: Tue, 25 Jul 2017 12:27:01 -0400
From: Dmitri Tikhonov <dtikhonov@litespeedtech.com>
To: "Swindells, Thomas (Nokia - GB/Cambridge, UK)" <thomas.swindells@nokia.com>
Cc: Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>, Magnus Westerlund <magnus.westerlund@ericsson.com>, IETF QUIC WG <quic@ietf.org>
Subject: Re: Idea for packet numbers
Message-ID: <20170725162701.GA4414@ubuntu-dmitri>
References: <c7941a67-6eaa-cd58-d0e2-a764478aa5b0@ericsson.com> <CAN1APdfwCoEieon8H98TOXBmsiwoHQfpsknfMB4hteU5gi9sMg@mail.gmail.com> <20170721093732.GA31705@ubuntu-dmitri> <DB5PR07MB1237B7C130AE23585EFF4CB084B80@DB5PR07MB1237.eurprd07.prod.outlook.com> <20170725124109.GA1764@ubuntu-dmitri> <DB5PR07MB1237128AE49E9EC81EC0A43984B80@DB5PR07MB1237.eurprd07.prod.outlook.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <DB5PR07MB1237128AE49E9EC81EC0A43984B80@DB5PR07MB1237.eurprd07.prod.outlook.com>
User-Agent: Mutt/1.5.24 (2015-08-30)
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/7Kfe0tz3vERlT3rtfQfxTka4PSM>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.22
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, 25 Jul 2017 16:27:14 -0000

On Tue, Jul 25, 2017 at 02:28:52PM +0000, Swindells, Thomas (Nokia - GB/Cambridge, UK) wrote:
> 4 wasn't meant to imply how you queue the packet on the NIC - I was
> assuming via a kernel API call into normal udp send buffers, but both
> methods are valid.  You are right though there is the potential for the
> queuing operation to be blocked/rejected.

Since we were talking about implementation, I wanted to point out that
packet number allocation is more complicated in practice.  I realize
this is not what you meant. :)

> As I understand it the packet number is used in the encryption process,
> so changing a packets number is a non-trivial operation.  A fast path
> route for queuing acks makes sense, again however the only real way
                                                        ^^^^^^^^^^^^^

By this, do you mean "without encrypting data twice?"

> to do that would be to give the ack packet a higher packet number but
> then send it before lower marked packets - even potentially if they
> do also contain ack frames.

That is a good approach if it does not break packet number derivation.
I am not sure whether it can...  The draft says:

  " A packet number is decoded by finding the packet number
  " value that is closest to the next expected packet.

Thus, after receiving ACK packet with large gap, which is the next
expected packet number from the point of view of the peer?

> For RST_STREAM I think it is permitted that currently queued packets
> are still sent, but if they only contain that streams packets then
> it is a beneficial optimization if they weren't sent (leaving packet
> number gaps).

Current draft says:

  " An endpoint that receives a RST_STREAM frame (and which
  " has not sent a FIN or a RST_STREAM) MUST immediately
  " respond with a RST_STREAM frame, and MUST NOT send any
  " more data on the stream.

I suppose one could interpret "send" to mean "enqueue," but I would
err on the side of caution.

  - Dmitri.