Re: [mpls] MPLS label and LSE data models

Jeffrey Haas <> Mon, 17 July 2017 08:33 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 320B0131AA9; Mon, 17 Jul 2017 01:33:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.903
X-Spam-Status: No, score=-1.903 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id fxe721502qCD; Mon, 17 Jul 2017 01:33:24 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id B608F131AD9; Mon, 17 Jul 2017 01:33:16 -0700 (PDT)
Received: by (Postfix, from userid 1001) id B82121E377; Mon, 17 Jul 2017 04:42:50 -0400 (EDT)
Date: Mon, 17 Jul 2017 04:42:50 -0400
From: Jeffrey Haas <>
To: "Acee Lindem (acee)" <>
Cc: "Tarek Saad (tsaad)" <>, Xufeng Liu <>, Greg Mirsky <>, "" <>, "" <>, "" <>, "" <>
Message-ID: <>
References: <> <> <> <> <> <> <> <> <> <>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <>
User-Agent: Mutt/1.5.21 (2010-09-15)
Archived-At: <>
Subject: Re: [mpls] MPLS label and LSE data models
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Multi-Protocol Label Switching WG <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 17 Jul 2017 08:33:26 -0000


On Fri, Jul 14, 2017 at 08:31:25PM +0000, Acee Lindem (acee) wrote:
> Typically, YANG indices are added to YANG lists to simply imply ordering.
> I don’t believe there is absolutely any value in trying to enforce the
> semantics of a precise label position on this index. It is fairly obvious
> that the first label in the list is the first label in the stack, the
> second label in the list is the second label in the stack, and so on…
> Hopefully, the other YANG model authors will agree with me on this point
> and the “Index 0 as top” convention should be relaxed. Is there a YANG
> doctor in the house???
> Now, we currently specify the top label as the first label in the list
> while Jeff has proposed that the bottom label be the first label.  Surely,
> there is an existing convention within MPLS RFCs and drafts and we should
> be consistent. I’d research myself but I have a ton of other things to do
> prior to leaving for Prague tomorrow. When someone refers to the first
> label, is the top or bottom label? I have always been referring to the
> first label as the top label (with all due respect to C stack
> implementations).

Generally, people view stacks from top to bottom.  I don't think there's any
argument about that.

As noted in the thread, the issue is that the indexes are there for ordering
and to remove ambiguity when the same value is present in the list twice.

But since the ordering is implied by indexes and gaps are permitted, a sort
operation is still required.  The question becomes whether there's any use
in letting a well known value, such as 0, can be an expected bottom or top
of stack element?  I believe the answer is yes, but have a mixed opinion
whether bottom or top would be better.  

I think the arguments for each are:
Bottom: This is the only label that has special semantics - it's the last
one and gets the bottom of stack bit.
Top: This is the label you forward on.

I'm ambivalent as to which is most useful, but do suggest we should use one
of the two.

-- Jeff