Should we group all ports' definitions in platform.json into a section like "interfaces"?

16 views
Skip to first unread message

Steven Lu

unread,
Feb 4, 2020, 1:08:20 PM2/4/20
to sonic-breakout-workgroup
I think It would be better if we group all ports definitions into a section like below:
"interfaces" : {
    "Ethernet0" : {
        "index": "1,1,1,1",
        "lanes": "0,1,2,3",
        "alias_at_lanes": "Eth1/1, Eth1/2, Eth1/3, Eth1/4",
        "breakout_modes": "1x100G[40G],2x50G,4x25G[10G],2x25G(2)+1x50G(2),1x50G(2)+2x25G(2)",
        "default_brkout_mode": "1x100G[40G]"
    },
    "Ethernet4" : {
        "index": "2,2,2,2",
        "lanes": "4,5,6,7",
        "alias_at_lanes": "Eth2/1, Eth2/2, Eth2/3, Eth2/4",
        "breakout_modes": "1x100G[40G],2x50G,4x25G[10G],2x25G(2)+1x50G(2),1x50G(2)+2x25G(2)",
        "default_brkout_mode": "1x100G[40G]"
    },

    ...
}

So that platform.json file can be extended in the future.

Zhenggen Xu

unread,
Feb 4, 2020, 1:24:51 PM2/4/20
to Steven Lu, sonic-breakout-workgroup
Do you have some properties in mind that you will put into platform.json? 

We have a common function to parse platform.json, I would suggest we make that change in platform.json and the common function, when we introduce the new properties.


--
You received this message because you are subscribed to the Google Groups "sonic-breakout-workgroup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonic-breakout-wor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonic-breakout-workgroup/04dfed1d-5065-47b5-8325-94fe31692833%40googlegroups.com.

Steven Lu

unread,
Feb 4, 2020, 1:40:00 PM2/4/20
to Zhenggen Xu, sonic-breakout-workgroup
Hi Zhenggen,
Some silicons have limitations of FEC mode can be supported in different lane configuration.
For example: TH1 ports if breakout to 10G or 25G then only fc-fec can be supported, but in 100G it can support fc-fec and rs-fec.
We have something defined as below:
    "fec-mode": {
        "Ethernet0-127": {
            "1": [ "none", "fc" ],
            "2": [ "none", "fc" ],
            "4": [ "none", "fc", "rs" ]
        }
    }

It means for all ports, if only 1 lane, then only support fc-fec, and if 4-lanes it could support -fc-fec & rs-fec.


Steven Lu

unread,
Feb 4, 2020, 1:41:39 PM2/4/20
to Zhenggen Xu, sonic-breakout-workgroup
And in general it would be better to group definitions in a "key" so the design could be scalable.

Thanks

Steven

Zhenggen Xu

unread,
Feb 6, 2020, 2:31:50 AM2/6/20
to Steven Lu, sonic-breakout-workgroup
Point taken,  we will make that change unless there is any objection.
Reply all
Reply to author
Forward
0 new messages