Re: [mpls] thought about the ADI name

Loa Andersson <loa@pi.nu> Thu, 06 January 2022 01:41 UTC

Return-Path: <loa@pi.nu>
X-Original-To: mpls@ietfa.amsl.com
Delivered-To: mpls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9B4823A1330 for <mpls@ietfa.amsl.com>; Wed, 5 Jan 2022 17:41:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.611
X-Spam-Level:
X-Spam-Status: No, score=-2.611 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, NICE_REPLY_A=-0.714, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=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 amExGlCeu6aB for <mpls@ietfa.amsl.com>; Wed, 5 Jan 2022 17:41:34 -0800 (PST)
Received: from pipi.pi.nu (pipi.pi.nu [83.168.239.141]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 347EC3A132E for <mpls@ietf.org>; Wed, 5 Jan 2022 17:41:33 -0800 (PST)
Received: from [192.168.1.98] (unknown [122.2.110.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: loa@pi.nu) by pipi.pi.nu (Postfix) with ESMTPSA id 1A000365B60; Thu, 6 Jan 2022 02:41:25 +0100 (CET)
Message-ID: <b211a87f-684c-b65b-5ce2-402e3e0af323@pi.nu>
Date: Thu, 06 Jan 2022 09:41:22 +0800
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1
Content-Language: en-CA
To: Haoyu Song <haoyu.song@futurewei.com>, "mpls@ietf.org" <mpls@ietf.org>
References: <9e553dc9-34d1-44d5-1e33-41e4a3372597@pi.nu> <BY3PR13MB47870B6D4018A330A4EDEA279A7D9@BY3PR13MB4787.namprd13.prod.outlook.com> <dc108dd7-dad6-1d94-268e-d54bdda48719@pi.nu> <BY3PR13MB4787A33AE3806444F48086449A7E9@BY3PR13MB4787.namprd13.prod.outlook.com> <c43ac326-2d59-1b2e-8234-272f5ffb308a@pi.nu> <BY3PR13MB47879B74AAE6D51C950891CC9A429@BY3PR13MB4787.namprd13.prod.outlook.com>
From: Loa Andersson <loa@pi.nu>
In-Reply-To: <BY3PR13MB47879B74AAE6D51C950891CC9A429@BY3PR13MB4787.namprd13.prod.outlook.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/mpls/wpI8t0hgy2_nI1dP6vcaHLEq1EQ>
Subject: Re: [mpls] thought about the ADI name
X-BeenThere: mpls@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Multi-Protocol Label Switching WG <mpls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/mpls>, <mailto:mpls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/mpls/>
List-Post: <mailto:mpls@ietf.org>
List-Help: <mailto:mpls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/mpls>, <mailto:mpls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 06 Jan 2022 01:41:40 -0000

Haoyu,

This opens up for yet another interesting discussion. The "how many" ADs 
or ADIs is required in a single packet for the chain processing to be a 
problem. My guesstimate would be that the very vast majority of packet 
will have 0, 1 or 2 ADIs set, and the chain argument not very relevant.

Why should we design for a corner case?

Even if you have many ADIs set you would know from the flag field if 
there are AD that you are interested in.

/Loa

On 28/12/2021 01:39, Haoyu Song wrote:
> Hi Loa,
> 
> Please see my response inline with [HS].
> 
> Haoyu
> 
> -----Original Message-----
> From: Loa Andersson <loa@pi.nu>
> Sent: Saturday, December 25, 2021 2:41 AM
> To: Haoyu Song <haoyu.song@futurewei.com>; mpls@ietf.org
> Subject: Re: [mpls] thought about the ADI name
> 
> 
> 
> On 24/12/2021 01:58, Haoyu Song wrote:
>> Hi Loa,
>>
>> Let me try to explain a bit more. I have examples to back the following claims which I can present in a future meeting.
> 
> If you want to present, you should be specific and ask for a slot at a meeting.
>>
>> So far all the existing header design follows a chain structure.
> 
> hmmm -  do you consider a number of TLVs to be a "chain structure"?
> 
> [HS] Yes. Basically.  However, if a "T" is needed to identify a "TLV" structure, this structure has to be treated as 2 "headers" (i.e., using two parser states instead of one). Therefore, TLV is usually used as an inner structure of a header. It's not recommended for the outer header design.
> 
> The header are parsed linearly one by one from the start of the packet,
> 
> or upiu stop when you find what you are looking for, which may not be the last but the first, the last, or anything in between.
> [HS] Could you please give an example?
> 
> until you reach a header that is considered the last one concerned by the forwarding plane.
> 
> You know the presence of a specific header only when you reach it.
> 
> No. not true - if you have the flag field (FAI/NAI or ADI. or whatever you want to call them. The flags will tell you, you'll know what you are looking for.
> [HS] What I mean is that we just need a single indicator to tell the presence of AD. Beyond that, it's not helpful and even harmful. I have given the reasons. Perhaps you should try to write the pseudo code to verify that.
> 
> In this design, the number of parser states as well as the time for parsing is both linear to the number of headers scanned.
> 
> Can't argue about this, doesn't the fact that you are looking for something specific help?
>>
>> Now people may think using some extra indicators (i.e., a bitmap with each bit indicating the presence of a header later in the packet) may improve the parsing performance. To this we must ask "in what sense"?
>>
>> We can consider two possible types of improvements. First is the reduction of parsing states which can help to save the parser resource (i.e., fewer nodes in the parser FSM); second is the reduction of parsing cycles which can help to parse a packet faster (we have a fixed cost for parsing each header, no matter the size of it. E.g, each MPLS label is considered a header, the entire IPv6 header, excluding EHs, is also considered a header).
>>
>> For the first one, if you start to actually draft the parsing graph, you will find the opposite results. In two different parsing styles, both requires more parser states than a simple header chain.
>>
>> For the second one, we need to understand that the headers concerned by a forwarding plane need to all be parsed anyway. You can't ignore some headers in the middle because you will need to reconstruct the packet headers at the egress (a process also known as deparsing). So the extra indicator encoding doesn't help to improve the parsing speed either.
> 
> So, I conclude. If we have the flag field and know that there is only one or two action flags set, I will be worse off than if I have a PSD structure that I have no knowledge about?
> 
> [HS] You may just know there is PSD. That's enough. Other information doesn't help on either parser size or parsing speed. On the contrary, the bitmap or catalog forces the AD order and limits the AD extensibility.
> 
> 
> Now I'm too far off road, and stop here.
> 
>>
>> There's a reason why so far all the headers are simply organized as a chain. It's the most efficient and straightforward way. My study is based on current switch ASICs and some NPs.  If people don't believe me, then evidence (e.g., pseudo code or parsing graph) needs to be provided. Perhaps there are some different forwarding plane designs which can play magic. We need to learn that before introducing any new mechanism.
> 
> 
>>
>> A caveat is that, an extra indicator for the presence of HBH headers might be useful in some cases. For example, on an LSP path nodes, if there's no HBH headers later in the packet, the parser can stop further parsing immediately which can save some parsing cycles.  Even in this case, if the forwarding plane still requires to continue parsing, this mechanism doesn’t help.
>>
> I a FAI/NAI/ADI that indicates HBH wrse than one that indicate E2E?
> 
> [HS] Since LSP end nodes need to parse all the AD anyway, so an overall indicator for AD is sufficient for that purpose. Beyond that, an HBH indicator can allow the LSP path nodes to avoid continuing parsing when the indicator was found which can shorten the parsing process.
> 
> /Loa
> 
>> In general, we really just need to concern the packet header buffer (aka packet window) size. As long as all the headers concerned by a forwarding plane is within the buffer limit, the parsing cost is a negligible concern for a simple header chain. Other mechanisms are of no help at best and could be harmful at worst. Of course, I'd like to see evidence if people think the other way.
>>
>> Happy Holidays!
>>
>> Best regards,
>> Haoyu
>>
>> -----Original Message-----
>> From: Loa Andersson <loa@pi.nu>
>> Sent: Wednesday, December 22, 2021 2:54 PM
>> To: Haoyu Song <haoyu.song@futurewei.com>; mpls@ietf.org
>> Subject: Re: [mpls] thought about the ADI name
>>
>> Haoyu,
>>
>> OK, I simply don't understand.
>>
>> If you don't know what action you'll take, what good is it to know where to find the data?
>>
>> It might be that this is not what you say, but that is what if get from your text below. Sorry if I'm misunderstanding.
>>
>> /Loa
>>
>> On 23/12/2021 03:25, Haoyu Song wrote:
>>> Hi Loa,
>>>
>>> In my opinion the ADI should only be used to indicate the presence of AD.  E2E or HBH AD could be differentiated because in some case it can help stop further parsing beyond ADI.  Other information encoded in it won't help but complicate the parsing process. I strongly suggest any such proposal should give a clear presentation on why it's necessary and how it can help from the view of implementors, otherwise, we may end up with an over complicated design without tangible benefits.
>>>
>>> Best regards,
>>> Haoyu
>>>
>>> -----Original Message-----
>>> From: mpls <mpls-bounces@ietf.org> On Behalf Of Loa Andersson
>>> Sent: Sunday, December 19, 2021 8:32 AM
>>> To: mpls@ietf.org
>>> Subject: [mpls] thought about the ADI name
>>>
>>> Working Group,
>>>
>>> The MIAD Requirement Specification use the abbreviation ADI, it stands for Ancillary Data Indicator. Which is all nice and dandy.
>>>
>>> But isn't it he case  that the indicator gives us two things, the action to be performed and where to find the data needed, i.e., an Ancillary Data and Action indication (ADAI?).
>>>
>>> No I'm not suggesting that we change, but we should be aware, and it would be nice to have it mentioned somewhere.
>>>
>>> /Loa
>>
> 

-- 
Loa Andersson                        email: loa@pi.nu
Senior MPLS Expert                          loa.pi.nu@gmail.com
Bronze Dragon Consulting             phone: +46 739 81 21 64