Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
AshokDaparthi committed May 28, 2021
1 parent f5ef92e commit 42b15cb
Show file tree
Hide file tree
Showing 11 changed files with 78 additions and 78 deletions.
4 changes: 2 additions & 2 deletions cfgmgr/buffermgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Create/update two tables: profile (in m_cfgBufferProfileTable) and port buffer (
"BUFFER_PROFILE": {
"pg_lossless_100G_300m_profile": {
"pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]",
"pool":"ingress_lossless_pool",
"xon":"18432",
"xon_offset":"2496",
"xoff":"165888",
Expand All @@ -116,7 +116,7 @@ Create/update two tables: profile (in m_cfgBufferProfileTable) and port buffer (
}
"BUFFER_PG" :{
Ethernet44|3-4": {
"profile" : "[BUFFER_PROFILE:pg_lossless_100000_300m_profile]"
"profile" : "pg_lossless_100000_300m_profile"
}
}
*/
Expand Down
42 changes: 21 additions & 21 deletions doc/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,13 +343,13 @@ When the system is running in traditional buffer model, profiles needs to explic
{
"BUFFER_PG": {
"Ethernet0|3-4": {
"profile": "[BUFFER_PROFILE|pg_lossless_40000_5m_profile]"
"profile": "pg_lossless_40000_5m_profile"
},
"Ethernet1|3-4": {
"profile": "[BUFFER_PROFILE|pg_lossless_40000_5m_profile]"
"profile": "pg_lossless_40000_5m_profile"
},
"Ethernet2|3-4": {
"profile": "[BUFFER_PROFILE|pg_lossless_40000_5m_profile]"
"profile": "pg_lossless_40000_5m_profile"
}
}
}
Expand All @@ -371,7 +371,7 @@ When the system is running in dynamic buffer model, profiles can be:
"profile": "NULL"
},
"Ethernet2|3-4": {
"profile": "[BUFFER_PROFILE|static_profile]"
"profile": "static_profile"
}
}
}
Expand Down Expand Up @@ -437,33 +437,33 @@ When the system is running in dynamic buffer model, the size of some of the buff
"BUFFER_PROFILE": {
"egress_lossless_profile": {
"static_th": "3995680",
"pool": "[BUFFER_POOL|egress_lossless_pool]",
"pool": "egress_lossless_pool",
"size": "1518"
},
"egress_lossy_profile": {
"dynamic_th": "3",
"pool": "[BUFFER_POOL|egress_lossy_pool]",
"pool": "egress_lossy_pool",
"size": "1518"
},
"ingress_lossy_profile": {
"dynamic_th": "3",
"pool": "[BUFFER_POOL|ingress_lossless_pool]",
"pool": "ingress_lossless_pool",
"size": "0"
},
"pg_lossless_40000_5m_profile": {
"xon_offset": "2288",
"dynamic_th": "-3",
"xon": "2288",
"xoff": "66560",
"pool": "[BUFFER_POOL|ingress_lossless_pool]",
"pool": "ingress_lossless_pool",
"size": "1248"
},
"pg_lossless_40000_40m_profile": {
"xon_offset": "2288",
"dynamic_th": "-3",
"xon": "2288",
"xoff": "71552",
"pool": "[BUFFER_POOL|ingress_lossless_pool]",
"pool": "ingress_lossless_pool",
"size": "1248"
}
}
Expand Down Expand Up @@ -491,13 +491,13 @@ This kind of profiles will be handled by buffer manager and won't be applied to
{
"BUFFER_QUEUE": {
"Ethernet50,Ethernet52,Ethernet54,Ethernet56|0-2": {
"profile": "[BUFFER_PROFILE|egress_lossy_profile]"
"profile": "egress_lossy_profile"
},
"Ethernet50,Ethernet52,Ethernet54,Ethernet56|3-4": {
"profile": "[BUFFER_PROFILE|egress_lossless_profile]"
"profile": "egress_lossless_profile"
},
"Ethernet50,Ethernet52,Ethernet54,Ethernet56|5-6": {
"profile": "[BUFFER_PROFILE|egress_lossy_profile]"
"profile": "egress_lossy_profile"
}
}
}
Expand Down Expand Up @@ -1104,12 +1104,12 @@ name as object key and member list as attribute.
{
"PORT_QOS_MAP": {
"Ethernet50,Ethernet52,Ethernet54,Ethernet56": {
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]",
"tc_to_pg_map": "AZURE",
"tc_to_queue_map": "AZURE",
"pfc_enable": "3,4",
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
"scheduler": "[SCHEDULER|scheduler.port]"
"pfc_to_queue_map": "AZURE",
"dscp_to_tc_map": "AZURE",
"scheduler": "scheduler.port"
}
}
}
Expand All @@ -1120,14 +1120,14 @@ name as object key and member list as attribute.
{
"QUEUE": {
"Ethernet56|4": {
"wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]",
"scheduler": "[SCHEDULER|scheduler.1]"
"wred_profile": "AZURE_LOSSLESS",
"scheduler": "scheduler.1"
},
"Ethernet56|5": {
"scheduler": "[SCHEDULER|scheduler.0]"
"scheduler": "scheduler.0"
},
"Ethernet56|6": {
"scheduler": "[SCHEDULER|scheduler.0]"
"scheduler": "scheduler.0"
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions doc/swss-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ Stores information for physical switch ports managed by the switch chip. Ports t
Example:
127.0.0.1:6379> hgetall PORT_TABLE:ETHERNET4
1) "dscp_to_tc_map"
2) "[DSCP_TO_TC_MAP_TABLE:AZURE]"
2) "AZURE"
3) "tc_to_queue_map"
4) "[TC_TO_QUEUE_MAP_TABLE:AZURE]"
4) "AZURE"

