Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding mmu buffer yang files #7838

Merged
merged 35 commits into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b87a2c4
Adding mmu buffer yang files
AmitKaushik7 Jun 8, 2021
46a1320
Test files for mmu buffer yang files
AmitKaushik7 Jun 21, 2021
145a6cb
Updated yang files(commented sonic-ext and updated Port path
AmitKaushik7 Jun 21, 2021
766a097
Updated yang files(Splitted the BUFFER table's name)
AmitKaushik7 Jun 21, 2021
c9e6c4d
Updated sonic_config_db.json for BUFFER pool/profile/pg/queue
AmitKaushik7 Jun 21, 2021
9bf4c61
Rectified sample_config_db.json
AmitKaushik7 Jun 21, 2021
e62fa56
Rectified sample_config_db.json
AmitKaushik7 Jun 21, 2021
4661654
Merge branch 'master' into mmubuffer_yang
AmitKaushik7 Jul 1, 2021
218178e
Addressed Review comments, added more test cases and ing/egr profile …
AmitKaushik7 Jul 11, 2021
dd479ad
Updated sample_config_db.json and buffer profile yang/test files
AmitKaushik7 Jul 12, 2021
8736d4a
Updated sample_config_d.json for ing/egr profile list
AmitKaushik7 Jul 12, 2021
006097c
Updated sample_config_db.json
AmitKaushik7 Jul 12, 2021
1a06575
Updated sample_config_db.json
AmitKaushik7 Jul 12, 2021
a9f1c63
Updated sample_config_db.json
AmitKaushik7 Jul 12, 2021
db9183b
Reverting the choice/case for sonic-buffer-profile.yang
AmitKaushik7 Jul 13, 2021
47656a9
Masked Test case for static_th/dyanmic_th
AmitKaushik7 Jul 13, 2021
4e8ac0d
Prefix PORT_INGRESS/EGRESS table with BUFFER_
AmitKaushik7 Jul 14, 2021
a517b05
rearranged buffer related yang files in setup file
AmitKaushik7 Jul 14, 2021
16e5901
Merge branch 'Azure:master' into mmubuffer_yang
AmitKaushik7 Jul 28, 2021
bce3287
Merge branch 'Azure:master' into mmubuffer_yang
AmitKaushik7 Jul 30, 2021
d61dadf
Merge branch 'Azure:master' into mmubuffer_yang
AmitKaushik7 Sep 3, 2021
de541dd
Merge branch 'Azure:master' into mmubuffer_yang
AmitKaushik7 Sep 13, 2021
99a2786
Merge branch 'Azure:master' into mmubuffer_yang
AmitKaushik7 Sep 21, 2021
679066c
Merge branch 'Azure:master' into mmubuffer_yang
AmitKaushik7 Oct 7, 2021
29fe149
Merge branch 'Azure:master' into mmubuffer_yang
AmitKaushik7 Oct 19, 2021
5937bf3
Merge branch 'Azure:master' into mmubuffer_yang
AmitKaushik7 Oct 20, 2021
e78c803
Addressed review concerns
AmitKaushik7 Oct 21, 2021
0611e95
Restricted the threshold to static/dynamic using choice
AmitKaushik7 Oct 21, 2021
89e145a
Reverting back static/threshold choice change
AmitKaushik7 Oct 22, 2021
442ed84
Merge branch 'Azure:master' into mmubuffer_yang
AmitKaushik7 Oct 25, 2021
787555f
Merge branch 'Azure:master' into mmubuffer_yang
AmitKaushik7 Oct 26, 2021
5238c89
Merge branch 'Azure:master' into mmubuffer_yang
AmitKaushik7 Oct 28, 2021
1cc4db4
Merge branch 'Azure:master' into mmubuffer_yang
AmitKaushik7 Oct 28, 2021
3df9b41
Merge branch 'Azure:master' into mmubuffer_yang
AmitKaushik7 Oct 28, 2021
f70fcb3
Merge branch 'Azure:master' into mmubuffer_yang
AmitKaushik7 Nov 1, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/sonic-yang-models/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
'./yang-models/sonic-bgp-neighbor.yang',
'./yang-models/sonic-bgp-peergroup.yang',
'./yang-models/sonic-breakout_cfg.yang',
'./yang-models/sonic-buffer-pool.yang',
'./yang-models/sonic-buffer-profile.yang',
'./yang-models/sonic-buffer-pg.yang',
'./yang-models/sonic-buffer-queue.yang',
'./yang-models/sonic-copp.yang',
'./yang-models/sonic-crm.yang',
'./yang-models/sonic-device_metadata.yang',
Expand Down
37 changes: 37 additions & 0 deletions src/sonic-yang-models/tests/files/sample_config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,43 @@
"Vrf_blue": {
}
},
"BUFFER_POOL": {
"egress_lossless_pool": {
"mode": "static",
"size": "33004032",
"type": "egress"
},
"egress_lossy_pool": {
"size": "12766208",
"type": "egress",
"mode": "dynamic"
}
},
"BUFFER_PROFILE": {
"pg_lossless_100000_300m_profile": {
"dynamic_th": "1",
"pool": "egress_lossless_pool",
AmitKaushik7 marked this conversation as resolved.
Show resolved Hide resolved
"size": "9427",
"xoff": "50176",
"xon": "0",
"xon_offset": "3584"
},
"egress_lossy_profile": {
"pool":"egress_lossy_pool",
"size":"1518",
"dynamic_th":"3"
}
},
"BUFFER_PG": {
"Ethernet9|3-4": {
"profile": "pg_lossless_100000_300m_profile"
}
},
"BUFFER_QUEUE": {
"Ethernet10|4": {
"profile": "egress_lossy_profile"
}
},
"PORTCHANNEL": {
"PortChannel0003": {
"admin_status": "up",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"BUFFER_PG_CORRECT_PROFILE_VALUE": {
"desc": "BUFFER_PG_CORRECT_PROFILE_VALUE no failure"
},
"BUFFER_PG_WRONG_PROFILE_VALUE": {
"desc": "BUFFER_PG_WRONG_PROFILE_VALUE pattern failure",
"eStr": ["wrong" ]
},
"BUFFER_PG_WRONG_PG_VALUE": {
"desc": "BUFFER_PG_WRONG_PG_VALUE pattern failure",
"eStr": ["Invalid Buffer PG number" ]
},
"BUFFER_PG_WRONG_INTERFACE_VALUE": {
"desc": "BUFFER_PG_WRONG_INTERFACE_VALUE pattern failure",
"eStr": ["wrong"]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"BUFFER_POOL_CORRECT_TYPE_INGRESS_VALUE": {
"desc": "BUFFER_POOL_CORRECT_TYPE_INGRESS_VALUE no failure."
},
"BUFFER_POOL_CORRECT_TYPE_EGRESS_VALUE": {
"desc": "BUFFER_POOL_CORRECT_TYPE_EGRESS_VALUE no failure."
},
"BUFFER_POOL_WRONG_TYPE_VALUE": {
"desc": "BUFFER_POOL_WRONG_TYPE_VALUE pattern failure.",
"eStr": ["wrong" ]
},
"BUFFER_POOL_CORRECT_MODE_STATIC_VALUE": {
"desc": "BUFFER_POOL_CORRECT_MODE_STATIC_VALUE no failure."
},
"BUFFER_POOL_CORRECT_MODE_DYNAMIC_VALUE": {
"desc": "BUFFER_POOL_CORRECT_MODE_DYNAMIC_VALUE no failure."
},
"BUFFER_POOL_WRONG_MODE_VALUE": {
"desc": "BUFFER_POOL_WRONG_MODE_VALUE pattern failure.",
"eStr": ["wrong" ]
},
"BUFFER_POOL_CORRECT_SIZE_VALUE": {
"desc": "BUFFER_POOL_CORRECT_SIZE_VALUE no failure."
},
"BUFFER_POOL_WRONG_SIZE_VALUE": {
"desc": "BUFFER_POOL_WRONG_SIZE_VALUE no failure.",
"eStr": ["wrong" ]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"BUFFER_PROFILE_CORRECT_STATIC_THRESHOLD_VALUE": {
"desc": "BUFFER_PROFILE_CORRECT_STATIC_THRESHOLD_VALUE no failure."
},
"BUFFER_PROFILE_WRONG_STATIC_THRESHOLD_VALUE": {
"desc": "BUFFER_PROFILE_WRONG_STATIC_THRESHOLD_VALUE pattern failure.",
"eStr": ["-1" ]
},
"BUFFER_PROFILE_CORRECT_DYNAMIC_THRESHOLD_VALUE": {
"desc": "BUFFER_PROFILE_CORRECT_DYNAMIC_THRESHOLD_VALUE no failure."
},
"BUFFER_PROFILE_CORRECT_SIZE_VALUE": {
"desc": "BUFFER_PROFILE_CORRECT_SIZE_VALUE no failure."
},
"BUFFER_PROFILE_WRONG_SIZE_VALUE": {
"desc": "BUFFER_PROFILE_WRONG_SIZE_VALUE pattern failure.",
"eStr": ["-1" ]
},
"BUFFER_PROFILE_CORRECT_POOL_VALUE": {
"desc": "BUFFER_PROFILE_CORRECT_POOL_VALUE no failure."
},
"BUFFER_PROFILE_WRONG_POOL_VALUE": {
"desc": "BUFFER_PROFILE_WRONG_POOL_VALUE pattern failure.",
"eStr": ["wrong" ]
},
"BUFFER_PROFILE_CORRECT_XON_OFFSET_VALUE": {
"desc": "BUFFER_PROFILE_CORRECT_XON_OFFSET_VALUE no failure."
},
"BUFFER_PROFILE_CORRECT_XON_VALUE": {
"desc": "BUFFER_PROFILE_CORRECT_XON_VALUE no failure."
},
"BUFFER_PROFILE_CORRECT_XOFF_VALUE": {
"desc": "BUFFER_PROFILE_CORRECT_XOFF_VALUE no failure."
},
"BUFFER_PROFILE_WRONG_XOFF_VALUE": {
"desc": "BUFFER_PROFILE_WRONG_XOFF_VALUE no failure.",
"eStr": ["-1" ]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"BUFFER_QUEUE_CORRECT_PROFILE_VALUE": {
"desc": "BUFFER_QUEUE_CORRECT_PROFILE_VALUE no failure"
},
"BUFFER_QUEUE_WRONG_PROFILE_VALUE": {
"desc": "BUFFER_QUEUE_WRONG_PROFILE_VALUE pattern failure",
"eStr": ["wrong" ]
},
"BUFFER_QUEUE_WRONG_QUEUE_VALUE": {
"desc": "BUFFER_QUEUE_WRONG_QUEUE_VALUE pattern failure",
"eStr": ["Invalid Q-index" ]
},
"BUFFER_QUEUE_WRONG_INTERFACE_VALUE": {
"desc": "BUFFER_QUEUE_WRONG_INTERFACE_VALUE pattern failure",
"eStr": ["wrong"]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
{
"BUFFER_PG_CORRECT_PROFILE_VALUE": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"admin_status": "up",
"alias": "eth0",
"description": "Ethernet0",
"lanes": "65",
"mtu": 9000,
"name": "Ethernet4",
"tpid": "0x8100",
"speed": 25000
}
]
}
},
"sonic-buffer-pool:sonic-buffer-pool": {
"sonic-buffer-pool:BUFFER_POOL": {
"BUFFER_POOL_LIST": [
{
"name": "egress_lossless_pool",
"mode": "static",
"size": 300,
"type": "ingress"
}
]
}
},
"sonic-buffer-profile:sonic-buffer-profile": {
"sonic-buffer-profile:BUFFER_PROFILE": {
"BUFFER_PROFILE_LIST": [
{
"name": "lossless_buffer_profile",
"pool": "egress_lossless_pool"
}
]
}
},
"sonic-buffer-pg:sonic-buffer-pg": {
"sonic-buffer-pg:BUFFER_PG": {
"BUFFER_PG_LIST": [
{
"ifname": "Ethernet4",
"pg_num": "3",
"profile": "lossless_buffer_profile"
}
]
}
}
},
"BUFFER_PG_WRONG_PROFILE_VALUE": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"admin_status": "up",
"alias": "eth0",
"description": "Ethernet0",
"lanes": "65",
"mtu": 9000,
"name": "Ethernet4",
"tpid": "0x8100",
"speed": 25000
}
]
}
},
"sonic-buffer-pool:sonic-buffer-pool": {
"sonic-buffer-pool:BUFFER_POOL": {
"BUFFER_POOL_LIST": [
{
"name": "egress_lossless_pool",
"mode": "static",
"size": 300,
"type": "ingress"
}
]
}
},
"sonic-buffer-profile:sonic-buffer-profile": {
"sonic-buffer-profile:BUFFER_PROFILE": {
"BUFFER_PROFILE_LIST": [
{
"name": "lossless_buffer_profile",
"pool": "egress_lossless_pool"
}
]
}
},
"sonic-buffer-pg:sonic-buffer-pg": {
"sonic-buffer-pg:BUFFER_PG": {
"BUFFER_PG_LIST": [
{
"ifname": "Ethernet4",
"pg_num": "3",
"profile": "wrong"
}
]
}
}
},
"BUFFER_PG_WRONG_PG_VALUE": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"admin_status": "up",
"alias": "eth0",
"description": "Ethernet0",
"lanes": "65",
"mtu": 9000,
"name": "Ethernet4",
"tpid": "0x8100",
"speed": 25000
}
]
}
},
"sonic-buffer-pool:sonic-buffer-pool": {
"sonic-buffer-pool:BUFFER_POOL": {
"BUFFER_POOL_LIST": [
{
"name": "egress_lossless_pool",
"mode": "static",
"size": 300,
"type": "ingress"
}
]
}
},
"sonic-buffer-profile:sonic-buffer-profile": {
"sonic-buffer-profile:BUFFER_PROFILE": {
"BUFFER_PROFILE_LIST": [
{
"name": "lossless_buffer_profile",
"pool": "egress_lossless_pool"
}
]
}
},
"sonic-buffer-pg:sonic-buffer-pg": {
"sonic-buffer-pg:BUFFER_PG": {
"BUFFER_PG_LIST": [
{
"ifname": "Ethernet4",
"pg_num": "9",
"profile": "lossless_buffer_profile"
}
]
}
}
},
"BUFFER_PG_WRONG_INTERFACE_VALUE": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"admin_status": "up",
"alias": "eth0",
"description": "Ethernet0",
"lanes": "65",
"mtu": 9000,
"name": "Ethernet4",
"tpid": "0x8100",
"speed": 25000
}
]
}
},
"sonic-buffer-pool:sonic-buffer-pool": {
"sonic-buffer-pool:BUFFER_POOL": {
"BUFFER_POOL_LIST": [
{
"name": "egress_lossless_pool",
"mode": "static",
"size": 300,
"type": "ingress"
}
]
}
},
"sonic-buffer-profile:sonic-buffer-profile": {
"sonic-buffer-profile:BUFFER_PROFILE": {
"BUFFER_PROFILE_LIST": [
{
"name": "lossless_buffer_profile",
"pool": "egress_lossless_pool"
}
]
}
},
"sonic-buffer-pg:sonic-buffer-pg": {
"sonic-buffer-pg:BUFFER_PG": {
"BUFFER_PG_LIST": [
{
"ifname": "wrong",
"pg_num": "4",
"profile": "lossless_buffer_profile"
}
]
}
}
}
}
Loading