From f8735efc285b6cc3aba66713c5e11a73846949a3 Mon Sep 17 00:00:00 2001
From: handreas <andreas.hamacher@monash.edu>
Date: Tue, 7 Dec 2021 21:28:43 +1100
Subject: [PATCH] bugfix traffic class was not set on VMs

---
 roles/mellanox_config/templates/pfc-ecn.sh.j2 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/roles/mellanox_config/templates/pfc-ecn.sh.j2 b/roles/mellanox_config/templates/pfc-ecn.sh.j2
index be5f4291..b13e891e 100644
--- a/roles/mellanox_config/templates/pfc-ecn.sh.j2
+++ b/roles/mellanox_config/templates/pfc-ecn.sh.j2
@@ -74,6 +74,8 @@ done
 {% 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"
+echo 106 > /sys/class/infiniband/{{ device }}/tc/1/traffic_class
+printf "`which cma_roce_tos` -d $dev -t 106 \n"
 `which cma_roce_tos` -d  {{ device }} -t 106
 {% endfor %}
 {% endif %}
-- 
GitLab