2 heat_template_version: 2014-10-16
5 Example extra config for post-deployment
12 List of logical cores for OVS DPDK
15 NeutronDpdkSocketMemory:
16 description: Memory allocated for each socket
21 A list or range of physical CPU cores to be pinned to PMD
22 The given args will be appended to the tuned cpu-partitioning profile.
23 Ex. HostCpusList: '4-12' will tune cores from 4-12
29 type: OS::Heat::StructuredDeployment
31 server: {get_param: server}
32 config: {get_resource: OvsDpdkConfig}
35 type: OS::Heat::SoftwareConfig
49 for core in $(echo $list | sed 's/,/ /g')
53 if [ $max_idx -lt $index ]; then
57 for ((i=$max_idx;i>=0;i--));
61 for core in $(echo $list | sed 's/,/ /g')
65 bm[$index]=$((${bm[$index]} | $temp))
67 printf -v mask "%x" "${bm[$max_idx]}"
68 for ((i=$max_idx-1;i>=0;i--));
70 printf -v hex "%08x" "${bm[$i]}"
75 pmd_cpu_mask=$( get_mask $PMD_CORES )
76 dpdk_lcore_mask=$( get_mask $DPDK_CORES )
77 yum remove -y vpp-devel
78 yum install -y /root/dpdk_rpms/*
79 systemctl restart openvswitch
81 sed -i "s/#user\s*=.*/user = \"root\"/" /etc/libvirt/qemu.conf
82 sed -i "s/#group\s*=.*/group = \"root\"/" /etc/libvirt/qemu.conf
83 ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
84 if [ -n "$SOCKET_MEMORY" ]; then
85 other_config="dpdk-socket-mem=$SOCKET_MEMORY"
86 ovs-vsctl --no-wait set Open_vSwitch . other_config:$other_config
88 if [ -n "$pmd_cpu_mask" ]; then
89 other_config="pmd-cpu-mask=$pmd_cpu_mask"
90 ovs-vsctl --no-wait set Open_vSwitch . other_config:$other_config
92 if [ -n "$dpdk_lcore_mask" ]; then
93 other_config="dpdk-lcore-mask=$dpdk_lcore_mask"
94 ovs-vsctl --no-wait set Open_vSwitch . other_config:$other_config
96 systemctl restart openvswitch
99 $DPDK_CORES: {get_param: HostCpusList}
100 $PMD_CORES: {get_param: NeutronDpdkCoreList}
101 $SOCKET_MEMORY: {get_param: NeutronDpdkSocketMemory}
104 description: Output of the extra dpdk ovs deployment
105 value: {get_attr: [OvsDpdkSetup, deploy_stdout]}