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 <[email protected]
<mailto:[email protected]>> wrote:
Thanks Yatch! I will have those comments integrated into next version.
-------- Original message --------
From: Yasuyuki Tanaka <[email protected]
<mailto:[email protected]>>
Date: Fri, Dec 13, 2019, 12:01 AM
To: Tengfei Chang <[email protected]
<mailto:[email protected]>>
Cc: [email protected] <mailto:[email protected]>,
[email protected] <mailto:[email protected]>
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/>
——————————————————————————————————————
_______________________________________________
6tisch mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/6tisch