Subject: [netmod] Tree diagrams

From: tom petch <[email-masked]>
Date: Fri, 15 Oct 2021 10:03:22 +0000

I do not understand tree diagrams.  My expectation is that the same YANG
should produce the same tree diagram but apparently not.  I look at
RFC8519 and see

        |        |  |  +--:(tcp)
        |        |  |  |  +--rw tcp {match-on-tcp}?
............
        |  |  |     +--rw source-port
        |        |  |  |     |  +--rw (source-port)?
        |        |  |  |     |     +--:(range-or-operator)
        |        |  |  |     |        +--rw (port-range-or-operator)?

but when imported into 'draft-ietf-opsawg-vpn-common-12' this becomes
          |  |     +--:(tcp)
          |  |     |  +-- tcp
......
          |  |     |     +-- (source-port)?
          |  |     |     |  +--:(source-port-range-or-operator)
          |  |     |     |     +-- source-port-range-or-operator
ie the identifiers have gained a 'source'  (or 'destination').

Also, the structure changes.  Moving on, vpn-common has

          |  |     +--:(tcp)
          |  |     |  +-- tcp
.....
          |  |     |     +-- (source-port)?
          |  |     |     |  +--:(source-port-range-or-operator)
          |  |     |     |     +-- source-port-range-or-operator
.......
          |  |     |     +-- (destination-port)?
          |  |     |        +--:(destination-port-range-or-operator)
          |  |     |           +-- destination-port-range-or-operator
which looks fine until this is imported into
'draft-ietf-opsawg-l3sm-l3nm-18' when it becomes

   |  |     |  |     +--:(tcp)
   |  |     |  |     |  +--rw tcp
...................
   |  |     |  |     |     +--rw (source-port)?
   |  |     |  |     |     |  +--:(source-port-range-or-operator)
   |  |     |  |     |     |     +--rw source-port-range-or-operator
   |  |     |  |     |     |                      inet:port-number

   |  |     |  |     |     +--rw (destination-port)?
   |  |     |  |     +--:(destination-port-range-or-operator)
   |  |     |  |     |          +--rw destination-port-range-or-operator
   |  |     |  |     |             +--rw (port-range-or-operator)?

'destination-port-range-or-operator' has moved and we now have
   |  |     |  |     +--:(tcp)
   |  |     |  |     +--:(destination-port-range-or-operator)
which does not look fine to me; how can this be?

Earlier drafts of l3nm did not have this feature.

Tom Petch

---

From: "Rob Wilton (rwilton)" <[email-masked]>
Date: Fri, 15 Oct 2021 10:21:56 +0000

Hi Tom, Med, Authors

Tom, thanks for flagging these.

Med, authors, please can you check if the tree diagrams in draft-ietf-opsawg-vpn-common-12 or draft-ietf-opsawg-l3sm-l3nm-18 need to be updated.  If they do, then given that these documents are in the RFC editor queue then we will need to coordinate any corrections with the RFC editor.

Regards,
Rob

> -----Original Message-----
> From: netmod <[email-masked]> On Behalf Of tom petch
> Sent: 15 October 2021 11:03
> To: [email-masked]
> Subject: [netmod] Tree diagrams
> 
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod

---

From: tom petch <[email-masked]>
Date: Fri, 15 Oct 2021 10:28:32 +0000

From: Rob Wilton (rwilton) <[email-masked]>
Sent: 15 October 2021 11:21

Hi Tom, Med, Authors

<tp>
Rob

That was quick!  I can think of several explanations none of which would made l3nm ready for publication.  I raised this on the netmod WG list since that is where the authors of tree diagrams and  NACL are and they will likely have the best guess as to what has happened and hence what needs fixing.  My posts to netmod usually attract a prompt response.

Tom Petch

Regards,
Rob

---

From: <[email-masked]>
Date: Fri, 15 Oct 2021 10:58:46 +0000

Hi Rob, Tom, all, 

The trees are different because we are not importing the acl module, but are reusing "packet-fields" from RFC8519 to define the classification rules. 

Please note that trees in vpn-common are printed with "--tree-print-groupings". 

