Re: [6lowpan] LoWPAN simple fragment Recovery

"Pascal Thubert (pthubert)" <pthubert@cisco.com> Wed, 17 June 2009 09:16 UTC

Return-Path: <pthubert@cisco.com>
X-Original-To: 6lowpan@core3.amsl.com
Delivered-To: 6lowpan@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 8A24628C19E for <6lowpan@core3.amsl.com>; Wed, 17 Jun 2009 02:16:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.565
X-Spam-Level:
X-Spam-Status: No, score=-7.565 tagged_above=-999 required=5 tests=[AWL=-1.566, BAYES_00=-2.599, J_CHICKENPOX_14=0.6, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OE6LHmNiFeqR for <6lowpan@core3.amsl.com>; Wed, 17 Jun 2009 02:16:47 -0700 (PDT)
Received: from sj-iport-1.cisco.com (sj-iport-1.cisco.com [171.71.176.70]) by core3.amsl.com (Postfix) with ESMTP id 98C4D28C19D for <6lowpan@ietf.org>; Wed, 17 Jun 2009 02:16:47 -0700 (PDT)
X-IronPort-AV: E=Sophos;i="4.42,235,1243814400"; d="scan'208";a="201250145"
Received: from ams-dkim-2.cisco.com ([144.254.224.139]) by sj-iport-1.cisco.com with ESMTP; 17 Jun 2009 09:16:58 +0000
Received: from ams-core-1.cisco.com (ams-core-1.cisco.com [144.254.224.150]) by ams-dkim-2.cisco.com (8.12.11/8.12.11) with ESMTP id n5H9Gwcj012709; Wed, 17 Jun 2009 11:16:58 +0200
Received: from xbh-ams-331.emea.cisco.com (xbh-ams-331.cisco.com [144.254.231.71]) by ams-core-1.cisco.com (8.13.8/8.13.8) with ESMTP id n5H9GvTI002657; Wed, 17 Jun 2009 09:16:57 GMT
Received: from xmb-ams-337.cisco.com ([144.254.231.82]) by xbh-ams-331.emea.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 17 Jun 2009 11:16:57 +0200
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Wed, 17 Jun 2009 11:16:51 +0200
Message-ID: <7892795E1A87F04CADFCCF41FADD00FC07A4CD55@xmb-ams-337.emea.cisco.com>
In-Reply-To: <38E78DEA-5DD3-46DF-9782-32B53B2F1F60@tzi.org>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: [6lowpan] LoWPAN simple fragment Recovery
Thread-Index: AcnvE/8kJCaRMuJTRyO8jU2VvjoVRAABJ6Ew
References: <D4DFC5FB-2185-40E5-AAA1-7D82422C5DAD@cisco.com> <7892795E1A87F04CADFCCF41FADD00FC07A4CC07@xmb-ams-337.emea.cisco.com> <38E78DEA-5DD3-46DF-9782-32B53B2F1F60@tzi.org>
From: "Pascal Thubert (pthubert)" <pthubert@cisco.com>
To: Carsten Bormann <cabo@tzi.org>
X-OriginalArrivalTime: 17 Jun 2009 09:16:57.0771 (UTC) FILETIME=[5D2EAFB0:01C9EF2C]
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; l=3488; t=1245230218; x=1246094218; c=relaxed/simple; s=amsdkim2001; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=pthubert@cisco.com; z=From:=20=22Pascal=20Thubert=20(pthubert)=22=20<pthubert@ci sco.com> |Subject:=20RE=3A=20[6lowpan]=20LoWPAN=20simple=20fragment= 20Recovery |Sender:=20; bh=kDJplMHir+Szt2BO2Owx/Z97bu+63wCHpH+Fm3PTYrs=; b=vjRa2Q1emh3DrS6NhnZ2t+kqr3v4i6wG2bk8B62iONUWNWpyLrlaq/Fikb +jBVIi72gbxcooVWB3bJ8PpBrjI4zZoHcK/PpYKw/sQMNJpqa80z2ML5T0kX gIOLEKjqC0;
Authentication-Results: ams-dkim-2; header.From=pthubert@cisco.com; dkim=pass ( sig from cisco.com/amsdkim2001 verified; );
Cc: draft-thubert-6lowpan-simple-fragment-recovery@tools.ietf.org, 6lowpan@ietf.org, "Fred Baker (fred)" <fred@cisco.com>
Subject: Re: [6lowpan] LoWPAN simple fragment Recovery
X-BeenThere: 6lowpan@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Working group discussion for IPv6 over LowPan networks <6lowpan.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/6lowpan>, <mailto:6lowpan-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/6lowpan>
List-Post: <mailto:6lowpan@ietf.org>
List-Help: <mailto:6lowpan-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/6lowpan>, <mailto:6lowpan-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 17 Jun 2009 09:16:48 -0000

Hi Carsten:

I love your suggestions. Thanks a lot :)

