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
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.
rtgwg mailing list