[Softwires] Excluded ports in draft-ietf-softwire-map-02

Tom Taylor <tom.taylor.stds@gmail.com> Mon, 31 December 2012 23:44 UTC

Return-Path: <tom.taylor.stds@gmail.com>
X-Original-To: softwires@ietfa.amsl.com
Delivered-To: softwires@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1CA6C21F8961 for <softwires@ietfa.amsl.com>; Mon, 31 Dec 2012 15:44:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.39
X-Spam-Level:
X-Spam-Status: No, score=-3.39 tagged_above=-999 required=5 tests=[AWL=0.209, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9-Aj98vIAqmK for <softwires@ietfa.amsl.com>; Mon, 31 Dec 2012 15:44:46 -0800 (PST)
Received: from mail-ie0-f176.google.com (mail-ie0-f176.google.com [209.85.223.176]) by ietfa.amsl.com (Postfix) with ESMTP id 560DD21F8962 for <softwires@ietf.org>; Mon, 31 Dec 2012 15:44:46 -0800 (PST)
Received: by mail-ie0-f176.google.com with SMTP id 13so15413818iea.35 for <softwires@ietf.org>; Mon, 31 Dec 2012 15:44:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding:x-antivirus :x-antivirus-status; bh=Vbt0DEkDggQskmLd91qmQSNwrXX1Wm7ypYgxa1MMxy4=; b=iOg7X/dR3Tfl9+/XkNVZHG4UVMvEfoH5A1M8Cs6huV28jO6ClYc+CsJr93WJh0CSn6 vQQcPbiRsVix+8pZuKkzjFfU9smLv/fSURDTp4ZwhkUj5bEZR7MUijNlm6hFt6chsSce pZJswrxWy0oPdk450kfuDzCILZ7BRViPsQOvYfsGDRj79QoLRaqaFrbcu6HGerGJKC7Z QedjjRdHQCC02Ya4BUGkYXbEzPH6xk9dIrVY8zvKOJj5GIH2BzCI2R+I4JS7aAb5Rzmy ctUViFAeBEW7Iizd5CspK9vj5Jh0UeKZHrXKHRBIOnVYe+DwLcVVnaQwIreB4SIpVeIU EZZA==
X-Received: by 10.43.69.206 with SMTP id yd14mr32003844icb.57.1356997472691; Mon, 31 Dec 2012 15:44:32 -0800 (PST)
Received: from [127.0.0.1] (dsl-173-206-100-109.tor.primus.ca. [173.206.100.109]) by mx.google.com with ESMTPS id c3sm38746607igj.1.2012.12.31.15.44.31 (version=SSLv3 cipher=OTHER); Mon, 31 Dec 2012 15:44:31 -0800 (PST)
Message-ID: <50E2235E.8080601@gmail.com>
Date: Mon, 31 Dec 2012 18:44:30 -0500
From: Tom Taylor <tom.taylor.stds@gmail.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
To: Softwires <softwires@ietf.org>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 121231-1, 31/12/2012), Outbound message
X-Antivirus-Status: Clean
Subject: [Softwires] Excluded ports in draft-ietf-softwire-map-02
X-BeenThere: softwires@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: softwires wg discussion list <softwires.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/softwires>, <mailto:softwires-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/softwires>
List-Post: <mailto:softwires@ietf.org>
List-Help: <mailto:softwires-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/softwires>, <mailto:softwires-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 31 Dec 2012 23:44:47 -0000

draft-ietf-softwire-map-02 mentions excluded ports in several places:

Section 5.1: talks about excluding ports 0-4095. The reason for choosing 
that limit is not given at that point. Further discussion below.

Section 5.1.1 says:

    For a > 0, j MUST be larger than 0.  This ensures that the algorithm
    excludes the system ports ([I-D.ietf-tsvwg-iana-ports]).  For a = 0,
    j MAY be 0 to allow for the provisioning of the system ports.

There is no basis for these statements. The actual requirement to ensure 
exclusion of the system ports is that (j * the block size M*R) is 1024 
or greater for some j in the range 1 .. (2^a - 1). This is always 
satisfied for block sizes up to 32768. However, for block sizes less 
than 1024, exclusion of the system ports requires that j be restricted 
to values 1024/(M*R) or higher. BTW, a block size less than 1024 fits 
into 10 bits or less, implying a >= 6.

With regard to the second statement, it's not clear why system ports can 
be allocated if there is only a single block (a = 0) and not in any 
other case. In fact, if there is a single block, the result of allowing 
system ports to be allocated is that they would all go to one or a few 
CEs with the lowest values of PSID. This is illustrated in the last 
example of Section 5.1.2. In fact, in the single block case, to exclude 
system ports one would exclude the lower values of PSID.

Section 5.1.3 says:

    To simplify the GMA port mapping algorithm the defaults are chosen so
    that the PSID field starts on a nibble boundary and the excluded port
    range (0-1023) is extended to 0-4095.

Now we see the origin of that number 4096 in Section 5.1. However, the 
effect of extending the excluded port range, following the reasoning 
above, is that for block sizes less than 4096, the minimum value of j is 
4096/(M*R). This requires a to be at least 4. The defaults imply a block 
size of 4096 and a minimum j value of 1, giving 15 usable blocks in the 
range 4096-65536.

The parameters identified in Section 5.1.3 are incomplete. They are 
enough to derive the block size M*R and the beginning value of j, but 
not the individual parameters M (maximum consecutive ports per CE) and R 
(number of CEs sharing the same IP address). Without those parameters 
the complete set of port numbers allocated to a given CE cannot be 
calculated. Note that the examples specify R.

Recommendations
===============

Based on the above analysis, I propose the following:

1) When defining the limits for j in section 5.1, use a value of E (for 
lowest permitted port value) in place of 4096. Mention that in the case 
of a single block (M*R >= 32768), j can only have the value zero and to 
exclude port numbers below E one instead excludes PSID values from 0 to
ceil(E/M) - 1.

2) Delete the paragraph cited in Section 5.1.1.

3) Modify the text in Section 5.1.3 as follows:

    ...
    o  Offset bits (a) : 4, implying a block size of 4096.

    This combination of defaults simplifies the GMA port mapping
    algorithm by ensuring that the PSID high-order bit lies on a
    nibble boundary and making the lower limit on the index j equal
    to 1.

Also add the parameter R (say) to the set of provisioned values,
with a suitable default.