Merge "Fixes bugs in ovs dpdk"
authorFeng Pan <fpan@redhat.com>
Tue, 2 May 2017 20:38:56 +0000 (20:38 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Tue, 2 May 2017 20:38:56 +0000 (20:38 +0000)
build/first-boot.yaml
build/ovs-dpdk-preconfig.yaml

index 6cd874c..d4ac5df 100644 (file)
@@ -39,7 +39,7 @@ resources:
             echo vm.hugetlb_shm_group=0 >> /usr/lib/sysctl.d/00-system.conf
             echo vm.max_map_count=$(printf "%.0f" $(echo 2.2*$hugepage_count | bc)) >> /usr/lib/sysctl.d/00-system.conf
             echo kernel.shmmax=$(($hugepage_count * 2 * 1024 * 1024)) >> /usr/lib/sysctl.d/00-system.conf
-
+            rm -f /etc/sysconfig/network-scripts/ifcfg-*
             reboot
           params:
             $KERNEL_ARGS: {get_param: ComputeKernelArgs}
index d57b0b7..a4663ff 100644 (file)
@@ -83,10 +83,10 @@ resources:
             if [ -n "$SOCKET_MEMORY" ]; then
               ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem=$SOCKET_MEMORY
             fi
-            if [ -n "$pmd_cpu_mask" ]; then
+            if [[ -n "$pmd_cpu_mask" && -n "$PMD_CORES" ]]; then
               ovs-vsctl --no-wait set Open_vSwitch . other_config:pmd-cpu-mask=$pmd_cpu_mask
             fi
-            if [ -n "$dpdk_lcore_mask" ]; then
+            if [ -n "$dpdk_lcore_mask" && -n "$DPDK_CORES" ]]; then
               ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-lcore-mask=$dpdk_lcore_mask
             fi
             systemctl restart openvswitch