Re: [lp-wan] ACK compression

Olivier Gimenez <ogimenez@semtech.com> Mon, 19 August 2019 07:56 UTC

Return-Path: <ogimenez@semtech.com>
X-Original-To: lp-wan@ietfa.amsl.com
Delivered-To: lp-wan@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 29F76120110 for <lp-wan@ietfa.amsl.com>; Mon, 19 Aug 2019 00:56:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-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 nXKUahqJwfzV for <lp-wan@ietfa.amsl.com>; Mon, 19 Aug 2019 00:56:18 -0700 (PDT)
Received: from mail1.bemta23.messagelabs.com (mail1.bemta23.messagelabs.com [67.219.246.215]) (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 1CBB71200C5 for <lp-wan@ietf.org>; Mon, 19 Aug 2019 00:56:18 -0700 (PDT)
Received: from [67.219.246.197] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-3.bemta.az-c.us-east-1.aws.symcld.net id 34/06-13824-1265A5D5; Mon, 19 Aug 2019 07:56:17 +0000
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrOKsWRWlGSWpSXmKPExsXiofbjua5CWFS swYZnKhZvZtk7MHosWfKTKYAxijUzLym/IoE1483bA+wF3z8xVvQ1XmBvYHxzmbGLkYtDSOAR o8SXFT+ZIZwXjBK9N2ZCOTsZJR4/3c/SxcjJwSagI/H/+SxWEFtEQF1iy6MmdhBbWEBGYtWDK ewQcVmJ+Wf/QtUYSaw6+40NxGYRUJW4vucrmM0rYCUxd8URRhCbUUBM4vupNUwgNrOAuMStJ/ PBbAkBAYkle84zQ9iiEi8f/2MFOUhCYBqzxJQvXWwQCS6Jo/8nskLYChIb7/9hgRiUKHF89id 2iGWCEidnPgGLCwkoSrROW8g8gVFkFpJ9s5C0zELSAhHXkViw+xMbhK0tsWzha2YY+8yBx0zI 4gsY2VcxmiUVZaZnlOQmZuboGhoY6BoaGuma6BqamuslVukm65UW66YmFpfoGuollhfrFVfmJ uek6OWllmxiBMZgSgHL3B2Mf2a+0TvEKMnBpCTKqzArPFaILyk/pTIjsTgjvqg0J7X4EKMMB4 eSBO+hkKhYIcGi1PTUirTMHGA6gElLcPAoifDOCwVK8xYXJOYWZ6ZDpE4x2nNMeDl3ETPHwaP zgOTHVUuA5HcQKcSSl5+XKiXOmwvSJgDSllGaBzcUlr4uMcpKCfMyMjAwCPEUpBblZpagyr9i FOdgVBLmfQZyG09mXgnc7ldAZzEBnbX7cCTIWSWJCCmpBqaAy4/fXyhZd4Rt05IIQVfJfF6HS z/j6ovuVDu82u8avq5/2nQ7nn2z242C8te9bZdfsC544543+4XDHe5r8vNsSYrLr2h+9+H53q J9SSssVLVmMiwIlikInFH68+nfx2f3+Xx9lfUoLPBVTJZJyfVn0una56Ua1Uun9v28+2Hjzei N1u1Xt26enGdyoSCgPStRS4fRZf+uWUqyZ5ItBF7ZZbq6mMclNdZHFl/sZFAz4Lx8r9/2FHfS YotY60NbT5pWb7kRtD3t7Q9zm7KDN8Xt1n9PrrysUJFd89ytS37RsUYR78ZYjbUXvkzn+b8v6 qVwVqHA4XlnX8881pgxn0NHc3+doYUEZ/Nn3byCICWW4oxEQy3mouJEABLbcIPaAwAA
X-Env-Sender: ogimenez@semtech.com
X-Msg-Ref: server-25.tower-405.messagelabs.com!1566201375!1037141!1
X-Originating-IP: [72.38.248.231]
X-SYMC-ESS-Client-Auth: outbound-route-from=pass
X-StarScan-Received:
X-StarScan-Version: 9.43.9; banners=semtech.com,-,-
X-VirusChecked: Checked
Received: (qmail 9011 invoked from network); 19 Aug 2019 07:56:16 -0000
Received: from s72-38-248-231.static.datacom.cgocable.net (HELO ca01exedge1.semnet.dom) (72.38.248.231) by server-25.tower-405.messagelabs.com with ECDHE-RSA-AES256-SHA384 encrypted SMTP; 19 Aug 2019 07:56:16 -0000
Received: from ca01mail2.semnet.dom (10.2.50.41) by ca01exedge1.semnet.dom (192.168.34.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1034.26; Mon, 19 Aug 2019 03:56:11 -0400
Received: from ca01mail2.semnet.dom (10.2.50.41) by ca01mail2.semnet.dom (10.2.50.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.26; Mon, 19 Aug 2019 03:56:14 -0400
Received: from ca01mail2.semnet.dom ([fe80::fdc8:c457:b09e:605d]) by ca01mail2.semnet.dom ([fe80::fdc8:c457:b09e:605d%22]) with mapi id 15.01.1034.026; Mon, 19 Aug 2019 03:56:14 -0400
From: Olivier Gimenez <ogimenez@semtech.com>
To: "lp-wan@ietf.org" <lp-wan@ietf.org>
Thread-Topic: ACK compression
Thread-Index: AdUE7aZN8HG1sFipRdueWi+g9sViUxRc3wGA
Date: Mon, 19 Aug 2019 07:56:14 +0000
Message-ID: <5af4d5c1c10946cb826be465b79e0980@semtech.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-dg-ref: PG1ldGE+PGF0IG5tPSJib2R5Lmh0bWwiIHA9ImM6XHVzZXJzXG9naW1lbmV6XGFwcGRhdGFccm9hbWluZ1wwOWQ4NDliNi0zMmQzLTRhNDAtODVlZS02Yjg0YmEyOWUzNWJcbXNnc1xtc2ctY2Y2YWJhNzEtYzI1Ni0xMWU5LWI1ZmQtZTRiMzE4NjYzZWUxXGFtZS10ZXN0XGNmNmFiYTcyLWMyNTYtMTFlOS1iNWZkLWU0YjMxODY2M2VlMWJvZHkuaHRtbCIgc3o9IjIxODI0IiB0PSIxMzIxMDY3NDk3MjQ5NTY2MTAiIGg9ImZ5ZC85b2x0bEZTS2l3V0JMSHRXcUNBZFY5bz0iIGlkPSIiIGJsPSIwIiBibz0iMSIvPjwvbWV0YT4=
x-dg-rorf:
x-originating-ip: [10.144.16.33]
Content-Type: multipart/alternative; boundary="_000_5af4d5c1c10946cb826be465b79e0980semtechcom_"
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/lp-wan/Y_8OtbxwFL0Ed-YIuIKWmX9N4Hk>
Subject: Re: [lp-wan] ACK compression
X-BeenThere: lp-wan@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Low-Power Wide Area Networking \(LP-WAN\), also known as LPWA or Low-Rate WAN \(LR-WAN\)" <lp-wan.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/lp-wan>, <mailto:lp-wan-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/lp-wan/>
List-Post: <mailto:lp-wan@ietf.org>
List-Help: <mailto:lp-wan-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/lp-wan>, <mailto:lp-wan-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 19 Aug 2019 07:56:21 -0000

Dear,

It has not been a lot of discussion on that topic, here is my proposition. My changes are underlined and in italic (3rd bullet of first paragraph, added 3 figures)

Please see my first email, quoted at the end of my email for the context.


Best regards
Olivier

8.3.2.1.  Bitmap Compression

   For transmission, the Compressed Bitmap in the SCHC ACK message is
   defined by the following algorithm (see Figure 16 for a follow-along
   example):


*         Build a temporary SCHC ACK message that contains the Header followed by the original Bitmap (see Section 8.2.2.3 for a description of Bitmaps).

*         Position scissors at the end of the Bitmap, after its last bit.

*         While the bit on the left of the scissors is the same than the last SCHC bit and belongs to the Bitmap, keep moving left, then stop.  When this is done,

*         While the scissors are not on an L2 Word boundary of the SCHC ACK  message and there is a Bitmap bit on the right of the scissors,  keep moving right, then stop.

*         At this point, cut and drop off any bits to the right of the scissors

   When one or more bits have effectively been dropped off as a result
   of the above algorithm, the SCHC ACK message is a multiple of L2
   Words, no padding bits will be appended.

Because the SCHC Fragment sender knows the size of the original
   Bitmap, it can reconstruct the original Bitmap from the Compressed
   Bitmap received in the SCH ACK message.

   Figure 16 shows an example where L2 Words are actually bytes and
   where the original Bitmap contains 17 bits, the last 15 of which are
   all set to 1.

   |---- SCHC ACK Header ----|--------      Bitmap     --------|
             |-- T --|-M-| 1 |
   +--- ... -+- ... -+---+---+---------------------------------+
   | Rule ID |  DTag | W |C=0|1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1|
   +--- ... -+- ... -+---+---+---------------------------------+
           next L2 Word boundary ->|

            Figure 16: SCHC ACK Header plus uncompressed Bitmap - Trailing 1 compression

   Figure 17 shows that the last 14 bits are not sent.

   |---- SCHC ACK Header ----|CpBmp|
             |-- T --|-M-| 1 |
   +--- ... -+- ... -+---+---+-----+
   | Rule ID |  DTag | W |C=0|1 0 1|
   +--- ... -+- ... -+---+---+-----+
           next L2 Word boundary ->|

       Figure 17: Resulting SCHC ACK message with Compressed Bitmap - Trailing 1 compression

   Figure 18 shows an example of a SCHC ACK with tile indices ranging
   from 6 down to 0, where the Bitmap indicates that the second and the
   fourth tile of the window have not been correctly received.

   |---- SCHC ACK Header ----|--- Bitmap --|
             |-- T --|-M-| 1 |6 5 4 3 2 1 0| (tile #)
   +---------+-------+---+---+-------------+
   | Rule ID |  DTag | W |C=0|1 0 1 0 1 1 1|      uncompressed Bitmap
   +---------+-------+---+---+-------------+
       next L2 Word boundary ->|<-- L2 Word -->|

   +---------+-------+---+---+-------------+~~~+
   | Rule ID |  DTag | W |C=0|1 0 1 0 1 1 1|Pad|  transmitted SCHC ACK
   +---------+-------+---+---+-------------+~~~+
       next L2 Word boundary ->|<-- L2 Word -->|

          Figure 18: Example of a SCHC ACK message, missing tiles


   Figure 19 shows an example of a SCHC ACK with FCN ranging from 6 down
   to 0, where integrity check has not been performed or has failed and
   the Bitmap indicates that there is no missing tile in that window.

   |---- SCHC ACK Header ----|--- Bitmap --|
             |-- T --|-M-| 1 |6 5 4 3 2 1 0| (tile #)
   +---------+-------+---+---+-------------+
   | Rule ID |  DTag | W |C=0|1 1 1 1 1 1 1|  with uncompressed Bitmap
   +---------+-------+---+---+-------------+
       next L2 Word boundary ->|

   +--- ... -+- ... -+---+---+-+
   | Rule ID |  DTag | W |C=0|1|                  transmitted SCHC ACK
   +--- ... -+- ... -+---+---+-+
       next L2 Word boundary ->|

         Figure 19: Example of a SCHC ACK message, no missing tile



   Figure 20 shows an example where L2 Words are actually bytes and where the original Bitmap contains 17 bits, the last 6 of which are all set to 0 due to missing tiles.

   |---- SCHC ACK Header ----|--------      Bitmap     --------|
             |-- T --|-M-| 1 |
   +--- ... -+- ... -+---+---+---------------------------------+
   | Rule ID |  DTag | W |C=0|1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0|
   +--- ... -+- ... -+---+---+---------------------------------+
           next L2 Word boundary ->|

            Figure 20: SCHC ACK Header plus uncompressed Bitmap - Trailing 0 compression

   Figure 21 shows that the last 6 bits are not sent.

   |---- SCHC ACK Header ----|CpBmp|
             |-- T --|-M-| 1 |
   +--- ... -+- ... -+---+---+-----+
   | Rule ID |  DTag | W |C=0|1 1 1 1 1 1 1 1 1 1 1 1 |
   +--- ... -+- ... -+---+---+-----+
           next L2 Word boundary ->|

       Figure 21: Resulting SCHC ACK message with Compressed Bitmap - Trailing 0 compression




From: Olivier Gimenez
Sent: 07 May 2019 18:15
To: lp-wan@ietf.org
Subject: ACK compression

Dear,

In the discussion following the draft-ietf-lpwan-schc-over-lorawan v04 with Dominique Barthel we are wondering if an improvement can be made:
In the LoRaWAN profile, from device to SCHC gateway, we tried to minimise the number of windows in order to minimise the number of required downlinks. This has a side effect:  bitmap can be up to 16 bytes.

Let's assume that the profile does not allow to put the last tile in the all-1 message.
Fragment 1:   | ruleId=b'000000 | Dtag=b'0 | W= b'00 | FCN=126 | 4 tiles |               => Receiver's bitmap b'1111 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
Fragment 2:   | ruleId=b'000000 | Dtag=b'0 | W= b'00 | FCN=122 | 4 tiles |               => Lost, receiver's bitmap stays unchanged
Fragment 3:   | ruleId=b'000000 | Dtag=b'0 | W= b'00 | FCN=118 | 4 tiles |               => Received, receiver's bitmap becomes b'1111 0000 1111 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
Fragment 4:   | ruleId=b'000000 | Dtag=b'0 | W= b'00 | FCN=114 | 4 tiles |                  => Lost, receiver's bitmap stays unchanged
Fragment 5 - All 1:   | ruleId=b'000000 | Dtag=b'0 | W= b'00 | FCN=127 | MIC |         => Received, MIC is wrong, receiver returns ACK
ACK :                | ruleId=b'000000 | Dtag=b'0 | W= b'00 | C=0 | bitmap = b'1111 0000 1111 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | => Compression will not reduce the bitmap size in this case

What we are thinking is to allow compression of trailing bits also for 0 with the same rule than 1, which will result in the ACK:
Compressed ACK :                | ruleId=b'000000 | Dtag=b'0 | W= b'00 | C=0 | bitmap = b'1111 0000 1111 00

The sender knows how many tiles have been send, so it can resend tiles 122->119 and 114>111. What are your thoughts ?

Thank you

Best regards
Olivier

To view our privacy policy, including the types of personal information we collect, process and share, and the rights and options you have in this respect, see www.semtech.com/legal.