1 heat_template_version: 2014-10-16
4 Example extra config for post-deployment
11 List of logical cores for OVS DPDK
15 description: Memory allocated for each socket
20 A list or range of physical CPU cores to be pinned to PMD
21 The given args will be appended to the tuned cpu-partitioning profile.
22 Ex. HostCpusList: '4-12' will tune cores from 4-12
28 type: OS::Heat::StructuredDeployment
30 server: {get_param: server}
31 config: {get_resource: OvsDpdkConfig}
34 type: OS::Heat::SoftwareConfig
48 for core in $(echo $list | sed 's/,/ /g')
52 if [ $max_idx -lt $index ]; then
56 for ((i=$max_idx;i>=0;i--));
60 for core in $(echo $list | sed 's/,/ /g')
64 bm[$index]=$((${bm[$index]} | $temp))
66 printf -v mask "%x" "${bm[$max_idx]}"
67 for ((i=$max_idx-1;i>=0;i--));
69 printf -v hex "%08x" "${bm[$i]}"
74 pmd_cpu_mask=$( get_mask $PMD_CORES )
75 dpdk_lcore_mask=$( get_mask $DPDK_CORES )
76 yum remove -y vpp-devel
77 yum install -y /root/dpdk_rpms/*
78 systemctl restart openvswitch
80 sed -i "s/#user\s*=.*/user = \"root\"/" /etc/libvirt/qemu.conf
81 sed -i "s/#group\s*=.*/group = \"root\"/" /etc/libvirt/qemu.conf
82 ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
83 if [ -n "$SOCKET_MEMORY" ]; then
84 ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem=$SOCKET_MEMORY
86 if [ -n "$pmd_cpu_mask" ]; then
87 ovs-vsctl --no-wait set Open_vSwitch . other_config:pmd-cpu-mask=$pmd_cpu_mask
89 if [ -n "$dpdk_lcore_mask" ]; then
90 ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-lcore-mask=$dpdk_lcore_mask
92 systemctl restart openvswitch
95 $DPDK_CORES: {get_param: OvsDpdkCoreList}
96 $PMD_CORES: {get_param: PmdCoreList}
97 $SOCKET_MEMORY: {get_param: OvsDpdkSocketMemory}
100 description: Output of the extra dpdk ovs deployment
101 value: {get_attr: [OvsDpdkSetup, deploy_stdout]}