I suspected what happened for L3NM is that we touched manually the tree (this was there since -04) because sometimes we need so despite we are using "--tree-line-length 69".

We will make this change during AUTH48:

OLD: 

NEW:
   |  |     |  |     |        +--:(destination-port-range-or-operator)

Thank you, Tom. We always need fresh eyes. Much appreciated. 

Cheers,
Med

> -----Message d'origine-----
> De : Rob Wilton (rwilton) <[email-masked]>
> Envoyé : vendredi 15 octobre 2021 12:22
> À : tom petch <[email-masked]>; BOUCADAIR Mohamed INNOV/NET
> <[email-masked]>; [email-masked];
> [email-masked]
> Cc : [email-masked]
> Objet : RE: Tree diagrams
> 
> Hi Tom, Med, Authors
> 
> Med, authors, please can you check if the tree diagrams in draft-ietf-
> opsawg-vpn-common-12 or draft-ietf-opsawg-l3sm-l3nm-18 need to be updated.
> If they do, then given that these documents are in the RFC editor queue
> then we will need to coordinate any corrections with the RFC editor.
> 
> Regards,
> Rob
> 
> 
> > I do not understand tree diagrams.  My expectation is that the same
> > YANG should produce the same tree diagram but apparently not.  I look
> > at
> > RFC8519 and see
> >
> >         |        |  |  +--:(tcp)

_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.

---

From: tom petch <[email-masked]>
Date: Fri, 15 Oct 2021 11:11:42 +0000

From: [email-masked] <[email-masked]>
Sent: 15 October 2021 11:58

Hi Rob, Tom, all,

<tp>
That feature I do not understand.  I agree that you are reusing packet-fields from RFC8519 but that module has 'grouping port-range-or-operator' with no mention AFAICT of a 'source' or a 'destination' in the identifier.  Did you edit all those in as well?

Tom Petch

OLD:

NEW:

Cheers,
Med

---

From: <[email-masked]>
Date: Fri, 15 Oct 2021 11:24:06 +0000

Re-,

Please see inline. 

Cheers,
Med

> De : tom petch <[email-masked]>
> Envoyé : vendredi 15 octobre 2021 13:12
> À : BOUCADAIR Mohamed INNOV/NET <[email-masked]>; Rob Wilton
> (rwilton) <[email-masked]>; [email-masked];
> Objet : Re: Tree diagrams
> 
> The trees are different because we are not importing the acl module, but
> are reusing "packet-fields" from RFC8519 to define the classification
> rules.
> 
> That feature I do not understand.  I agree that you are reusing packet-
> fields from RFC8519 but that module has 'grouping port-range-or-operator'
> with no mention AFAICT of a 'source' or a 'destination' in the identifier.
> Did you edit all those in as well?

[Med] Here is an excerpt of the "ports" grouping in vpn-common: 

==
       choice source-port {
         description
           "Choice of specifying the source port or referring to a group
            of source port numbers.";
         container source-port-range-or-operator {
           description
             "Source port definition.";
           uses packet-fields:port-range-or-operator;
         }
       }
==

which will be pronted as: 

           1:   grouping ports
           2:     +-- (source-port)?
           3:     |  +--:(source-port-range-or-operator)
           4:     |     +-- source-port-range-or-operator
           5:     |        +-- (port-range-or-operator)?
           6:     |           +--:(range)
           7:     |           |  +-- lower-port    inet:port-number
           8:     |           |  +-- upper-port    inet:port-number
           9:     |           +--:(operator)
          10:     |              +-- operator?     operator
          11:     |              +-- port          inet:port-number

The names in lines 1-4 are those in the common module, 5-11 are those in packet-fields.

---

From: tom petch <[email-masked]>
Date: Fri, 15 Oct 2021 11:36:04 +0000

From: [email-masked] <[email-masked]>
Sent: 15 October 2021 12:24

Re-,

Please see inline.

Cheers,
Med

==
       choice source-port {
         description

           1:   grouping ports
           2:     +-- (source-port)?

<tp2>
Ah yes, I said that I did not understand Tree Diagrams:-(.  The name printed is that of the container above the 'uses'.  I did spot the misalignment first and then tried to work out the underlying YANG and failed, hence my comment!

Tom Petch