Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"desc": "BUFFER_PG_WRONG_PG_VALUE pattern failure",
"eStr": "Invalid Buffer PG number"
},
"BUFFER_PG_NULL_PROFILE_VALUE": {
"desc": "BUFFER_PG_NULL_PROFILE_VALUE no failure"
},
"BUFFER_PG_WRONG_PORT_VALUE": {
"desc": "BUFFER_PG_WRONG_PORT_VALUE pattern failure",
"eStr": "wrong"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"desc": "BUFFER_QUEUE_WRONG_PROFILE_VALUE pattern failure",
"eStr": "wrong"
},
"BUFFER_QUEUE_NULL_PROFILE_VALUE": {
"desc": "BUFFER_QUEUE_WRONG_PROFILE_VALUE no failure"
},
"BUFFER_QUEUE_WRONG_QUEUE_VALUE": {
"desc": "BUFFER_QUEUE_WRONG_QUEUE_VALUE pattern failure",
"eStr": "Invalid Q-index"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,58 @@
}
}
},
"BUFFER_PG_NULL_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",
"size": "300",
"pool": "egress_lossless_pool"
}
]
}
},
"sonic-buffer-pg:sonic-buffer-pg": {
"sonic-buffer-pg:BUFFER_PG": {
"BUFFER_PG_LIST": [
{
"port": "Ethernet4",
"pg_num": "3",
"profile": "NULL"
}
]
}
}
},
"BUFFER_PG_WRONG_PROFILE_VALUE": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,58 @@
}
}
},
"BUFFER_QUEUE_NULL_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": "12766208",
"type": "ingress"
}
]
}
},
"sonic-buffer-profile:sonic-buffer-profile": {
"sonic-buffer-profile:BUFFER_PROFILE": {
"BUFFER_PROFILE_LIST": [
{
"name": "lossless_buffer_profile",
"size": "1518",
"pool": "egress_lossless_pool"
}
]
}
},
"sonic-buffer-queue:sonic-buffer-queue": {
"sonic-buffer-queue:BUFFER_QUEUE": {
"BUFFER_QUEUE_LIST": [
{
"port": "Ethernet4",
"qindex": "3",
"profile": "NULL"
}
]
}
}
},
"BUFFER_QUEUE_WRONG_QUEUE_VALUE": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
Expand Down
13 changes: 8 additions & 5 deletions src/sonic-yang-models/yang-models/sonic-buffer-pg.yang
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ module sonic-buffer-pg {
namespace "http://github.com/Azure/sonic-buffer-pg";
prefix bpg;

import sonic-extension {
prefix sonic-ext;
}
yang-version 1.1;

import sonic-port {
prefix prt;
Expand Down Expand Up @@ -54,8 +52,13 @@ module sonic-buffer-pg {

leaf profile {
default 0;
type leafref {
path "/bpf:sonic-buffer-profile/bpf:BUFFER_PROFILE/bpf:BUFFER_PROFILE_LIST/bpf:name";
type union {
type leafref {
path "/bpf:sonic-buffer-profile/bpf:BUFFER_PROFILE/bpf:BUFFER_PROFILE_LIST/bpf:name";
}
type string {
pattern "NULL";
}
}
description "Buffer Profile associated with Priority Group number for a port";
}
Expand Down
13 changes: 8 additions & 5 deletions src/sonic-yang-models/yang-models/sonic-buffer-queue.yang
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ module sonic-buffer-queue {
namespace "http://github.com/Azure/sonic-buffer-queue";
prefix bqueue;

import sonic-extension {
prefix sonic-ext;
}
yang-version 1.1;

import sonic-port {
prefix prt;
Expand Down Expand Up @@ -54,8 +52,13 @@ module sonic-buffer-queue {

leaf profile {
default 0;
type leafref {
path "/bpf:sonic-buffer-profile/bpf:BUFFER_PROFILE/bpf:BUFFER_PROFILE_LIST/bpf:name";
type union {
type leafref {
path "/bpf:sonic-buffer-profile/bpf:BUFFER_PROFILE/bpf:BUFFER_PROFILE_LIST/bpf:name";
}
type string {
pattern "NULL";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dynamic calculation is supported in BUFFER_PG only.
For BUFFER_QUEUE table, the profile should always be defined in the BUFFER_PROFILE table. So no need to change BUFFER_QUEUE.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stephenxs Are there other scenarios where NULL buffer profile may be configured apart from Dynamic calculation?

Copy link
Copy Markdown
Collaborator

@stephenxs stephenxs Mar 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dgsudharsan Only two:

  • profile in BUFFER_PG can be NULL, which is covered in this PR
  • size in BUFFER_POOL is optional, which has been taken into account

}
}
description "Buffer Profile associated with Priority Queue for a port";
}
Expand Down