Re: [yang-doctors] YANG QUIC-LB model
Martin Björklund <mbj+ietf@4668.se> Tue, 02 February 2021 07:56 UTC
Return-Path: <mbj+ietf@4668.se>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1])
by ietfa.amsl.com (Postfix) with ESMTP id 72D6D3A1824
for <yang-doctors@ietfa.amsl.com>; Mon, 1 Feb 2021 23:56:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.123
X-Spam-Level:
X-Spam-Status: No, score=-0.123 tagged_above=-999 required=5
tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_NAKED_TO_NUMERO=1.997,
RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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=4668.se header.b=DmfLk4S2;
dkim=pass (2048-bit key)
header.d=messagingengine.com header.b=Vw1lhjgJ
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 MIodDjsRh40r for <yang-doctors@ietfa.amsl.com>;
Mon, 1 Feb 2021 23:56:21 -0800 (PST)
Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com
[64.147.123.24])
(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ietfa.amsl.com (Postfix) with ESMTPS id 1E6603A1823
for <yang-doctors@ietf.org>; Mon, 1 Feb 2021 23:56:21 -0800 (PST)
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
by mailout.west.internal (Postfix) with ESMTP id CC52E9FB;
Tue, 2 Feb 2021 02:56:19 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
by compute4.internal (MEProxy); Tue, 02 Feb 2021 02:56:19 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=4668.se; h=date
:message-id:to:cc:subject:from:in-reply-to:references
:mime-version:content-type:content-transfer-encoding; s=fm1; bh=
2EkPI4CKaAyEaE7/83F5WJbybON4ijaGcPAQtT23fu4=; b=DmfLk4S2gNL4C99y
93vfPO4F3t7LAgoYG7NTqYPadZ9hw/E5IP1X97wpZu828p83u1SJjduSNGcWJRbU
l8wYgrm0RTXCMjETrbKazqP76DYR9/5l9fqwt67sojxshw90ga97Komfb8XaVFfl
44E0Kc4wmmNmRN/nCaonsXvKiIdGueBLNbiA47G13uSFO+XXziobugrEdkpCksXt
BUm5PAMDzOnedrHLad9lnmfmBWvIGJzpeFTnqfm0BSQjr3tjW0Ov2kFX2/vZeGDO
YDF41rHez4G0XnIJ+1fE0GqmH7QiPyiofxx3ApWIvOiYYEQeDnpF1+rm6ALOPEuc
jYLJnw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
messagingengine.com; h=cc:content-transfer-encoding:content-type
:date:from:in-reply-to:message-id:mime-version:references
:subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
:x-sasl-enc; s=fm2; bh=2EkPI4CKaAyEaE7/83F5WJbybON4ijaGcPAQtT23f
u4=; b=Vw1lhjgJt7c1oCeWMhE2856/KWsk5mPoD+8z9xJ8icD9P6T9NbKW28flw
JwRwnWJVcLA/TM92xfWoQtnUV0tUc0GxyEXglSB6/syy+tPSP1pixm8bzfrhlF+J
OSFDLmvMGiQjzZE/lcQlCIcRsFtdWLmuQowH6jKDBxFxSpyvtOSxZbNZ+fnwemWL
b+qf4wwovXDODuGRajZUAgGzY0g9Q8xDfJYgtbam3PEfULmx/3c3egmNENFnJg6r
bKIPzV/pZxo1f31rCDedQ45C+qqJ6UNrv+QCACqY2/uLkRd5k3Mry0ymqB7/Xblh
QqiV5o+iRCGzRhKu9D9AM9v7A9kKg==
X-ME-Sender: <xms:owUZYO8FgikeUBzEHblNuq4PEe2uweL1lUmm9_wr8eMwMIsgdIswaw>
<xme:owUZYOtc-38aSnEKucGJuhgSay6Lity1JsFj0G_WUnX28k4on2meUsX4YKxTmgBfI
fYbQP89Um1LC42qa7g>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeelgddutdeiucetufdoteggodetrfdotf
fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
uceurghilhhouhhtmecufedttdenucenucfjughrpeffkffvuffhjghfofggtgfgsehtje
ertdertddvnecuhfhrohhmpeforghrthhinhcuuehjnphrkhhluhhnugcuoehmsghjodhi
vghtfhesgeeiieekrdhsvgeqnecuggftrfgrthhtvghrnheptedvfffhgeejffeljeeuve
ekudevfeduudduteetveelieekgfdtieekudeiudevnecuffhomhgrihhnpehgihhthhhu
sgdrtghomhenucfkphepudehkedrudejgedrgedrvdduheenucevlhhushhtvghrufhiii
gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmsghjodhivghtfhesgeeiieekrdhs
vg
X-ME-Proxy: <xmx:owUZYEAKhr2UvWf-GoK8_2_Lh0d8j3HfzQwxBDscvRuR6NlT7XXAkw>
<xmx:owUZYGdJK1fYgZ5bz5qqtWyx6RqxgdsyCQd_oMXEfHuhL_w26xlrog>
<xmx:owUZYDOPmDqjjNXg0quDVj-u8tSLRUTAewBhJc3kglFeFprr1eo9ZA>
<xmx:owUZYCYi2HCPZ_3ZNOr3vcUgUxNm1ka0ckU-MM9PlkXKQi6olCY1hA>
Received: from localhost (unknown [158.174.4.215])
by mail.messagingengine.com (Postfix) with ESMTPA id B49A9108005C;
Tue, 2 Feb 2021 02:56:18 -0500 (EST)
Date: Tue, 02 Feb 2021 08:56:17 +0100 (CET)
Message-Id: <20210202.085617.2109522487602609857.id@4668.se>
To: martin.h.duke@gmail.com
Cc: yang-doctors@ietf.org
From: Martin =?iso-8859-1?Q?Bj=F6rklund?= <mbj+ietf@4668.se>
In-Reply-To: <CAM4esxQasY3G6c6j73KLTOFssbNnowRnZxApzAH_yY1qiNBe4A@mail.gmail.com>
References: <CAM4esxQasY3G6c6j73KLTOFssbNnowRnZxApzAH_yY1qiNBe4A@mail.gmail.com>
X-Mailer: Mew version 6.8 on Emacs 26.3
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/nyRen_xftwt_aZ6CMteuhNggPis>
Subject: Re: [yang-doctors] YANG QUIC-LB model
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>,
<mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>,
<mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 02 Feb 2021 07:56:22 -0000
Hi, Martin Duke <martin.h.duke@gmail.com> wrote: > Hello yang-doctors, > > I don't know that this rises to the level of a full review, but the QUIC-LB > draft (currently adopted by the QUIC WG) is basically a standard for > configuration of QUIC Load Balancers and servers to work together. After > much reluctance to take on a format I don't understand, I took a shot at a > YANG model: > > https://github.com/quicwg/load-balancers/blob/yang/draft-ietf-quic-load-balancers.md > > (The YANG stuff is in an appendix near the end -- search for #yang-model). > > Before we talk about a full review where you labor to understand the data > items, I'd appreciate an informal quick sanity check that I am doing this > roughly correctly, as I have zero experience with YANG. I downloaded the module and ran it through a YANG compiler, and started to fix several minor syntactical errors (such as missing ";"), but then I ran into other issues that made it difficult for me to guess what you meant. I suggest you ensure that the model compiles (there are a bunch of compilers available, e.g., pyang, yanglint, ...) and post it again. Some comments though: You have: list cid-configs { key "config-rotation-bits"; leaf config-rotation-bits { type uint8 { range "0..2"; } This means that there can only be max 3 entries in this list. Is that what you meant? You also have: typedef quic-lb-key { type yang:hex-string { length 16; } } The YANG statement "length", when given on a type "string", or derived from "string", operates on the number of characters in the string. In this case, you probably what to limit the number of bytes represented by the hex-string. Unfortunately, it is not possible in standard YANG 1.1 to do this. However, in this particular case it sort-of works, since the length of the hex-string is 2 * N + 1, where N is the number of bytes. Hence, the length would be 33. If you do this I suggest you explain this in the description statement. An alternative could be to drop the length statement and only explain it in the description statement. > One other silly question: I have a field whose length depends on other > fields. Can you give me an example on how to express this correctly? e.g. > > leaf foo-length { > type uint8 > } > > leaf foo { > type yang:hex-string { > length foo-length; > } > } This is possible by using a "must" statement. However, it has the same problem with the lexical value as above: leaf foo { type yang:hex-string; must 'string-length(.) = 2 * ../foo-length + 1'; } /martin
- [yang-doctors] YANG QUIC-LB model Martin Duke
- Re: [yang-doctors] YANG QUIC-LB model Ladislav Lhotka
- Re: [yang-doctors] YANG QUIC-LB model Martin Björklund
- Re: [yang-doctors] YANG QUIC-LB model Jan Lindblad
- Re: [yang-doctors] YANG QUIC-LB model Ladislav Lhotka
- Re: [yang-doctors] YANG QUIC-LB model Martin Duke