Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPCasCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hpc-team
HPCasCode
Commits
41229efd
Commit
41229efd
authored
3 years ago
by
Andreas Hamacher
Browse files
Options
Downloads
Plain Diff
Merge branch 'mellanoxcfgchg' into 'master'
Mellanoxcfgchg See merge request
!533
parents
5f6de7fa
bf444d4d
No related branches found
No related tags found
1 merge request
!533
Mellanoxcfgchg
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
roles/mellanox_config/tasks/rocev2.yml
+3
-3
3 additions, 3 deletions
roles/mellanox_config/tasks/rocev2.yml
roles/mellanox_config/templates/pfc-ecn.sh.j2
+17
-4
17 additions, 4 deletions
roles/mellanox_config/templates/pfc-ecn.sh.j2
with
20 additions
and
7 deletions
roles/mellanox_config/tasks/rocev2.yml
+
3
−
3
View file @
41229efd
...
@@ -15,10 +15,10 @@
...
@@ -15,10 +15,10 @@
debug
:
debug
:
var
:
qibdevicenames
var
:
qibdevicenames
-
name
:
copy
pfc-ecn script
-
name
:
template
pfc-ecn script
become
:
true
become
:
true
copy
:
template
:
src
:
files/
pfc-ecn.sh
src
:
pfc-ecn.sh
.j2
dest
:
/usr/sbin/pfc-ecn.sh
dest
:
/usr/sbin/pfc-ecn.sh
owner
:
root
owner
:
root
group
:
root
group
:
root
...
...
This diff is collapsed.
Click to expand it.
roles/mellanox_config/
fil
es/pfc-ecn.sh
→
roles/mellanox_config/
templat
es/pfc-ecn.sh
.j2
+
17
−
4
View file @
41229efd
...
@@ -32,15 +32,17 @@ fi
...
@@ -32,15 +32,17 @@ fi
# Syntax: mlnx_qos -i <interface> --trust dscp
# Syntax: mlnx_qos -i <interface> --trust dscp
# Example: /bin/mlnx_qos -i p5p1 --trust dscp
# Example: /bin/mlnx_qos -i p5p1 --trust dscp
{
%
if
"OpenStack Nova"
not
in
ansible_product_name %
}
for
int
in
"
${
mellanox_interface_array
[@]
}
"
;
do
for
int
in
"
${
mellanox_interface_array
[@]
}
"
;
do
printf
"
`
which mlnx_qos
`
-i
$int
--trust dscp
\n
"
printf
"
`
which mlnx_qos
`
-i
$int
--trust dscp
\n
"
`
which mlnx_qos
`
-i
$int
--trust
dscp
`
which mlnx_qos
`
-i
$int
--trust
dscp
done
done
{
% endif %
}
# Set ToS to 106 (DSCP 26) for ALL RoCE traffic
# Set ToS to 106 (DSCP 26) for ALL RoCE traffic
# Syntax: echo 106 > /sys/class/infiniband/<mlx-device>/tc/1/traffic_class
# Syntax: echo 106 > /sys/class/infiniband/<mlx-device>/tc/1/traffic_class
# Example: echo 106 > /sys/class/infiniband/mlx5_0/tc/1/traffic_class
# Example: echo 106 > /sys/class/infiniband/mlx5_0/tc/1/traffic_class
{
%
if
"OpenStack Nova"
not
in
ansible_product_name %
}
for
dev
in
"
${
mellanox_device_array
[@]
}
"
;
do
for
dev
in
"
${
mellanox_device_array
[@]
}
"
;
do
printf
"echo 106 > /sys/class/infiniband/
$dev
/tc/1/traffic_class
\n
"
printf
"echo 106 > /sys/class/infiniband/
$dev
/tc/1/traffic_class
\n
"
echo
106
>
/sys/class/infiniband/
$dev
/tc/1/traffic_class
echo
106
>
/sys/class/infiniband/
$dev
/tc/1/traffic_class
...
@@ -54,8 +56,6 @@ for dev in "${mellanox_device_array[@]}"; do
...
@@ -54,8 +56,6 @@ for dev in "${mellanox_device_array[@]}"; do
`
which cma_roce_tos
`
-d
$dev
-t
106
`
which cma_roce_tos
`
-d
$dev
-t
106
done
done
# Enable ECN for TCP traffic
/sbin/sysctl
-w
net.ipv4.tcp_ecn
=
1
# Enable PFC on RoCE prioritry - Activate PFC on priority 3
# Enable PFC on RoCE prioritry - Activate PFC on priority 3
# Syntax: mlnx_qos -i <interface> --pfc 0,0,0,1,0,0,0,0
# Syntax: mlnx_qos -i <interface> --pfc 0,0,0,1,0,0,0,0
...
@@ -64,4 +64,17 @@ done
...
@@ -64,4 +64,17 @@ done
for
int
in
"
${
mellanox_interface_array
[@]
}
"
;
do
for
int
in
"
${
mellanox_interface_array
[@]
}
"
;
do
printf
"
`
which mlnx_qos
`
-i
$int
--pfc 0,0,0,1,0,0,0,0
\n
"
printf
"
`
which mlnx_qos
`
-i
$int
--pfc 0,0,0,1,0,0,0,0
\n
"
`
which mlnx_qos
`
-i
$int
--pfc
0,0,0,1,0,0,0,0
`
which mlnx_qos
`
-i
$int
--pfc
0,0,0,1,0,0,0,0
done
done
\ No newline at end of file
{
% endif %
}
{
%
if
"OpenStack Nova"
in
ansible_product_name %
}
{
%
for
device
in
qibdevicenames.stdout_lines %
}
printf
"echo 106 > /sys/class/infiniband/{{ device }}/tc/1/traffic_class
\n
"
`
which cma_roce_tos
`
-d
{{
device
}}
-t
106
{
% endfor %
}
{
% endif %
}
# Enable ECN for TCP traffic
/sbin/sysctl
-w
net.ipv4.tcp_ecn
=
1
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment