Skip to content
Snippets Groups Projects
Commit 41229efd authored by Andreas Hamacher's avatar Andreas Hamacher
Browse files

Merge branch 'mellanoxcfgchg' into 'master'

Mellanoxcfgchg

See merge request !533
parents 5f6de7fa bf444d4d
No related branches found
No related tags found
1 merge request!533Mellanoxcfgchg
...@@ -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
......
...@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment