Skip to content

Commit 42b15cb

Browse files
committed
test
1 parent f5ef92e commit 42b15cb

11 files changed

+78
-78
lines changed

cfgmgr/buffermgr.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Create/update two tables: profile (in m_cfgBufferProfileTable) and port buffer (
106106
107107
"BUFFER_PROFILE": {
108108
"pg_lossless_100G_300m_profile": {
109-
"pool":"[BUFFER_POOL_TABLE:ingress_lossless_pool]",
109+
"pool":"ingress_lossless_pool",
110110
"xon":"18432",
111111
"xon_offset":"2496",
112112
"xoff":"165888",
@@ -116,7 +116,7 @@ Create/update two tables: profile (in m_cfgBufferProfileTable) and port buffer (
116116
}
117117
"BUFFER_PG" :{
118118
Ethernet44|3-4": {
119-
"profile" : "[BUFFER_PROFILE:pg_lossless_100000_300m_profile]"
119+
"profile" : "pg_lossless_100000_300m_profile"
120120
}
121121
}
122122
*/

doc/Configuration.md

+21-21
Original file line numberDiff line numberDiff line change
@@ -343,13 +343,13 @@ When the system is running in traditional buffer model, profiles needs to explic
343343
{
344344
"BUFFER_PG": {
345345
"Ethernet0|3-4": {
346-
"profile": "[BUFFER_PROFILE|pg_lossless_40000_5m_profile]"
346+
"profile": "pg_lossless_40000_5m_profile"
347347
},
348348
"Ethernet1|3-4": {
349-
"profile": "[BUFFER_PROFILE|pg_lossless_40000_5m_profile]"
349+
"profile": "pg_lossless_40000_5m_profile"
350350
},
351351
"Ethernet2|3-4": {
352-
"profile": "[BUFFER_PROFILE|pg_lossless_40000_5m_profile]"
352+
"profile": "pg_lossless_40000_5m_profile"
353353
}
354354
}
355355
}
@@ -371,7 +371,7 @@ When the system is running in dynamic buffer model, profiles can be:
371371
"profile": "NULL"
372372
},
373373
"Ethernet2|3-4": {
374-
"profile": "[BUFFER_PROFILE|static_profile]"
374+
"profile": "static_profile"
375375
}
376376
}
377377
}
@@ -437,33 +437,33 @@ When the system is running in dynamic buffer model, the size of some of the buff
437437
"BUFFER_PROFILE": {
438438
"egress_lossless_profile": {
439439
"static_th": "3995680",
440-
"pool": "[BUFFER_POOL|egress_lossless_pool]",
440+
"pool": "egress_lossless_pool",
441441
"size": "1518"
442442
},
443443
"egress_lossy_profile": {
444444
"dynamic_th": "3",
445-
"pool": "[BUFFER_POOL|egress_lossy_pool]",
445+
"pool": "egress_lossy_pool",
446446
"size": "1518"
447447
},
448448
"ingress_lossy_profile": {
449449
"dynamic_th": "3",
450-
"pool": "[BUFFER_POOL|ingress_lossless_pool]",
450+
"pool": "ingress_lossless_pool",
451451
"size": "0"
452452
},
453453
"pg_lossless_40000_5m_profile": {
454454
"xon_offset": "2288",
455455
"dynamic_th": "-3",
456456
"xon": "2288",
457457
"xoff": "66560",
458-
"pool": "[BUFFER_POOL|ingress_lossless_pool]",
458+
"pool": "ingress_lossless_pool",
459459
"size": "1248"
460460
},
461461
"pg_lossless_40000_40m_profile": {
462462
"xon_offset": "2288",
463463
"dynamic_th": "-3",
464464
"xon": "2288",
465465
"xoff": "71552",
466-
"pool": "[BUFFER_POOL|ingress_lossless_pool]",
466+
"pool": "ingress_lossless_pool",
467467
"size": "1248"
468468
}
469469
}
@@ -491,13 +491,13 @@ This kind of profiles will be handled by buffer manager and won't be applied to
491491
{
492492
"BUFFER_QUEUE": {
493493
"Ethernet50,Ethernet52,Ethernet54,Ethernet56|0-2": {
494-
"profile": "[BUFFER_PROFILE|egress_lossy_profile]"
494+
"profile": "egress_lossy_profile"
495495
},
496496
"Ethernet50,Ethernet52,Ethernet54,Ethernet56|3-4": {
497-
"profile": "[BUFFER_PROFILE|egress_lossless_profile]"
497+
"profile": "egress_lossless_profile"
498498
},
499499
"Ethernet50,Ethernet52,Ethernet54,Ethernet56|5-6": {
500-
"profile": "[BUFFER_PROFILE|egress_lossy_profile]"
500+
"profile": "egress_lossy_profile"
501501
}
502502
}
503503
}
@@ -1104,12 +1104,12 @@ name as object key and member list as attribute.
11041104
{
11051105
"PORT_QOS_MAP": {
11061106
"Ethernet50,Ethernet52,Ethernet54,Ethernet56": {
1107-
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
1108-
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]",
1107+
"tc_to_pg_map": "AZURE",
1108+
"tc_to_queue_map": "AZURE",
11091109
"pfc_enable": "3,4",
1110-
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]",
1111-
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
1112-
"scheduler": "[SCHEDULER|scheduler.port]"
1110+
"pfc_to_queue_map": "AZURE",
1111+
"dscp_to_tc_map": "AZURE",
1112+
"scheduler": "scheduler.port"
11131113
}
11141114
}
11151115
}
@@ -1120,14 +1120,14 @@ name as object key and member list as attribute.
11201120
{
11211121
"QUEUE": {
11221122
"Ethernet56|4": {
1123-
"wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]",
1124-
"scheduler": "[SCHEDULER|scheduler.1]"
1123+
"wred_profile": "AZURE_LOSSLESS",
1124+
"scheduler": "scheduler.1"
11251125
},
11261126
"Ethernet56|5": {
1127-
"scheduler": "[SCHEDULER|scheduler.0]"
1127+
"scheduler": "scheduler.0"
11281128
},
11291129
"Ethernet56|6": {
1130-
"scheduler": "[SCHEDULER|scheduler.0]"
1130+
"scheduler": "scheduler.0"
11311131
}
11321132
}
11331133
}

