-
Notifications
You must be signed in to change notification settings - Fork 770
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mlnx][fanout] simplify mlnx pfc storm on fanout functionality (#1182)
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
- Loading branch information
1 parent
1d726e3
commit 2f2f25b
Showing
10 changed files
with
24 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
|
||
/root/pfc_gen.py `cat /storm/args` | ||
sleep inf |
3 changes: 0 additions & 3 deletions
3
ansible/roles/test/files/mlnx/docker-tests-saveargs/Dockerfile
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
ansible/roles/test/files/mlnx/docker-tests-saveargs/save_args.sh
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
{% set container_name = "storm" ~ "_" ~ (1).__lshift__(pfc_queue_index) ~ "_" ~ pfc_frames_number ~ "_" ~ pfc_fanout_interface | replace("ernet 1/", "") | replace("/", "_") ~ "_" ~ ansible_eth0_ipv4_addr | replace(".", "_") %} | ||
{% set container_name = "storm" %} | ||
|
||
enable | ||
configure terminal | ||
docker no start {{ container_name }} | ||
|
||
docker exec {{ container_name }} /bin/bash | ||
cd /root/ | ||
{% if (pfc_asym is defined) and (pfc_asym == True) %} | ||
docker exec args "/root/save_args.sh -p {{pfc_queue_index}} -t 65535 -n {{pfc_frames_number}} -i {{pfc_fanout_interface | replace("ernet 1/", "") | replace("/", "_")}}" | ||
{% if pfc_storm_defer_time is defined %} sleep {{pfc_storm_defer_time}} &&{% endif %} python {{pfc_gen_file}} -p {{pfc_queue_index}} -t 65535 -n {{pfc_frames_number}} -i {{pfc_fanout_interface | replace("ernet 1/", "") | replace("/", "_")}} & | ||
{% else %} | ||
docker exec args "/root/save_args.sh -p {{(1).__lshift__(pfc_queue_index)}} -t 65535 -n {{pfc_frames_number}} -i {{pfc_fanout_interface | replace("ernet 1/", "") | replace("/", "_")}} -r {{ansible_eth0_ipv4_addr}}" | ||
{% if pfc_storm_defer_time is defined %} sleep {{pfc_storm_defer_time}} &&{% endif %} python {{pfc_gen_file}} -p {{(1).__lshift__(pfc_queue_index)}} -t 65535 -n {{pfc_frames_number}} -i {{pfc_fanout_interface | replace("ernet 1/", "") | replace("/", "_")}} -r {{ansible_eth0_ipv4_addr}} & | ||
{% endif %} | ||
|
||
ping -c 3 127.0.0.1 | ||
docker start pfc_storm latest {{ container_name }} now label storm privileged sdk network | ||
ping -c 7 127.0.0.1 | ||
exit | ||
|
||
exit | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
{% set container_name = "storm" ~ "_" ~ (1).__lshift__(pfc_queue_index) ~ "_" ~ pfc_frames_number ~ "_" ~ pfc_fanout_interface | replace("ernet 1/", "") | replace("/", "_") ~ "_" ~ ansible_eth0_ipv4_addr | replace(".", "_") %} | ||
|
||
{% set container_name = "storm" %} | ||
enable | ||
configure terminal | ||
|
||
docker no start {{ container_name }} | ||
ping -c 7 127.0.0.1 | ||
docker exec {{ container_name }} /bin/bash | ||
cd /root/ | ||
|
||
{% if pfc_storm_stop_defer_time is defined %} sleep {{pfc_storm_stop_defer_time}} &&{% endif %} pkill -f "python {{pfc_gen_file}} -p {{(1).__lshift__(pfc_queue_index)}} -t 65535 -n {{pfc_frames_number}} -i {{pfc_fanout_interface | replace("ernet 1/", "") | replace("/", "_")}} -r {{ansible_eth0_ipv4_addr}}" {% if pfc_storm_stop_defer_time is defined %}&{% endif %} | ||
|
||
exit | ||
|
||
exit | ||
exit |