Re: [core] block1 size negotiation with 4.13 Request Entity Too Large

Achim Kraus <achimkraus@gmx.net> Wed, 08 July 2020 08:24 UTC

Return-Path: <achimkraus@gmx.net>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 514263A0C69 for <core@ietfa.amsl.com>; Wed, 8 Jul 2020 01:24:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 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, RCVD_IN_MSPIKE_H2=-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 (1024-bit key) header.d=gmx.net
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 vTtDxVtcbTrT for <core@ietfa.amsl.com>; Wed, 8 Jul 2020 01:24:51 -0700 (PDT)
Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 50A963A0C66 for <core@ietf.org>; Wed, 8 Jul 2020 01:24:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1594196688; bh=X/HBFLc9BZvcab2dy+2v8YkFrTOZSFZKPWI5eHiDG1s=; h=X-UI-Sender-Class:Subject:To:References:Cc:From:Date:In-Reply-To; b=XVocp/Ms32mtLhnQnlykTHrLYM8U/zxRZFFnaZFwHVlgcxQKgYYde/d7bXsJMWTAI wVZUKYPge/LuNr8OcwrNDn+AQGRKKZgc8nA+wiYyYBb5w9gcZseFrrZ6Geih9cLY2j fjp8iM5eblM5Xh83zaom8JvBwYiu8g/mX6anqX0c=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.178.45] ([94.216.241.196]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MvbBu-1kjGUw1mCc-00sfsY; Wed, 08 Jul 2020 10:24:48 +0200
To: "core@ietf.org WG" <core@ietf.org>
References: <d1315f21-4749-f762-fbe1-a9ea6985805a@simonbernard.eu>
From: Achim Kraus <achimkraus@gmx.net>
Message-ID: <189d3f1e-9c83-b1c7-d8a1-7f195265bd2d@gmx.net>
Date: Wed, 08 Jul 2020 10:24:47 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <d1315f21-4749-f762-fbe1-a9ea6985805a@simonbernard.eu>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: de-AT-frami
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:5FYy6UUoNAvTFnTmuIBFvbE+fL+RalIw0hJLf6HEzR1xbo71xya O5Py2Z6n6mcanIIth2jZx/KR8Ct+cNpnAJPUT5nugOK1Mfh95Zm1gbrxdSqQPj/BHuJp/WF v4jUvVdMKn6mBtBLrdJf+9WflWfpGQoN5Gd3xupqZFLUJlkGSemh+ICXD5afvWZGul6Rgu8 U+IE5Agh2Pgyjf5LZx+7w==
X-UI-Out-Filterresults: notjunk:1;V03:K0:iH+s5htmJis=:upDrbkhdOj6APTzdvIPfq7 r/8SABnk/YIacgMP6xjxHK481jt7UkKUZXOXcGlWgVYPTRMLqCuFgc7RD4sLAnPmkin39OknX l97FVlqiQ3oFuXaLQzN223B3zYGZoVUY2K3Ttw4eDsEQ7MNEpOynDUtMOgWT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ZQlsgUGN0npXc1u0R7I+eIE2gzZ+O438VNUN1Ub0ZrE +WvMWwvq0kDD4UxiS3OJWnidlPudqqPFK9UQ6mA==
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/UxBHJYpblREsvgXvwxRYRz5LkWo>
Subject: Re: [core] block1 size negotiation with 4.13 Request Entity Too Large
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 08 Jul 2020 08:24:53 -0000

Hi list,

over the last 3 years the two eclipse open source projects leshan
(LwM2M) and Californium (CoAP/DTLS) have received a couple of request to
implement a blockwise failover for 4.13.

Simon prepared now a PR to close this GAP. Doing so, he found, that
changing the blocksize in the middle of a transfer is easy as well.

But there my concerns have started. I don't want to create a gap in the
interoperability!

RFC 7959, section 2.0, page 7

"(If the first request uses a bigger block size than the receiver
prefers, subsequent requests will use the preferred block size.) "

section 2.3, page 11

"(The effect is that, if the server uses the smaller of (1) its
preferred block size and (2) the block size requested, all blocks for a
body use the same block size.)"

section 2.5, page 14

"Note that any reduction in the block size may mean that the second
request starts with a block number larger than one, as the first
request already transferred multiple blocks as counted in the smaller
size."

FMPOV, that are all indicators to change the blocksize only with the
first exchange. But I also miss the concrete statement about that.
So, did I overread something? What was the intention, at which exchange
should the blocksize be adapted?

For the other question about using block1 in the response without using
it in the request, I found:

section 2.5, page 15

"(Note that a 4.13 response to a request that does not employ Block1 is
a hint for the client to try sending Block1, and a 4.13 response with a
smaller SZX in its Block1 Option than requested is a hint to try a
smaller SZX.)"

Thanks in advance!

Best regards
Achim Kraus

Am 02.07.20 um 13:14 schrieb Simon Bernard:
> Hi all,
>
>    I have several questions about block1 size negotiation.
>    The specification <https://tools.ietf.org/html/rfc7959#section-2.9.3>
> says :
>
>     The present specification allows the server to return this response
>     code (4.13) at any time during a Block1 transfer to indicate that it does
>     not currently have the resources to store blocks for a transfer that
>     it would intend to implement in an atomic fashion.  It also allows
>     the server to return a 4.13 response to a request that does not
>     employ Block1 as a hint for the client to try sending Block1.
>
>     Finally, a 4.13 response to a request with a Block1 Option (control
>     usage, seeSection 2.3  <https://tools.ietf.org/html/rfc7959#section-2.3>) where the response carries a smaller SZX in
>     its Block1 Option is a hint to try that smaller SZX.
>
>    So if a client send a block1 request and server can not handle a so
> big block it can answer with 4.13 + block1 with szx option. This means
> sends me smaller block (size is given in szx option).
>
>    1) Could this kind of negotiation happen in a middle of a block1
> transfer ? or any block size negotiation (even negotiation which does
> not use 4.13) should always be done on first exchange ?
>
>     Now Imagine a client which sends a normal (not block1) request with
> a too large payload and server want this payload be sent by block1.
>
>    2) What exactly should send the server ? 4.13 or 4.13 + block1 with
> szx option ? is size1 should be used to guess the correct block size ?
>
>     The more straightforward way seems to be "4.13 +block1 with szx
> option" this way this is clear that server support block1 and it gives
> the exact size of block it want. But the rfc sounds to consider this way
> only if original request is block1 too.
>
> Thank you,
>
> Simon
>
>
> _______________________________________________
> core mailing list
> core@ietf.org
> https://www.ietf.org/mailman/listinfo/core
>