doc/swss-schema.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ Stores information for physical switch ports managed by the switch chip. Ports t
3535
Example:
3636
127.0.0.1:6379> hgetall PORT_TABLE:ETHERNET4
3737
1) "dscp_to_tc_map"
38-
2) "[DSCP_TO_TC_MAP_TABLE:AZURE]"
38+
2) "AZURE"
3939
3) "tc_to_queue_map"
40-
4) "[TC_TO_QUEUE_MAP_TABLE:AZURE]"
40+
4) "AZURE"
4141

4242
---------------------------------------------
4343
### INTF_TABLE
@@ -209,9 +209,9 @@ and reflects the LAG ports into the redis under: `LAG_TABLE:<team0>:port`
209209
Example:
210210
127.0.0.1:6379> hgetall QUEUE_TABLE:ETHERNET4:1
211211
1) "scheduler"
212-
2) "[SCHEDULER_TABLE:BEST_EFFORT]"
212+
2) "BEST_EFFORT"
213213
3) "wred_profile"
214-
4) "[WRED_PROFILE_TABLE:AZURE]"
214+
4) "AZURE"
215215

216216
---------------------------------------------
217217
### TC\_TO\_QUEUE\_MAP\_TABLE

orchagent/bufferorch.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ task_process_status BufferOrch::processPriorityGroup(KeyOpFieldsValuesTuple &tup
904904
}
905905

