diff --git a/ansible/roles/mrzcpd/files/helm/templates/_config.tpl b/ansible/roles/mrzcpd/files/helm/templates/_config.tpl index ad1bf817..1ac61c28 100644 --- a/ansible/roles/mrzcpd/files/helm/templates/_config.tpl +++ b/ansible/roles/mrzcpd/files/helm/templates/_config.tpl @@ -323,6 +323,7 @@ poll_wait_enable=1 virtaddr=0x500000000000 loglevel=7 huge-dir=/run/mrzcpd/hugepages +legacy_mem=0 [keepalive] check_spinlock=1 diff --git a/ansible/roles/trex/files/generate-trex-conf.sh b/ansible/roles/trex/files/generate-trex-conf.sh index fb56972f..7c540584 100644 --- a/ansible/roles/trex/files/generate-trex-conf.sh +++ b/ansible/roles/trex/files/generate-trex-conf.sh @@ -14,7 +14,7 @@ done port_limit=${#arr[@]} declare -A NUMA -for cpu in ${CPU_AFFINITY[@]:2}; do +for cpu in ${CPU_AFFINITY[@]}; do numa_node=$(lscpu -p=CPU,NODE | grep "^$cpu," | cut -d',' -f2) NUMA[$numa_node]+="$cpu," done @@ -46,8 +46,8 @@ cat << EOF > /etc/trex_cfg.yaml dest_mac : "aa:bb:cc:dd:ee:fe" src_mac : "00:11:22:33:44:54" platform: - master_thread_id: ${CPU_AFFINITY[0]} - latency_thread_id: ${CPU_AFFINITY[1]} + master_thread_id: ${MASTER_IOCORE} + latency_thread_id: ${LATENCY_IOCORE} dual_if: EOF diff --git a/ansible/roles/trex/files/helm/templates/deployment.yaml b/ansible/roles/trex/files/helm/templates/deployment.yaml index f1d5b46d..0ea6bcbd 100644 --- a/ansible/roles/trex/files/helm/templates/deployment.yaml +++ b/ansible/roles/trex/files/helm/templates/deployment.yaml @@ -43,6 +43,10 @@ spec: hugepages-1Gi: {{.Values.trex.hugepages }}Gi memory: 100Mi env: + - name: MASTER_IOCORE + value: {{.Values.trex.master |quote}} + - name: LATENCY_IOCORE + value: {{.Values.trex.latency |quote}} - name: CPU_AFFINITY value: {{ range $index, $cpu :=.Values.trex.cpu_affinity -}}{{- if eq $index 0 -}}{{$cpu}}{{- else -}},{{$cpu}}{{- end -}}{{- end }} - name: TREX_PATH