Re: [Cbor] Benjamin Kaduk's No Objection on draft-ietf-cbor-network-addresses-09: (with COMMENT)
Benjamin Kaduk <kaduk@mit.edu> Thu, 07 October 2021 19:57 UTC
Return-Path: <kaduk@mit.edu>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B45D13A0E1B; Thu, 7 Oct 2021 12:57:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.498
X-Spam-Level:
X-Spam-Status: No, score=-1.498 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, KHOP_HELO_FCRDNS=0.399, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
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 kXhqcbKkdN90; Thu, 7 Oct 2021 12:57:12 -0700 (PDT)
Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (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 209EC3A0E0B; Thu, 7 Oct 2021 12:57:11 -0700 (PDT)
Received: from kduck.mit.edu ([24.16.140.251]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 197Jv25H001589 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 7 Oct 2021 15:57:07 -0400
Date: Thu, 07 Oct 2021 12:57:01 -0700
From: Benjamin Kaduk <kaduk@mit.edu>
To: Michael Richardson <mcr+ietf@sandelman.ca>
Cc: Carsten Bormann <cabo@tzi.org>, draft-ietf-cbor-network-addresses@ietf.org, Barry Leiba <barryleiba@computer.org>, cbor@ietf.org, The IESG <iesg@ietf.org>, cbor-chairs@ietf.org
Message-ID: <20211007195701.GN4103@kduck.mit.edu>
References: <163337270139.24096.2858053457546637595@ietfa.amsl.com> <54845F41-869A-43CE-BF02-825CB728A2CA@tzi.org> <21159.1633552900@localhost> <20211006211924.GI4103@kduck.mit.edu> <10753.1633632955@localhost>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <10753.1633632955@localhost>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/3EGNZrBujw7Gh6K0bdxn10M8Ku8>
Subject: Re: [Cbor] Benjamin Kaduk's No Objection on draft-ietf-cbor-network-addresses-09: (with COMMENT)
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Oct 2021 19:57:17 -0000
On Thu, Oct 07, 2021 at 02:55:55PM -0400, Michael Richardson wrote: > > Benjamin Kaduk <kaduk@mit.edu> wrote: > > On Wed, Oct 06, 2021 at 04:41:40PM -0400, Michael Richardson wrote: > >> > >> Carsten Bormann <cabo@tzi.org> wrote: > >> >> unused_bits = (8 - (prefix_length_in_bits & 7)) % 8; > >> > >> > Well, I for one don’t like making the “simply” more complicated (*). > >> > >> I have no strong preference. > >> If I didn't have to read/write C again in my life, that would be fine. > > > I'm sure many share that sentiment :) > > okay, so > unused_bits = (8 - (prefix_length_in_bits % 8); > > produces the wrong answer (8) when it's a multiple of 8 and the answer should > be 0. > > unused_bits = (8 - (prefix_length_in_bits % 8) % 8; > > gives the right answer. Can I use that? In light of the discussion so far, that expression would be my proposal/recommendation. -Ben
- [Cbor] Benjamin Kaduk's No Objection on draft-iet… Benjamin Kaduk via Datatracker
- Re: [Cbor] Benjamin Kaduk's No Objection on draft… Michael Richardson
- Re: [Cbor] Benjamin Kaduk's No Objection on draft… Michael Richardson
- Re: [Cbor] Benjamin Kaduk's No Objection on draft… Michael Richardson
- Re: [Cbor] Benjamin Kaduk's No Objection on draft… Carsten Bormann
- Re: [Cbor] Benjamin Kaduk's No Objection on draft… Michael Richardson
- Re: [Cbor] Benjamin Kaduk's No Objection on draft… Benjamin Kaduk
- Re: [Cbor] Benjamin Kaduk's No Objection on draft… Michael Richardson
- Re: [Cbor] Benjamin Kaduk's No Objection on draft… Benjamin Kaduk
- Re: [Cbor] Benjamin Kaduk's No Objection on draft… Carsten Bormann
- Re: [Cbor] Benjamin Kaduk's No Objection on draft… Carsten Bormann