Re: [mpls] Question on avoiding TLVs

Tony Li <tony.li@tony.li> Mon, 31 January 2022 17:03 UTC

Return-Path: <tony1athome@gmail.com>
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 D9E693A0DA7 for <mpls@ietfa.amsl.com>; Mon, 31 Jan 2022 09:03:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.498
X-Spam-Level:
X-Spam-Status: No, score=-1.498 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 5ndBdyACKFZ3 for <mpls@ietfa.amsl.com>; Mon, 31 Jan 2022 09:03:32 -0800 (PST)
Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 99FA03A0D9D for <mpls@ietf.org>; Mon, 31 Jan 2022 09:03:32 -0800 (PST)
Received: by mail-pf1-x436.google.com with SMTP id i186so10908316pfe.0 for <mpls@ietf.org>; Mon, 31 Jan 2022 09:03:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=+Z2fYw+C/V0+Dfo01dll8cScBFdyQylMZGqCAOCNQx4=; b=Ve5957oU4DI/JVdgOMqFFo8QxuooRys5bOwISjaGy4/eOSLFg7hCGZuFOXQ5ZIjUTH MyHY9ej/I2nXCfciq+h6nmZMYEFV6gD3yg6X4H7skzn4A/NwVOkLnXpNfA7jFXZxjf8c kAi3YeFV5aRsTQL35lQBEc/a3/UzJtnLpB4IKVZM+FsjoQJ8+SVGueSiG1eP5AjEcl/f 6IdKqHYjaMdYnm3vbv6fBA5GBpwXbmUUJD/cHgijhd7KJyI4QCfRnC37UUnfVLJUTZD2 +HqZM+b3TJXKcepXUu4+SIvbkMn8ak8alinKj0nM0vIdSs/5jlMj4Tz1uhu761fGtVWI ZeoQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:mime-version:subject:from:in-reply-to :date:cc:content-transfer-encoding:message-id:references:to; bh=+Z2fYw+C/V0+Dfo01dll8cScBFdyQylMZGqCAOCNQx4=; b=WrIZCK6X0OOa3pheT3H58bTP0huDvC6+2MzTN2xJsdNyADewdcFH/8+Q6/uJQIRfzE 7ZGaF3fEaStL5kZyRzaxOF5QeEB634PUIUtVpH6rzmRSdUayb2yvjSa2IPdhL8t/ub1P ecYb+lfGm2M8NB+OxO+Z+gFHWDgsw9E96dXmQd5OglpFeoER40tkX8V4pKwEQRG7+ZxC OzdAYMU3YV5CDFV1UqBQEBq5L++i26i2+qVBlecx62viF3SYmiivDpMvPtD/qDToELbt f8YGYasOUJDCQjnglRjxxzrX6ncBiCZSpEa27dEk+K3SQp1gfHGoRn3/+Qn/DWyxkyzj o4Ag==
X-Gm-Message-State: AOAM530C8nbdEgf3T/4rpqemav15NhP1GXaOlh78p6i2MrK4lFbTFtJi 0lcLUp/Jw3AHH6yDbQDvBB2J4CBn39E=
X-Google-Smtp-Source: ABdhPJzkP9TPalWHb7sVNlsO6w3jo/7+qSuBGaodSOD+P/5W6IU33vlLU4aWJKlPs0HbyBZySS8ZAQ==
X-Received: by 2002:a63:81c7:: with SMTP id t190mr17555378pgd.575.1643648610536; Mon, 31 Jan 2022 09:03:30 -0800 (PST)
Received: from smtpclient.apple (c-67-169-103-239.hsd1.ca.comcast.net. [67.169.103.239]) by smtp.gmail.com with ESMTPSA id j11sm11918987pjf.53.2022.01.31.09.03.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Jan 2022 09:03:30 -0800 (PST)
Sender: Tony Li <tony1athome@gmail.com>
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.40.0.1.81\))
From: Tony Li <tony.li@tony.li>
In-Reply-To: <BY3PR13MB4787CC75CECDED53A8314F159A259@BY3PR13MB4787.namprd13.prod.outlook.com>
Date: Mon, 31 Jan 2022 09:03:27 -0800
Cc: Loa Andersson <loa@pi.nu>, "mpls@ietf.org" <mpls@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <3BD86173-D24E-4669-91AD-B8C1E349D344@tony.li>
References: <5cd6a374-d677-15c5-c721-77614de00c7f@pi.nu> <BY3PR13MB4787CC75CECDED53A8314F159A259@BY3PR13MB4787.namprd13.prod.outlook.com>
To: Haoyu Song <haoyu.song@futurewei.com>
X-Mailer: Apple Mail (2.3693.40.0.1.81)
Archived-At: <https://mailarchive.ietf.org/arch/msg/mpls/3i7BA-PVS214vmO1tuUfhzkVToY>
Subject: Re: [mpls] Question on avoiding TLVs
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: Mon, 31 Jan 2022 17:03:38 -0000

Haoyu, Loa,

I think the important point here is that the parsing discussion is focused on the forwarding plane.  TLVs are pervasive in the control plane, where parsing is not a significant cost.

Tony


> On Jan 31, 2022, at 8:46 AM, Haoyu Song <haoyu.song@futurewei.com> wrote:
> 
> Hi Loa,
> 
> Usually TLV is used as a substructure in a header. For sub fields in a header, usually we don't have other choices than using TLV.  But for each header, the type of it is better to be indicated by the previous header to save a parsing state. 
> So all what I say is: as a principle, when designing a header, try not to embed its type in the header itself. Instead, before we get to this header, we should already know its type.
> 
> Moreover, TLV options in a header also increases the parsing cost. Each fixed size TLV needs two states. Each variable size TLV needs multiple states depending on the size of the option. So another advice is: if it is meant to be processed in hardware, then we should try to limit the use of TLV, and especially variable sized TLV, unless absolutely necessary.
> 
> Best,
> Haoyu
> 
> -----Original Message-----
> From: Loa Andersson <loa@pi.nu> 
> Sent: Monday, January 31, 2022 3:27 AM
> To: mpls@ietf.org; Haoyu Song <haoyu.song@futurewei.com>
> Subject: Question on avoiding TLVs
> 
> Haoyu,
> 
> In the slides you uploaded to the "We should try the best to avoid TLV style and variable sized header".
> 
> MPLS is full of TLVs (LDP, RSVP/TE, LSP Ping, the OAM) are you suggesting we'd change this?
> 
> Given your advice above what should we do?
> 
> /Loa
> -- 
> Loa Andersson                        email: loa@pi.nu
> Senior MPLS Expert                          loa.pi.nu@gmail.com
> Bronze Dragon Consulting             phone: +46 739 81 21 64
> _______________________________________________
> mpls mailing list
> mpls@ietf.org
> https://www.ietf.org/mailman/listinfo/mpls