906906
/*
907-
Input sample:"[BUFFER_PROFILE_TABLE:i_port.profile0],[BUFFER_PROFILE_TABLE:i_port.profile1]"
907+
Input sample:"i_port.profile0,i_port.profile1"
908908
*/
909909
task_process_status BufferOrch::processIngressBufferProfileList(KeyOpFieldsValuesTuple &tuple)
910910
{
@@ -962,7 +962,7 @@ task_process_status BufferOrch::processIngressBufferProfileList(KeyOpFieldsValue
962962
}
963963

964964
/*
965-
Input sample:"[BUFFER_PROFILE_TABLE:e_port.profile0],[BUFFER_PROFILE_TABLE:e_port.profile1]"
965+
Input sample:"e_port.profile0,e_port.profile1"
966966
*/
967967
task_process_status BufferOrch::processEgressBufferProfileList(KeyOpFieldsValuesTuple &tuple)
968968
{

orchagent/orch.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ bool Orch::bake()
301301
}
302302

303303
/*
304-
- Validates reference has proper format which is [table_name:object_name]
304+
- Validates reference has proper format which is not ABNF [table_name:object_name]
305305
- validates table_name exists
306306
- validates object with object_name exists
307307
@@ -557,7 +557,7 @@ ref_resolve_status Orch::resolveFieldRefArray(
557557
vector<sai_object_id_t> &sai_object_arr,
558558
string &object_name_list)
559559
{
560-
// example: [BUFFER_PROFILE_TABLE:e_port.profile0],[BUFFER_PROFILE_TABLE:e_port.profile1]
560+
// example: e_port.profile0,e_port.profile1
561561
SWSS_LOG_ENTER();
562562
size_t count = 0;
563563
sai_object_arr.clear();

swssconfig/sample/sample.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
},
1919
{
2020
"QOS_TABLE:PORT_TABLE:ETHERNET4": {
21-
"dscp_to_tc_map" : "[DSCP_TO_TC_MAP_TABLE:AZURE]",
22-
"tc_to_queue_map": "[TC_TO_QUEUE_MAP_TABLE:AZURE]"
21+
"dscp_to_tc_map" : "AZURE",
22+
"tc_to_queue_map": "AZURE"
2323
},
2424
"OP": "SET"
2525
},
@@ -46,9 +46,9 @@
4646
},
4747
{
4848
"QUEUE_TABLE:ETHERNET4:1" : {
49-
"scheduler" : "[SCHEDULER_TABLE:BEST_EFFORT]",
50-
"wred_profile" : "[WRED_PROFILE_TABLE:AZURE]"
49+
"scheduler" : "BEST_EFFORT",
50+
"wred_profile" : "AZURE"
5151
},
5252
"OP": "SET"
5353
}
54-
]
54+
]

swssconfig/sample/sample.json.output.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ hgetall WRED_PROFILE_TABLE:AZURE
6767
10) "8"
6868
127.0.0.1:6379> hgetall QUEUE_TABLE:ETHERNET4:1
6969
1) "scheduler"
70-
2) "[SCHEDULER_TABLE:BEST_EFFORT]"
70+
2) "BEST_EFFORT"
7171
3) "wred_profile"
72-
4) "[WRED_PROFILE_TABLE:AZURE]"
72+
4) "AZURE"
7373
127.0.0.1:6379> hgetall PORT_TABLE:ETHERNET4
7474
1) "dscp_to_tc_map"
75-
2) "[DSCP_TO_TC_MAP_TABLE:AZURE]"
75+
2) "AZURE"
7676
3) "tc_to_queue_map"
77-
4) "[TC_TO_QUEUE_MAP_TABLE:AZURE]"
77+
4) "AZURE"
7878
127.0.0.1:6379>
7979

8080
hgetall TC_TO_QUEUE_MAP_TABLE:AZURE

tests/buffer_model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def disable_dynamic_buffer(config_db, cmd_runner):
6969
pgs = config_db.get_keys('BUFFER_PG')
7070
for key in pgs:
7171
pg = config_db.get_entry('BUFFER_PG', key)
72-
if pg['profile'] != '[BUFFER_PROFILE|ingress_lossy_profile]':
72+
if pg['profile'] != 'ingress_lossy_profile':
7373
config_db.delete_entry('BUFFER_PG', key)
7474

7575
# Remove all the non-default profiles

0 commit comments

Comments
 (0)