Re: [yang-doctors] YANG QUIC-LB model
Martin Duke <martin.h.duke@gmail.com> Wed, 03 February 2021 00:44 UTC
Return-Path: <martin.h.duke@gmail.com>
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 DBEDA3A10E6
for <yang-doctors@ietfa.amsl.com>; Tue, 2 Feb 2021 16:44:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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, FREEMAIL_FROM=0.001,
HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
URIBL_BLOCKED=0.001] autolearn=ham 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 hXc1xeTfv49u for <yang-doctors@ietfa.amsl.com>;
Tue, 2 Feb 2021 16:43:58 -0800 (PST)
Received: from mail-il1-x129.google.com (mail-il1-x129.google.com
[IPv6:2607:f8b0:4864:20::129])
(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 9E9973A106D
for <yang-doctors@ietf.org>; Tue, 2 Feb 2021 16:43:58 -0800 (PST)
Received: by mail-il1-x129.google.com with SMTP id e7so20868458ile.7
for <yang-doctors@ietf.org>; Tue, 02 Feb 2021 16:43:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=f6CD18Mce/HWrbhWZY1XWcNLUPnz/KMMxvpwQhLu9ZA=;
b=f4kjs9Fj3aZzBctRe3QGmUdsEH8iyO4XwHXrxF4LkIL4SlkxC8CAOyVtDTfomufzHw
5z0objh2t3rNd1W4/0Pr3BOlEMT7xwPn8TuPEnw87KLOVJjPyHN99pyliWuNqL+unVcI
rvJg7T1khEYjcFKkGgOqip4XFbzpoXnDh17pr6hW3z7/9SmwvYUx5u/BUNOfp3L9kwDB
8tYfKtvhgL3ZqS4LVJ2s8agOxGxlA2znQTYacjKSqLdnTR/mIMgFZUrmvDIaHhC6K0eT
Bu+dDzCAVQo1K4a0mDj3GFbanqoeuUlvmKmH4aDEjFf1emt6tNd7vQJMeR7RMU1t2QEG
ynWg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=f6CD18Mce/HWrbhWZY1XWcNLUPnz/KMMxvpwQhLu9ZA=;
b=iRw/dgZGXn1bsk0zBQfDOJbbBkCBerQGlG4AjFs7p9heZXHoGPjT6eDWdbr8lmYvhD
PZBt63Xa715TBmAOmFKAN40P/HnIjkSotbjSZ6Gs3Z9PNwbew43MA1aRn/UDztZLcvR2
B0eD5jd8YOlmFV+98RUf2Y8yZmp43vBVUg+NsRN1aKnp9DcddkqA/lkFZgcdhKy9HoGW
JO0XqdlHDz+eX8cL+zU4y4Sv2wOGM5pyMrs9497RYlAF1q4UWAmIokkAYMJ+MXnFQfdy
ovOAQZxOQN2cwX0fWbQ/LaFaP1GlIIppd6v3KztoT8NDSVnVrfpMY7Lp3Jrg/DZ37CWS
FaiQ==
X-Gm-Message-State: AOAM53348idI76aqW0sEL1B6eJgKskgElz0Vti9KykTK8rYBBDolnSCY
sUou1QmozO58KM+cnNizn4RfKRwd68H0fmT1rvw=
X-Google-Smtp-Source: ABdhPJwtzg+DklkEZN2TYwEA76uC+MVLLgsbMZfe+Rm1fVZdaJhUWOD77Jit2RYOAquG7UPVVfOcl8SpI/39ZX/403I=
X-Received: by 2002:a92:d146:: with SMTP id t6mr671413ilg.272.1612313036769;
Tue, 02 Feb 2021 16:43:56 -0800 (PST)
MIME-Version: 1.0
References: <CAM4esxQasY3G6c6j73KLTOFssbNnowRnZxApzAH_yY1qiNBe4A@mail.gmail.com>
<20210202.085617.2109522487602609857.id@4668.se>
<DB8B91F8-8B10-4857-8E41-DA9C3506A0BF@tail-f.com>
In-Reply-To: <DB8B91F8-8B10-4857-8E41-DA9C3506A0BF@tail-f.com>
From: Martin Duke <martin.h.duke@gmail.com>
Date: Tue, 2 Feb 2021 16:43:51 -0800
Message-ID: <CAM4esxQ58UL6eqLrMb0-jW-vSEw4M7EkWRcwhcmXRPgqe6HxBA@mail.gmail.com>
To: Jan Lindblad <janl@tail-f.com>
Cc: =?UTF-8?Q?Martin_Bj=C3=B6rklund?= <mbj+ietf@4668.se>,
YANG Doctors <yang-doctors@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000d2cfa505ba63e1ae"
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/Vv6EDWZjZnjBnbWfIk3Zcq2rA4I>
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: Wed, 03 Feb 2021 00:44:01 -0000
Hello all, Thanks very much for your comments -- I was able to get the model to compile. To answer mbj's question, yes there should be no more than three items. I look forward to requesting a full review when the model stabilizes a little more. You have made this process relatively painless. Martin On Tue, Feb 2, 2021 at 12:26 AM Jan Lindblad <janl@tail-f.com> wrote: > Martin, > > Actually, I think the string length is "0 | 3 * N - 1" since each byte is > encoded as two hex digits and a colon, except the last byte which is just > two hex digits, as in "11:22:33:44". But I wonder, why do you need a > configured value for the length at all? Would it not suffice that the > operator configures the hex-string and let the system figure out the length > based on that? > > I did a quick scan of your module. It has a lot of trivial issues (naming, > mandatory, prefix, ...) that are easy to fix, but overall I think you've > understood how to do this. > > Best Regards, > /jan > > > > On 2 Feb 2021, at 08:56, Martin Björklund <mbj+ietf@4668.se> wrote: > > 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 mailing list > yang-doctors@ietf.org > https://www.ietf.org/mailman/listinfo/yang-doctors > > >
- [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