Skip to content

Commit

Permalink
Add support for switch BCM56971B0 in VS (sonic-net#1025)
Browse files Browse the repository at this point in the history
Needed when testing sairedis recordings from production devices on VS
  • Loading branch information
kcudnik authored Apr 5, 2022
1 parent 0d163b1 commit 8037c7d
Show file tree
Hide file tree
Showing 16 changed files with 33,432 additions and 4 deletions.
5 changes: 3 additions & 2 deletions syncd/ComparisonLogic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,7 @@ bool ComparisonLogic::performObjectSetTransition(

if (m_switch->isDiscoveredRid(rid))
{
SWSS_LOG_WARN("performing default on existing object VID %s: %s: %s, we need default dependency TREE, FIXME",
SWSS_LOG_INFO("performing default on existing object VID %s: %s: %s, we need default dependency TREE, FIXME",
sai_serialize_object_id(vid).c_str(),
meta->attridname,
currentAttr->getStrAttrValue().c_str());
Expand Down Expand Up @@ -2093,7 +2093,8 @@ void ComparisonLogic::removeCurrentObjectDependencyTree(
continue;
}

if (revgraph->attrmetadata->attrvaluetype != SAI_ATTR_VALUE_TYPE_OBJECT_ID)
if (revgraph->attrmetadata->attrvaluetype != SAI_ATTR_VALUE_TYPE_OBJECT_ID &&
revgraph->attrmetadata->attrvaluetype != SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_OBJECT_ID)
{
// currently we only support reference on OID, not list
SWSS_LOG_THROW("attr value type %d, not supported yet, FIXME",
Expand Down
20 changes: 20 additions & 0 deletions tests/BCM56971B0.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/perl

BEGIN { push @INC,'.'; }

use strict;
use warnings;
use diagnostics;

use utils;

sub test_brcm_acl_limit
{
fresh_start("-b", "$utils::DIR/break.ini", "-p", "$utils::DIR/vsprofile.ini");

play "acl_limit.rec";
}

test_brcm_acl_limit;

kill_syncd;
32,550 changes: 32,550 additions & 0 deletions tests/BCM56971B0/acl_limit.rec

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tests/BCM56971B0/break.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SAI_OBJECT_TYPE_ACL_TABLE
122 changes: 122 additions & 0 deletions tests/BCM56971B0/lanemap.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
eth0:5,6
eth1:7,8
eth2:13,14
eth3:15,16
eth4:25,26
eth5:27,28
eth6:21,22
eth7:23,24
eth8:37,38
eth9:39,40
eth10:45,46
eth11:47,48
eth12:57,58,59,60
eth13:53,54,55,56
eth14:9,10
eth15:11,12
eth16:1,2
eth17:3,4
eth18:17,18
eth19:19,20
eth20:29,30
eth21:31,32
eth22:41,42
eth23:43,44
eth24:33,34
eth25:35,36
eth26:49,50
eth27:51,52
eth28:61,62
eth29:63,64
eth30:77,78
eth31:79,80
eth32:65,66
eth33:67,68
eth34:85,86
eth35:87,88
eth36:89,90
eth37:91,92
eth38:109,110
eth39:111,112
eth40:97,98
eth41:99,100
eth42:117,118,119,120
eth43:121,122,123,124
eth44:69,70
eth45:71,72
eth46:73,74
eth47:75,76
eth48:93,94
eth49:95,96
eth50:81,82
eth51:83,84
eth52:101,102
eth53:103,104
eth54:105,106
eth55:107,108
eth56:125,126
eth57:127,128
eth58:113,114
eth59:115,116
eth60:257
eth61:141,142,143,144
eth62:133,134,135,136
eth63:149,150
eth64:151,152
eth65:153,154
eth66:155,156
eth67:173,174
eth68:175,176
eth69:161,162
eth70:163,164
eth71:181,182
eth72:183,184
eth73:185,186
eth74:187,188
eth75:129,130
eth76:131,132
eth77:137,138
eth78:139,140
eth79:157,158
eth80:159,160
eth81:145,146
eth82:147,148
eth83:165,166
eth84:167,168
eth85:169,170
eth86:171,172
eth87:189,190
eth88:191,192
eth89:177,178
eth90:179,180
eth91:259
eth92:197,198,199,200
eth93:205,206,207,208
eth94:217,218
eth95:219,220
eth96:213,214
eth97:215,216
eth98:229,230
eth99:231,232
eth100:237,238
eth101:239,240
eth102:249,250
eth103:251,252
eth104:245,246
eth105:247,248
eth106:201,202
eth107:203,204
eth108:193,194
eth109:195,196
eth110:209,210
eth111:211,212
eth112:221,222
eth113:223,224
eth114:233,234
eth115:235,236
eth116:225,226
eth117:227,228
eth118:241,242
eth119:243,244
eth120:253,254
eth121:255,256
1 change: 1 addition & 0 deletions tests/BCM56971B0/limits.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SAI_OBJECT_TYPE_ACL_TABLE=3
122 changes: 122 additions & 0 deletions tests/BCM56971B0/limits122.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
:5,6
:7,8
:13,14
:15,16
:25,26
:27,28
:21,22
:23,24
:37,38
:39,40
:45,46
:47,48
:57,58,59,60
:53,54,55,56
:9,10
:11,12
:1,2
:3,4
:17,18
:19,20
:29,30
:31,32
:41,42
:43,44
:33,34
:35,36
:49,50
:51,52
:61,62
:63,64
:77,78
:79,80
:65,66
:67,68
:85,86
:87,88
:89,90
:91,92
:109,110
:111,112
:97,98
:99,100
:117,118,119,120
:121,122,123,124
:69,70
:71,72
:73,74
:75,76
:93,94
:95,96
:81,82
:83,84
:101,102
:103,104
:105,106
:107,108
:125,126
:127,128
:113,114
:115,116
:257
:141,142,143,144
:133,134,135,136
:149,150
:151,152
:153,154
:155,156
:173,174
:175,176
:161,162
:163,164
:181,182
:183,184
:185,186
:187,188
:129,130
:131,132
:137,138
:139,140
:157,158
:159,160
:145,146
:147,148
:165,166
:167,168
:169,170
:171,172
:189,190
:191,192
:177,178
:179,180
:259
:197,198,199,200
:205,206,207,208
:217,218
:219,220
:213,214
:215,216
:229,230
:231,232
:237,238
:239,240
:249,250
:251,252
:245,246
:247,248
:201,202
:203,204
:193,194
:195,196
:209,210
:211,212
:221,222
:223,224
:233,234
:235,236
:225,226
:227,228
:241,242
:243,244
:253,254
:255,256
5 changes: 5 additions & 0 deletions tests/BCM56971B0/vsprofile.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SAI_WARM_BOOT_READ_FILE=./sai_warmboot.bin
SAI_WARM_BOOT_WRITE_FILE=./sai_warmboot.bin
SAI_VS_SWITCH_TYPE=SAI_VS_SWITCH_TYPE_BCM56971B0
SAI_VS_INTERFACE_LANE_MAP_FILE=BCM56971B0/lanemap.ini
SAI_VS_RESOURCE_LIMITER_FILE=BCM56971B0/limits.ini
2 changes: 1 addition & 1 deletion tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ testclient_LDADD = -lhiredis -lswsscommon -lpthread \
$(top_srcdir)/lib/libsairedis.la $(top_srcdir)/syncd/libSyncd.a \
-L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta -lzmq $(CODE_COVERAGE_LIBS)

TESTS = aspellcheck.pl conflictnames.pl swsslogentercheck.sh checkwhitespace.sh tests BCM56850.pl MLNX2700.pl
TESTS = aspellcheck.pl conflictnames.pl swsslogentercheck.sh checkwhitespace.sh tests BCM56850.pl MLNX2700.pl BCM56971B0.pl
1 change: 1 addition & 0 deletions vslib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ libSaiVS_a_SOURCES = \
SelectableFd.cpp \
Signal.cpp \
SwitchBCM56850.cpp \
SwitchBCM56971B0.cpp \
SwitchBCM81724.cpp \
SwitchConfigContainer.cpp \
SwitchConfig.cpp \
Expand Down
Loading

0 comments on commit 8037c7d

Please sign in to comment.