Re: [6tisch] WGLC on draft-ietf-6tisch-msf-09

Yasuyuki Tanaka <yasuyuki.tanaka@inria.fr> Fri, 13 December 2019 16:13 UTC

Return-Path: <yasuyuki.tanaka@inria.fr>
X-Original-To: 6tisch@ietfa.amsl.com
Delivered-To: 6tisch@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3C54A1200CE for <6tisch@ietfa.amsl.com>; Fri, 13 Dec 2019 08:13:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.897
X-Spam-Level:
X-Spam-Status: No, score=-6.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham 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 822yMFD_MiD7 for <6tisch@ietfa.amsl.com>; Fri, 13 Dec 2019 08:13:38 -0800 (PST)
Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) (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 B3D9912009E for <6tisch@ietf.org>; Fri, 13 Dec 2019 08:13:37 -0800 (PST)
X-IronPort-AV: E=Sophos;i="5.69,309,1571695200"; d="scan'208";a="333122220"
Received: from unknown (HELO [10.20.146.116]) ([204.239.251.70]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 13 Dec 2019 17:13:35 +0100
Cc: "6tisch@ietf.org" <6tisch@ietf.org>
To: Tengfei Chang <tengfei.chang@gmail.com>
References: <CAAdgstQS9xAtemffNY0NBA3n54rVU7vAN5f1wkWQOeD5sT4LSg@mail.gmail.com> <bfe7441c-c64b-ffea-c523-b29f387b267b@inria.fr> <-uiqdrrsjg31sdjksn1zgvki8c7kyva-wr8j14-3t84i8a2k9yk-wcvbi47ffuj7-oxvqzo-8ap9zptj9wve-flkv7mh54dm1-cfcugi-gc0trm-6gwnqdve2gcygnaih0-v2g1zxg1jmk8-i7ywds1srikj.1576227474507@email.android.com> <CAAdgstTm3CXqVAMpbeZ2XJRPLr74vO2x9aK4+0RnuO+74BgpKQ@mail.gmail.com>
From: Yasuyuki Tanaka <yasuyuki.tanaka@inria.fr>
Message-ID: <dc86b52d-d8b9-c755-44d4-ddba880a8a6a@inria.fr>
Date: Fri, 13 Dec 2019 06:13:30 -1000
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0
MIME-Version: 1.0
In-Reply-To: <CAAdgstTm3CXqVAMpbeZ2XJRPLr74vO2x9aK4+0RnuO+74BgpKQ@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/6tisch/CToJU0S7QSGMD7bOG5-sZnLBXXo>
Subject: Re: [6tisch] WGLC on draft-ietf-6tisch-msf-09
X-BeenThere: 6tisch@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discuss link layer model for Deterministic IPv6 over the TSCH mode of IEEE 802.15.4e, and impacts on RPL and 6LoWPAN such as resource allocation" <6tisch.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/6tisch>, <mailto:6tisch-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/6tisch/>
List-Post: <mailto:6tisch@ietf.org>
List-Help: <mailto:6tisch-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/6tisch>, <mailto:6tisch-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Dec 2019 16:13:40 -0000

Hi Tengfei,

If NumTX is one-byte long, which is recommended, it won't reach 256 
(MAX_NUMTX):
                                                               ...  When
    NumTx reaches MAX_NUMTX, both NumTx and NumTxAck MUST be divided by
    2.  For example, when MAX_NUMTX is set to 256, from NumTx=255 and
    NumTxAck=127, the counters become NumTx=128 and NumTxAck=64 if one
    frame is sent to the parent with an Acknowledgment received.

It would be nicer to avoid a potential coding error taking the text 
literally, checking if a 8-bit unsigned integer variable is equal to 
256, even although a smart compiler may give a warning or end with an error.

With MAX_NUMTX of 255, the resulting NumTx by division is then 127, by 
the way :-)

 > Even NumTx is recommended to use 1 byte later,  when comparing NumTx
 > and MAX_NUMTX, a casting can be applied and doesn't break 1 byte
 > torage of NumTx.

Yes, this is one of ways of implementation.

Thank you!
Yatch

On 12/13/2019 1:06 AM, Tengfei Chang wrote:
> Yatch,
> 
>  >    2.  For example, when MAX_NUMTX is set to 256, from NumTx=255 and
> --> "..., when MAX_NUMTX is set to 255, ..."
> 
> For the whole sentence,
> 
> /"when NumTx reaches MAX_NUMTX, both NumTx and NumTxAck MUST be divided 
> by 2/
> /For example, when MAX_NUMTX is set to 256, from NumTx=255 and 
> NumTxAck=127, the counters become NumTx=128 and NumTxAck=64 if one frame 
> is sent to the parent with an Acknowledgment received."/
> 
> In this case, MAX_NUMTX should be set to 256.
> 
> Even NumTx is recommended to use 1 byte later,  when comparing NumTx and 
> MAX_NUMTX, a casting can be applied and doesn't break 1 byte storage of 
> NumTx.
> 
> Tengfei
> 
> On Fri, Dec 13, 2019 at 9:57 AM Tengfei Chang <tengfei.chang@gmail.com 
> <mailto:tengfei.chang@gmail.com>> wrote:
> 
>     Thanks Yatch!  I will have those comments integrated into next version.
> 
> 
> 
>     -------- Original message --------
>     From: Yasuyuki Tanaka <yasuyuki.tanaka@inria.fr
>     <mailto:yasuyuki.tanaka@inria.fr>>
>     Date: Fri, Dec 13, 2019, 12:01 AM
>     To: Tengfei Chang <tengfei.chang@gmail.com
>     <mailto:tengfei.chang@gmail.com>>
>     Cc: 6tisch@ietf.org <mailto:6tisch@ietf.org>,
>     yasuyuki.tanaka@inria.fr <mailto:yasuyuki.tanaka@inria.fr>
>     Subject: Re: [6tisch] WGLC on draft-ietf-6tisch-msf-09
> 
>         Hi Tengfei,
> 
>         Thank you for the updates. The new version addresses my
>         comments. Here
>         are a couple of trivial comments:
> 
>          > (Section 5.1)
>          >    The node MUST maintain the following counters for the
>         selected parent
>          >    on both negotiated Tx and Rx cells:
> 
>         To my understanding, we have separate pairs of NumCellsElapsed and
>         NumCellsUsed for the negotiated TX cell and the negotiated RX
>         cell. It
>         would be better to modify the sentence a little bit like:
> 
>         --> "The node MUST maintain the following counters for each of the
>         negotiated Tx cells, and the negotiated RX cells, that are
>         scheduled
>         with the selected parent."
> 
>          > (Section 5.3)
>          >    2.  For example, when MAX_NUMTX is set to 256, from
>         NumTx=255 and
> 
>         --> "..., when MAX_NUMTX is set to 255, ..."
> 
>         Best,
>         Yatch
> 
> 
> 
> -- 
> ——————————————————————————————————————
> 
> Dr. Tengfei, Chang
> Postdoctoral Research Engineer, Inria
> 
> www.tchang.org/ <http://www.tchang.org/>
> ——————————————————————————————————————