---------------------------------------------
### INTF_TABLE
Expand Down Expand Up @@ -209,9 +209,9 @@ and reflects the LAG ports into the redis under: `LAG_TABLE:<team0>:port`
Example:
127.0.0.1:6379> hgetall QUEUE_TABLE:ETHERNET4:1
1) "scheduler"
2) "[SCHEDULER_TABLE:BEST_EFFORT]"
2) "BEST_EFFORT"
3) "wred_profile"
4) "[WRED_PROFILE_TABLE:AZURE]"
4) "AZURE"

---------------------------------------------
### TC\_TO\_QUEUE\_MAP\_TABLE
Expand Down
4 changes: 2 additions & 2 deletions orchagent/bufferorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ task_process_status BufferOrch::processPriorityGroup(KeyOpFieldsValuesTuple &tup
}

/*
Input sample:"[BUFFER_PROFILE_TABLE:i_port.profile0],[BUFFER_PROFILE_TABLE:i_port.profile1]"
Input sample:"i_port.profile0,i_port.profile1"
*/
task_process_status BufferOrch::processIngressBufferProfileList(KeyOpFieldsValuesTuple &tuple)
{
Expand Down Expand Up @@ -962,7 +962,7 @@ task_process_status BufferOrch::processIngressBufferProfileList(KeyOpFieldsValue
}

/*
Input sample:"[BUFFER_PROFILE_TABLE:e_port.profile0],[BUFFER_PROFILE_TABLE:e_port.profile1]"
Input sample:"e_port.profile0,e_port.profile1"
*/
task_process_status BufferOrch::processEgressBufferProfileList(KeyOpFieldsValuesTuple &tuple)
{
Expand Down
4 changes: 2 additions & 2 deletions orchagent/orch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ bool Orch::bake()
}

/*
- Validates reference has proper format which is [table_name:object_name]
- Validates reference has proper format which is not ABNF [table_name:object_name]
- validates table_name exists
- validates object with object_name exists
Expand Down Expand Up @@ -557,7 +557,7 @@ ref_resolve_status Orch::resolveFieldRefArray(
vector<sai_object_id_t> &sai_object_arr,
string &object_name_list)
{
// example: [BUFFER_PROFILE_TABLE:e_port.profile0],[BUFFER_PROFILE_TABLE:e_port.profile1]
// example: e_port.profile0,e_port.profile1
SWSS_LOG_ENTER();
size_t count = 0;
sai_object_arr.clear();
Expand Down
10 changes: 5 additions & 5 deletions swssconfig/sample/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
},
{
"QOS_TABLE:PORT_TABLE:ETHERNET4": {
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP_TABLE:AZURE]",
"tc_to_queue_map": "[TC_TO_QUEUE_MAP_TABLE:AZURE]"
"dscp_to_tc_map" : "AZURE",
"tc_to_queue_map": "AZURE"
},
"OP": "SET"
},
Expand All @@ -46,9 +46,9 @@
},
{
"QUEUE_TABLE:ETHERNET4:1" : {
"scheduler" : "[SCHEDULER_TABLE:BEST_EFFORT]",
"wred_profile" : "[WRED_PROFILE_TABLE:AZURE]"
"scheduler" : "BEST_EFFORT",
"wred_profile" : "AZURE"
},
"OP": "SET"
}
]
]
8 changes: 4 additions & 4 deletions swssconfig/sample/sample.json.output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ hgetall WRED_PROFILE_TABLE:AZURE
10) "8"
127.0.0.1:6379> hgetall QUEUE_TABLE:ETHERNET4:1
1) "scheduler"
2) "[SCHEDULER_TABLE:BEST_EFFORT]"
2) "BEST_EFFORT"
3) "wred_profile"
4) "[WRED_PROFILE_TABLE:AZURE]"
4) "AZURE"
127.0.0.1:6379> hgetall PORT_TABLE:ETHERNET4
1) "dscp_to_tc_map"
2) "[DSCP_TO_TC_MAP_TABLE:AZURE]"
2) "AZURE"
3) "tc_to_queue_map"
4) "[TC_TO_QUEUE_MAP_TABLE:AZURE]"
4) "AZURE"
127.0.0.1:6379>

hgetall TC_TO_QUEUE_MAP_TABLE:AZURE
Expand Down
2 changes: 1 addition & 1 deletion tests/buffer_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def disable_dynamic_buffer(config_db, cmd_runner):
pgs = config_db.get_keys('BUFFER_PG')
for key in pgs:
pg = config_db.get_entry('BUFFER_PG', key)
if pg['profile'] != '[BUFFER_PROFILE|ingress_lossy_profile]':
if pg['profile'] != 'ingress_lossy_profile':
config_db.delete_entry('BUFFER_PG', key)

# Remove all the non-default profiles
Expand Down
Loading

0 comments on commit 42b15cb

Please sign in to comment.