Since there is no additional data in the FRACK we could deduce the size
of the ack bitmap from the packet length, but I would not go that way.

Let's see what we have on the table


A) As you say we could elide trailing zeroes.
We'd use the first 2 bits to say how many bytes in the bitmap, trail all
zeroes.


Acknowledging within the first  6 fragments takes one octet coded as
00xxxxxx 
Acknowledging within the first 14 fragments takes one octet coded as
01xxxxxx xxxxxxxx 
Acknowledging within the first 22 fragments takes one octet coded as
10xxxxxx xxxxxxxx xxxxxxxx  
Acknowledging within the first 30 fragments takes one octet coded as
11xxxxxx xxxxxxxx xxxxxxxx xxxxxxxx

B) Or we could use an encoding similar to the LOWPAN_NHC in the header
compression draft.

Acknowledging within the first 7 fragments takes one octet coded as
0xxxxxxx
Acknowledging within the first 14 fragments takes 2 octets coded as
10xxxxxx xxxxxxxx
Acknowledging within the first 21 fragments takes 3 octets coded as
110xxxxx xxxxxxxx xxxxxxxx 
Acknowledging within the first 28 fragments takes 3 octets coded as
1110xxxx xxxxxxxx xxxxxxxx xxxxxxxx

Theoretically that could lead us as far as we care to go but it seems
that 28 is enough.
Also we might want to write right to left to avoid shifting bits around.

Conclusion: 

A) gives us up to 30 fragments and a very simple encoding as opposed to
28 for B
B) is more efficient in that it saves one octet for the 7th fragment
whereas A saves on octet on the 22nd, which is probably a much rarer
occasion.

I'd be more inclined to use B) for the slightly better compression but
I'd appreciate opinions on this. 

Opinions? Votes are:

A, B, or B+read right to left.

Pascal

>-----Original Message-----
>From: Carsten Bormann [mailto:cabo@tzi.org]
>Sent: mercredi 17 juin 2009 08:22
>To: Pascal Thubert (pthubert)
>Cc: Fred Baker (fred);
draft-thubert-6lowpan-simple-fragment-recovery@tools.ietf.org;
6lowpan@ietf.org
>Subject: Re: [6lowpan] LoWPAN simple fragment Recovery
>
>On Jun 17, 2009, at 07:54, Pascal Thubert (pthubert) wrote:
>
>> 80 bytes
>
>Well.
>
>MAC frame mac: 127 bytes
>MAC header/trailer: 5 bytes
>Adresses (usually, if EUI-64 is used): 18 bytes
>Security Header: 0..14 bytes (depending e.g. on key identifier)
>Security Trailer (MIC): 0/4/8/16 bytes
>
>Depending on how security is being used, the MAC payload may be as low
>as 74 bytes.
>With 6 bytes of fragment header overhead, we are at 68; with rounding
>to a multiple of 8, we are at 64.
>1280/64 = 20.
>
>The first fragment may have some additional header overhead (somewhat
>unlikely, but possible), so I'd say:
>
>21 fragments
>
>This is without a mesh header.
>If a mesh header in the current worst case configuration is needed,
>make that 28 (!).
>
>I think rounding up to 32 is about right.
>5 bits for the sequence number also happens to match up with the 11
>bits needed for the datagram size.
>
>Spending a bit or two of those for some form of huffman/rice coding
>might be the more appropriate way to save bytes in the FRACK packet,
>if that is a concern, because many packets will fit into much fewer
>(eg., 7 or less, 14 or less) fragments.  Or, simpler, trailing zeroes
>might be suppressed in the FRACK.
>
>All this pesky bit fiddling...  But someone has to do it.
>
>Gruesse, Carsten