feat:add trex master and latency core env

This commit is contained in:
linxin
2024-06-26 18:41:27 +08:00
committed by 林鑫
parent f92c949e15
commit 9df6437f1d
3 changed files with 8 additions and 3 deletions

View File

@@ -323,6 +323,7 @@ poll_wait_enable=1
virtaddr=0x500000000000
loglevel=7
huge-dir=/run/mrzcpd/hugepages
legacy_mem=0
[keepalive]
check_spinlock=1

View File

@@ -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

View File

@@ -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