sonic-port.yang: add link training support (#10025)
This is part of HLD Azure/SONiC#925 #### Why I did it Add link-training support #### How I did it Update SONiC YANG for port link-training support #### Description for the changelog Add "link_training" to sonic-port.yang #### Link to config_db schema for YANG module changes https://github.com/sonic-net/SONiC/wiki/Configuration#port
This commit is contained in:
parent
5eda219bdc
commit
4b581f1e9d
@ -1167,7 +1167,8 @@ optional attributes.
|
||||
"description": "fortyGigE1/1/1",
|
||||
"mtu": "9100",
|
||||
"alias": "fortyGigE1/1/1",
|
||||
"speed": "40000"
|
||||
"speed": "40000",
|
||||
"link_training": "off"
|
||||
},
|
||||
"Ethernet1": {
|
||||
"index": "1",
|
||||
@ -1176,7 +1177,8 @@ optional attributes.
|
||||
"mtu": "9100",
|
||||
"alias": "fortyGigE1/1/2",
|
||||
"admin_status": "up",
|
||||
"speed": "40000"
|
||||
"speed": "40000",
|
||||
"link_training": "on"
|
||||
},
|
||||
"Ethernet63": {
|
||||
"index": "63",
|
||||
|
@ -438,7 +438,8 @@
|
||||
"index": "0",
|
||||
"asic_port_name": "Eth0-ASIC1",
|
||||
"role": "Ext",
|
||||
"macsec": "test"
|
||||
"macsec": "test",
|
||||
"link_training": "off"
|
||||
},
|
||||
"Ethernet1": {
|
||||
"alias": "Eth1/2",
|
||||
@ -449,7 +450,8 @@
|
||||
"admin_status": "up",
|
||||
"autoneg": "on",
|
||||
"adv_speeds": "100000,50000",
|
||||
"adv_interface_types": "CR,CR4"
|
||||
"adv_interface_types": "CR,CR4",
|
||||
"link_training": "on"
|
||||
},
|
||||
"Ethernet2": {
|
||||
"alias": "Eth1/3",
|
||||
|
@ -69,6 +69,17 @@
|
||||
"desc": "PORT_INVALID_ADVTYPES_TEST_2 must condition failure.",
|
||||
"eStrKey" : "Must"
|
||||
},
|
||||
"PORT_VALID_LINK_TRAINING_TEST_1": {
|
||||
"desc": "PORT_VALID_LINK_TRAINING_TEST_1 no failure."
|
||||
},
|
||||
"PORT_VALID_LINK_TRAINING_TEST_2": {
|
||||
"desc": "PORT_VALID_LINK_TRAINING_TEST_2 no failure."
|
||||
},
|
||||
"PORT_INVALID_LINK_TRAINING_TEST": {
|
||||
"desc": "PORT_INVALID_LINK_TRAINING_TEST must condition failure.",
|
||||
"eStrKey" : "Pattern",
|
||||
"eStr": ["on|off"]
|
||||
},
|
||||
"PORT_INVALID_TPID_TEST": {
|
||||
"desc": "PORT_INVALID_TPID_TEST invalid tpid value failure.",
|
||||
"eStrKey" : "Pattern",
|
||||
|
@ -311,6 +311,57 @@
|
||||
}
|
||||
},
|
||||
|
||||
"PORT_VALID_LINK_TRAINING_TEST_1": {
|
||||
"sonic-port:sonic-port": {
|
||||
"sonic-port:PORT": {
|
||||
"PORT_LIST": [
|
||||
{
|
||||
"name": "Ethernet8",
|
||||
"alias": "eth8",
|
||||
"lanes": "65",
|
||||
"speed": 25000,
|
||||
"tpid": "0x8100",
|
||||
"link_training": "on"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"PORT_VALID_LINK_TRAINING_TEST_2": {
|
||||
"sonic-port:sonic-port": {
|
||||
"sonic-port:PORT": {
|
||||
"PORT_LIST": [
|
||||
{
|
||||
"name": "Ethernet8",
|
||||
"alias": "eth8",
|
||||
"lanes": "65",
|
||||
"speed": 25000,
|
||||
"tpid": "0x8100",
|
||||
"link_training": "off"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"PORT_INVALID_LINK_TRAINING_TEST": {
|
||||
"sonic-port:sonic-port": {
|
||||
"sonic-port:PORT": {
|
||||
"PORT_LIST": [
|
||||
{
|
||||
"name": "Ethernet8",
|
||||
"alias": "eth8",
|
||||
"lanes": "65",
|
||||
"speed": 25000,
|
||||
"tpid": "0x8100",
|
||||
"link_training": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"PORT_INVALID_TPID_TEST": {
|
||||
"sonic-port:sonic-port": {
|
||||
"sonic-port:PORT": {
|
||||
|
@ -65,6 +65,14 @@ module sonic-port{
|
||||
}
|
||||
}
|
||||
|
||||
leaf link_training {
|
||||
description "Port link training mode";
|
||||
|
||||
type string {
|
||||
pattern "on|off";
|
||||
}
|
||||
}
|
||||
|
||||
leaf autoneg {
|
||||
description "Port auto negotiation mode";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user