Re: [dtn] "Block data length" field in BPbis

Matt Wronkiewicz <wronkiew@gmail.com> Thu, 31 May 2018 04:49 UTC

Return-Path: <wronkiew@gmail.com>
X-Original-To: dtn@ietfa.amsl.com
Delivered-To: dtn@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0087A12E03B for <dtn@ietfa.amsl.com>; Wed, 30 May 2018 21:49:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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 5W_fsH6wpvRY for <dtn@ietfa.amsl.com>; Wed, 30 May 2018 21:49:30 -0700 (PDT)
Received: from mail-it0-x233.google.com (mail-it0-x233.google.com [IPv6:2607:f8b0:4001:c0b::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 B788312426E for <dtn@ietf.org>; Wed, 30 May 2018 21:49:30 -0700 (PDT)
Received: by mail-it0-x233.google.com with SMTP id c5-v6so1154425itj.1 for <dtn@ietf.org>; Wed, 30 May 2018 21:49:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=cl9FsA0iX6cKabeuOvhegMbe1vbmDMGFKIiLidcBQN0=; b=HRCpQbzEG2e2RpqtspU7ahszAbmiNiYcJ6n9emDXpw9RkeO6RTEguZlCJN+LFXDiB7 /xEFdwc4Zisi8GYbnyntw76uU2VksCvUR31vlL/ubVu86zUvM0xHiyo/Q4A94etip4Ez HgIiYgYFFMPgjq4h5ooHwdkF7b/qpmr656soRt1mAdbMFtqYr3KvahNqtAuV/A2vNrzL VHLwsjav3izkRAIb7Pogwix7fbhrW0/F0Yn+iCjNLeRoPm0SQiQzh6ad8ENSofFRiAsY VOGChuwbX4hqjv3LU9UviyzNUUnKv81tHhQkjLh//qv6tShtNC+wfcyD3TXW0RxdJC0H d/hw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=cl9FsA0iX6cKabeuOvhegMbe1vbmDMGFKIiLidcBQN0=; b=pUEJ2IEJmJ4hGmN/A1zzy41dIdpojHVA6gpK1M1QSoAl+6x2ycMED+4ETl3lQ47iBY OI9LRVe93RS8P4osHU/6wjlENbAFrZNF8wRj1BUKBqK/XLSKNk53Rcaycs3aifhz1OXB +fxWKN19S57ZwiqMkiB2BZ3ABYq3qJv3vBri1+sEIXTQUj5+MGDJMsUqpIGnmP97XvHq 5H+0TqZO1wZUpwFhSOjL4PZ8BRvAvhELOc1Ii/2F6JQahEaMz9GjwrY+efP+KybK1vaJ D1mz6GseaKvvZZg7AmAWyiOvvSYGwPyFVQRx5KizhizpOAGjBtOF9WacxXmcsfIscM/r cDyQ==
X-Gm-Message-State: APt69E2ZiiNXLuDsVfkaVdB9YrlRnpV4AKZMwqBvLtEr01wJv+g0XaIm E2X8zdIMdnZjyqn0LrDYcHe7E7ENCz6T6xRinHo=
X-Google-Smtp-Source: ADUXVKIn6zpe7hl3xcUQHeWZTxEej2LX0XOti0B1XLVEF/L6YpHn6sZHErZ7YbZiouDwe+WbBfuYR1ie56VXuiaByec=
X-Received: by 2002:a24:e50d:: with SMTP id g13-v6mr4319779iti.149.1527742170082; Wed, 30 May 2018 21:49:30 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:ac0:9d83:0:0:0:0:0 with HTTP; Wed, 30 May 2018 21:49:29 -0700 (PDT)
In-Reply-To: <4B24FE9E-3A90-4069-BFAD-984D2BB48CA2@nasa.gov>
References: <ce643b57-1765-c189-0c2d-5fbe5f573548@tu-dresden.de> <9fea9811e748475c90f53130901dc383@jpl.nasa.gov> <ceff785c-50c7-0ad2-e4cc-f58e381c2d84@tu-dresden.de> <63DC029C-30D7-4C24-993A-7A92F42D225C@viagenie.ca> <c53cc640-4763-39ef-932f-9aacec80c52b@tu-dresden.de> <4B24FE9E-3A90-4069-BFAD-984D2BB48CA2@nasa.gov>
From: Matt Wronkiewicz <wronkiew@gmail.com>
Date: Wed, 30 May 2018 21:49:29 -0700
Message-ID: <CAGQjfBrF+MLmygfQ3tHq+LodZUS=o1AKf_hAFa-rhJnsrZLKXA@mail.gmail.com>
To: "Clark, Gilbert J. (GRC-LCA0)" <gilbert.j.clark@nasa.gov>
Cc: Felix Walter <felix.walter@tu-dresden.de>, Marc Blanchet <marc.blanchet@viagenie.ca>, "Burleigh, Scott C (JPL-312B)[Jet Propulsion Laboratory]" <scott.c.burleigh@jpl.nasa.gov>, "dtn@ietf.org" <dtn@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/dtn/RnDRCMMo_46wEIFrgLTJzft5y1M>
Subject: Re: [dtn] "Block data length" field in BPbis
X-BeenThere: dtn@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "Delay Tolerant Networking \(DTN\) discussion list at the IETF." <dtn.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dtn>, <mailto:dtn-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dtn/>
List-Post: <mailto:dtn@ietf.org>
List-Help: <mailto:dtn-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dtn>, <mailto:dtn-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 31 May 2018 04:49:34 -0000

Serializing canonical blocks, or just the block-specific data, has
some additional benefits.

Some intermediate nodes may need to limit the CBOR tree depth for
static analysis of memory usage. They might then encounter a bundle
with a application-specific block that has a tree depth beyond its
limit, which it otherwise would have been able to process correctly.

In the current version, canonical blocks have to be decoded just to
find the next block. Encapsulating the block-specific data reduces the
amount of parsing that needs to be done to find all the relevant
blocks. Encapsulating whole blocks would also reduce parsing and make
finding the total length faster.

I would prefer to see the CBOR array format used rather than including
an index of offsets. Adding it to the beginning of a bundle would be
messy, and adding it to the end is redundant. Also sticking with CBOR
serialization makes both the spec and the bundles more concise.

CBOR has an optional tag for serialized CBOR structures. The encoding
is specified by the protocol, so including tags is just wasted bytes.

Matt

On Wed, May 30, 2018 at 3:18 PM, Clark, Gilbert J. (GRC-LCA0)
<gilbert.j.clark@nasa.gov> wrote:
> What about e.g. an index field in the primary block that includes an array of both the offset and type of each canonical block included within that particular bundle?
>
> The ability to index directly to specific canonical blocks without needing to walk the bundle to find them at all would be nice.  It would also be useful to reduce the variance in processing time where e.g. a policy does need to be applied to a canonical block that comes later in a bundle.
>
> -Gilbert
>
> The views expressed in this mail reflect the opinions of the author.  They are, therefore, not intended to reflect official positions of NASA or the U.S. Government.
>
> On 5/30/18, 4:36 PM, "dtn on behalf of Felix Walter" <dtn-bounces@ietf.org on behalf of felix.walter@tu-dresden.de> wrote:
>
>     Marc,
>
>     yes, for intermediate nodes this requires parsing the complete CBOR
>     representation for all blocks. It also implies that a full CBOR parser
>     always has to be used because it is not known in advance which types
>     will be contained in unknown blocks.
>
>     An alternative would be to specify the "block payload" as being a single
>     CBOR byte string, containing the (serialized) block-specific data.
>     Though not as nice as having the bundle as a single large CBOR object,
>     from an implementation perspective, this is probably the simplest
>     solution. For example, the status blocks would then contain a serialized
>     CBOR array in the payload field.
>
>     Felix
>
>     Am 30.05.2018 um 21:37 schrieb Marc Blanchet:
>     > On 30 May 2018, at 15:10, Felix Walter wrote:
>     >
>     >> Scott,
>     >>
>     >> great, I think removing the field is the best solution.
>     >>
>     >
>     > much safer to have one single place for authority. However, does that
>     > require more parsing from the intermediate nodes if they need to
>     > somewhat parse some blocks for policy decisions for example?
>     >
>     > Marc.
>     >
>     >> Felix
>     >>
>     >> Am 30.05.2018 um 20:54 schrieb Burleigh, Scott C (312B):
>     >>> Felix, sorry, I am finally replying to this email: you are right
>     >>> that CBOR representation would provide all of the individual lengths
>     >>> of the block-type-specific data fields that are summed in the block
>     >>> data length field, and as such the block data length field is
>     >>> redundant.  My first impulse on re-reading your email was simply to
>     >>> revise the definition of "Block data length" as you suggest.  But on
>     >>> reflection I think it actually makes more sense to remove block data
>     >>> length from the specification and instead specifically require that
>     >>> all block-type-specific data fields appear in CBOR representation.
>     >>>
>     >>> I want to post version 11 of this specification later today, before
>     >>> version 10 expires, and at this point I plan to go ahead with
>     >>> removal of the block data length field.  If anyone has a technical
>     >>> argument to make in defense of retaining block data length in bpbis,
>     >>> please speak up this afternoon?
>     >>>
>     >>> Scott
>     >>>
>     >>> -----Original Message-----
>     >>> From: dtn <dtn-bounces@ietf.org> On Behalf Of Felix Walter
>     >>> Sent: Friday, March 23, 2018 9:22 AM
>     >>> To: dtn@ietf.org
>     >>> Subject: [dtn] "Block data length" field in BPbis
>     >>>
>     >>> Hi,
>     >>>
>     >>> We just had a short talk with Scott, Ed, and Rick about the "Block
>     >>> data length" [1] field of the canonical block in BPbis that I would
>     >>> like to forward to the list. As far as I understand it, this value
>     >>> is the count of (serialized) bytes still belonging to the block, but
>     >>> following the length field.
>     >>>
>     >>> Because CBOR is used for the block-type-specific data, the length
>     >>> field by itself is redundant. For example, in the payload block, it
>     >>> will always be followed by a "CBOR byte string" representing the
>     >>> payload data. (This contains a length as well.) It needs to be
>     >>> considered in implementations that all these length fields are
>     >>> variable-length themselves - however, this turned out to be no big
>     >>> issue. I also see the point of having the "Block data length"
>     >>> available to the parser, to be able to skip over the whole block
>     >>> data of complex extension blocks without even parsing them.
>     >>>
>     >>> Are there any further reasons for having the "Block data length"
>     >>> available which I have missed? Or does anyone have a strong opinion
>     >>> on whether this should be removed or kept?
>     >>>
>     >>> By the way, the language concerning the "Block data length" should
>     >>> probably be modified slightly as it refers to "[...] the aggregate
>     >>> length of all remaining fields of the block, i.e., the
>     >>> block-type-specific data fields.", though, this may (now) be
>     >>> followed by the CRC checksum.
>     >>>
>     >>> Felix
>     >>>
>     >>> [1] https://tools.ietf.org/html/draft-ietf-dtn-bpbis-10#section-4.2.3
>     >>>
>     >>> _______________________________________________
>     >>> dtn mailing list
>     >>> dtn@ietf.org
>     >>> https://www.ietf.org/mailman/listinfo/dtn
>     >>>
>     >>> _______________________________________________
>     >>> dtn mailing list
>     >>> dtn@ietf.org
>     >>> https://www.ietf.org/mailman/listinfo/dtn
>     >>
>     >> _______________________________________________
>     >> dtn mailing list
>     >> dtn@ietf.org
>     >> https://www.ietf.org/mailman/listinfo/dtn
>     >
>     > _______________________________________________
>     > dtn mailing list
>     > dtn@ietf.org
>     > https://www.ietf.org/mailman/listinfo/dtn
>
>
>     _______________________________________________
>     dtn mailing list
>     dtn@ietf.org
>     https://www.ietf.org/mailman/listinfo/dtn
>
>
> _______________________________________________
> dtn mailing list
> dtn@ietf.org
> https://www.ietf.org/mailman/listinfo/dtn