Subject: path data discussion

From: Jamal Hadi Salim <[email-masked]>
Date: Tue, 8 Feb 2005 15:43:50 -0500

To the chairs:

Could we put a time limit towards reaching rough consensus of some form
on the path data? 
 
It is my belief that we have already covers what Weiming needs. I
provide an example at the end of this email to show how to achieve 
that with the two examples i tried to show earlier (nested vs flat
path-datas).

I am then going to put that in the doc and release it.
Could we put say a week after that to close discussion? I am sure there
will be some small edges left over, but i think we are dragging over
little issues at this point and the main obstacles are done with if
we agree on this one last item.
Joel and Weiming please read through long example at the end of this
email and comment.

cheers,
jamal

Weiming would like to update different items on a hierachy of data.
So this example is there to show how that can be done with the
current BNF.

Consider table 6 which is defined as:
table6: type array, ID = 8
        elements are:
        p1, type u32, ID = 1
        p2, type array, ID = 2, array elements of type type-A

type-A:
        a1, type u32, ID 1,
        a2, type array ID2 ,array elements of type type-B

type-B:
        b1, type u32, ID 1
        b2, type u32, ID 2

So lets say we wanted to set by replacing:
table6.10.p1 to 111
table6.10.p2.20.1 to 222
table6.10.p2.20.a2.30.b1 to 333

in one message and one operation.

There are two ways to do this:

a) using nesting

operation = SET
        Path-data TLV
                IDCount = 2, IDs=6.10
                Path-data TLV :
                        flags = F_REPLACE, IDCount = 1, IDs=1
                        DATARAW TLV: L=XXXX,
                                V = {111}
                Path-data TLV :
                        IDCount = 2, IDs=2.20
                        Path-data TLV :
                                flags = F_REPLACE, IDCount = 1, IDs=1
                                DATARAW TLV: L=XXXX,
                                        V = {222}
                        Path-data TLV :
                                flags = F_REPLACE, IDCount = 3,
IDs=2.30.1
                                DATARAW TLV: L=XXXX,
                                        V = {333}

b) using a flat path data
operation = SET
        Path-data TLV :
                flags = F_REPLACE, IDCount = 3, IDs=6.10.1
                DATARAW TLV: L=XXXX,
                        V = {111}
        Path-data TLV :
                flags = F_REPLACE, IDCount = 5, IDs=6.10.1.20.1
                DATARAW TLV: L=XXXX,
                        V = {222}
        Path-data TLV :
                flags = F_REPLACE, IDCount = 7, IDs=6.10.1.20.1.30.1
                DATARAW TLV: L=XXXX,
                        V = {333}

As i was hinting in posting earlier,  if you look at the IDs as
you keep going to the next path, you will see that they repeat
the previous path. If we could say "inherit previous path" via
a flag such as F_INHERIT then we could have an optimization
and save a few bytes (the first one will have 3 IDs but the next two
will have 2 each)