Re: [6tisch] Questions on TSCH CSMA-CA retransmission algorithm in IEEE 802.15.4-2015

Yasuyuki Tanaka <yasuyuki.tanaka@inria.fr> Fri, 22 June 2018 15:52 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 3E9EE130EA6 for <6tisch@ietfa.amsl.com>; Fri, 22 Jun 2018 08:52:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.9
X-Spam-Level:
X-Spam-Status: No, score=-6.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5] 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 BXd7Siw4AEWO for <6tisch@ietfa.amsl.com>; Fri, 22 Jun 2018 08:52:40 -0700 (PDT)
Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) (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 2DC97130E96 for <6tisch@ietf.org>; Fri, 22 Jun 2018 08:52:40 -0700 (PDT)
X-IronPort-AV: E=Sophos;i="5.51,257,1526335200"; d="scan'208";a="332950435"
Received: from stone.yatchpotch.org (HELO [10.8.0.2]) ([27.120.103.181]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jun 2018 17:52:33 +0200
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\))
From: Yasuyuki Tanaka <yasuyuki.tanaka@inria.fr>
In-Reply-To: <23340.65260.93293.26087@fireball.acr.fi>
Date: Fri, 22 Jun 2018 17:52:27 +0200
Cc: Yasuyuki Tanaka <yasuyuki.tanaka@inria.fr>, 6tisch@ietf.org
Content-Transfer-Encoding: 7bit
Message-Id: <51985800-E995-438D-A691-00B483C7CBD0@inria.fr>
References: <FC00A9BD-16FC-4E54-8B73-C76CAA035138@inria.fr> <23338.24307.310204.951524@fireball.acr.fi> <3DD8D1A9-9A2C-4D95-A8F5-3773F2E3FF53@inria.fr> <4C7D8FC5-1228-4693-8A8F-F24AF5765F6B@inria.fr> <23340.65260.93293.26087@fireball.acr.fi>
To: Tero Kivinen <kivinen@iki.fi>
X-Mailer: Apple Mail (2.3445.8.2)
Archived-At: <https://mailarchive.ietf.org/arch/msg/6tisch/uovdjvzhW4OSyQcCHrgC7vzjfMM>
Subject: Re: [6tisch] Questions on TSCH CSMA-CA retransmission algorithm in IEEE 802.15.4-2015
X-BeenThere: 6tisch@ietf.org
X-Mailman-Version: 2.1.26
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, 22 Jun 2018 15:52:44 -0000

Thank you, Tero!!

tero> I.e., the text this refers to ("A device upon encountering a
tero> transmission failure in a shared link shall initialize the BE to
tero> macMinBe.") is on page 66, not in page 65.

OK, we're on the same page now :-)

tero> Note, that CCA will NOT fail for other tsch transmissions on the
tero> slot, as those transmissions all start at the same time, thus
tero> there is no way to detect them. 

Right, it won't. This is another interesting point of TSCH. I learned
this from Thomas 1.5 years ago.

   https://mailarchive.ietf.org/arch/msg/6tisch/E8IDY4-dkuPMIjD3rh54bGdaQ80

By the way, it seems I misunderstood what you told me two days ago:

tero>> if CCA fails, we just assume the sending of the frame failed,
tero>> increment NB (which has slightly different meaning than in 6-5
tero>> here) and try again.

I thought, it meant "CCA failure is treated as a transmission failure
in *Figure 6-5*". This is wrong. But it does for figure 6-6; CCA
failure is treated in the same manner for retransmission failure (no ACK)
in figure 6-6. Oh, I am very clear!

tero> If TschCca is not set we skip CCA, regardless wheter this is
tero> shared or dedicated link. In initial tranmission we do CCA for
tero> shared links always, and for dedicated links we check TschCca.

That's good to know! I totally overlooked this part!!

tero> I think it is clear from the figures 6-5 and 6-6. Note, that
tero> figures in standard are normative.

Thanks to you, figure 6-5 and 6-6 are my friends now.

One question for clarification: if a node gets out of the CSMA-CA
algorithm (figure 6-5) with NB == (macMaxFrameRetries - 1) and doesn't
receive an ACK to a frame transmitted over a shared link, it enters
the TSCH Retransmission backoff algorithm (figure 6-6) keeping the NB
value. Then, this node can attempt only one retransmission at most,
because NB reaches macMaxFrameRetries by one retransmission failure
(no ACK or channel busy). This is correct, isn't it?

And, I'd suggest one correction in figure 6-6.

tero>> Hmm... it seems we did have sponsor ballot comment i-9 from Pat
tero>> Kinney which included part saying:
tero>>
tero>>        8. In box 'NB = NB +1, BE = min(BE-1, macMinBe) change
tero>>        'BE = min(BE-1, macMinBe)' to 'BE = min(BE+1, macMaxBe)'
tero>>        to correspond with page 31 text.

In fact, 'BE = min(BE+1, macMaxBe)' should be applied if and only if a
retransmission fails in a shared link. Then, we would need a decision
box having 'shared link?' above the BE update. If it goes to 'Y', then
execute 'BE = min(BE+1, macMaxBe)'. Otherwise, keep the current BE
value.

tero> On the other hand there is no reason why I should not be able to
tero> use dedicated link to B to send the frame to it even when it is
tero> not first in queue. I think this kind of text is explictly left
tero> out from the standard, i.e., there is nothing saying it is
tero> allowed, but there is nothing saying you cannot do it.

To my knowledge, this kind of operation commonly happens in 6TiSCH
implementations which implement the following protocols:

  https://tools.ietf.org/html/draft-ietf-6tisch-6top-protocol-12#section-3.1
  https://tools.ietf.org/html/draft-chang-6tisch-msf-01#section-2

tero> This of course means that NB variables needs to be per frame,
tero> but on the otherhand we want the BE to be global, not per frame,
tero> and this is not really reflected in the figure now.

It'd be really great if we could have some text on such a case.

Here is a little input: MSF allocates dedicated *cells* having SHARED
bit on, and a node could have multiple frames under retransmission
processes. I have no idea if having one global BE would be enough for
this case.

tero> So even if we managed to send last frame using the dedicated
tero> link, we should keep the large BE value as we have not
tero> successfully used shared link, so there is no point of lowering
tero> it yet.

Oh, it eventually comes back to one of my first questions :-)

yatch>>> I'm not sure, after all the retransmissions for the last
yatch>>> frame in shared links failed, the next retransmission process
yatch>>> should reset BE or not. What about the case when the
yatch>>> transmission for the last frame in a dedicated link was
yatch>>> successful but the transmission queue was NOT empty?

According to discussions so far and the figures, the answer is that BE
should always be reset when it enters the retransmission
algorithm....

tero> I think this is trying to say that if we go to the idle state,
tero> i.e., we have no longer frames going out in queue, then there is
tero> no point of keep the large BE even if we managed to clear the
tero> queue using dedicated cell. I.e., if the queue goes empty we
tero> reset everything related to the retranmission timing.

...yet, part of this different idea is written in the text, which
confused me... :-/

Have a wonderful weekend!

Best,
Yatch