Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Testing
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Testing
Commits
c7316230
Commit
c7316230
authored
May 13, 2014
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
smartbits-tester: vlan configuration for performance tests
parent
2e5cae01
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
switch_config.c
sw/smartbits-tester/switch_config.c
+1
-1
wrs_vlan_config.sh
sw/smartbits-tester/wrs_vlan_config.sh
+19
-2
No files found.
sw/smartbits-tester/switch_config.c
View file @
c7316230
...
...
@@ -5,7 +5,7 @@
int
wrs_config
(
char
*
ip
,
int
testno
)
{
char
cmd
[
100
];
int
list
[
7
]
=
{
211
,
212
,
221
,
222
,
225
,
226
,
227
};
int
list
[
16
]
=
{
211
,
212
,
221
,
222
,
225
,
226
,
227
,
311
,
312
,
313
,
314
,
315
,
321
,
322
,
331
,
332
};
sprintf
(
cmd
,
"ssh -p %d root@%s %s %d >/dev/null 2>&1"
,
WRS_PORT
,
ip
,
WRS_CONF_SCRIPT
,
list
[
testno
]);
return
system
(
cmd
);
...
...
sw/smartbits-tester/wrs_vlan_config.sh
View file @
c7316230
#!/bin/sh
# remove all possible VLANs
/wr/bin/rtu_stat vlan 1 1 0x0 1
/wr/bin/rtu_stat vlan 2 2 0x0 1
/wr/bin/rtu_stat vlan 3 3 0x0 1
/wr/bin/rtu_stat vlan 4 4 0x0 1
/wr/bin/rtu_stat vlan 5 5 0x0 1
/wr/bin/rtu_stat vlan 6 6 0x0 1
/wr/bin/rtu_stat vlan 7 7 0x0 1
/wr/bin/rtu_stat vlan 8 8 0x0 1
/wr/bin/rtu_stat vlan 9 9 0x0 1
/wr/bin/rtu_gd
-g
$1
if
[
"
$1
"
==
"211"
]
||
[
"
$1
"
==
"212"
]
;
then
if
[
"
$1
"
==
"211"
]
||
[
"
$1
"
==
"212"
]
||
[
"
$1
"
==
"311"
]
||
[
"
$1
"
==
"312"
]
||
[
"
$1
"
==
"313"
]
||
[
"
$1
"
==
"331"
]
;
then
#remove VLAN 1
/wr/bin/rtu_stat vlan 1 1 0x0 1
fi
...
...
@@ -16,7 +27,7 @@ if [ "$1" == "222" ]; then
/wr/bin/rtu_stat vlan 1 1 0x1
fi
if
[
"
$1
"
==
"227"
]
;
then
if
[
"
$1
"
==
"227"
]
||
[
"
$1
"
==
"321"
]
||
[
"
$1
"
==
"322"
]
;
then
/wr/bin/rtu_stat vlan 1 1 0x20001
/wr/bin/rtu_stat vlan 2 2 0x00006
/wr/bin/rtu_stat vlan 3 3 0x00018
...
...
@@ -27,3 +38,9 @@ if [ "$1" == "227" ]; then
/wr/bin/rtu_stat vlan 8 8 0x06000
/wr/bin/rtu_stat vlan 9 9 0x18000
fi
if
[
"
$1
"
==
"314"
]
||
[
"
$1
"
==
"315"
]
||
[
"
$1
"
==
"332"
]
;
then
/wr/bin/rtu_stat vlan 1 1 0x3
/wr/bin/rtu_stat vlan 2 2 0x30000
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment