summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-01-23 00:17:00 +0000
committerGerrit Code Review <review@openstack.org>2017-01-23 00:17:00 +0000
commit70176c98b5a8ad1b8be893b1a97164dc856b9d69 (patch)
treeaffdf0cd3cd8f5e434d5f972442a9c9c9694e9df
parent24cbc038cefd211f689b335da19e2aeb2cd33ff3 (diff)
parent18b80bb1546329dda744c6ea5e4dffb055b4a1d5 (diff)
Merge "build ovs with dpdk from mos"
-rw-r--r--deployment_scripts/install.sh32
-rwxr-xr-xovs_build/build-ovs-dpdk.sh22
-rwxr-xr-xovs_build/build-ovs-nsh-dpdk.sh22
-rw-r--r--ovs_build/dpdk_16.07.fuel/debian/librte-eal2.symbols1
-rwxr-xr-xpre_build_hook8
5 files changed, 51 insertions, 34 deletions
diff --git a/deployment_scripts/install.sh b/deployment_scripts/install.sh
index 891e229..4a22685 100644
--- a/deployment_scripts/install.sh
+++ b/deployment_scripts/install.sh
@@ -11,7 +11,7 @@ dpdk=$3
11dpdk_socket_mem=${4:-''} 11dpdk_socket_mem=${4:-''}
12pmd_cpu_mask=${5:-'2'} 12pmd_cpu_mask=${5:-'2'}
13 13
14apt-get install -y dkms 14apt-get install -y --allow-unauthenticated dkms
15 15
16if [ $nsh = 'true' ] 16if [ $nsh = 'true' ]
17then 17then
@@ -22,9 +22,7 @@ then
22 dpkg -i python-openvswitch_2.6.1-1.nsh_all.deb 22 dpkg -i python-openvswitch_2.6.1-1.nsh_all.deb
23 if [ $dpdk = 'true' ] 23 if [ $dpdk = 'true' ]
24 then 24 then
25 dpkg -i libxenstore3.0*.deb 25 apt-get install -y --allow-unauthenticated dpdk dpdk-dev dpdk-dkms
26 dpkg -i libdpdk0_16.07-1_amd64.deb
27 dpkg -i dpdk_16.07-1_amd64.deb
28 dpkg -i openvswitch-switch-dpdk_2.6.1-1.nsh_amd64.deb 26 dpkg -i openvswitch-switch-dpdk_2.6.1-1.nsh_amd64.deb
29 fi 27 fi
30else 28else
@@ -33,21 +31,23 @@ else
33 dpkg -i openvswitch-common_2.6.90-1_amd64.deb 31 dpkg -i openvswitch-common_2.6.90-1_amd64.deb
34 dpkg -i openvswitch-switch_2.6.90-1_amd64.deb 32 dpkg -i openvswitch-switch_2.6.90-1_amd64.deb
35 dpkg -i python-openvswitch_2.6.90-1_all.deb 33 dpkg -i python-openvswitch_2.6.90-1_all.deb
36 if [[ $dpdk = 'true' && -n $dpdk_socket_mem ]] 34 if [ $dpdk = 'true' ]
37 then 35 then
38 dpkg -i libxenstore3.0*.deb 36 apt-get install -y --allow-unauthenticated dpdk dpdk-dev dpdk-dkms
39 dpkg -i libdpdk0_16.07-1_amd64.deb
40 dpkg -i dpdk_16.07-1_amd64.deb
41 dpkg -i openvswitch-switch-dpdk_2.6.90-1_amd64.deb 37 dpkg -i openvswitch-switch-dpdk_2.6.90-1_amd64.deb
42 38
43 #Set to 0, dpdk init script mount hugepages but don't change current allocation 39 fi
44 sed -i "s/[# ]*\(NR_2M_PAGES=\).*/\10/" /etc/dpdk/dpdk.conf 40fi
45 service dpdk start 41
42if [[ $dpdk = 'true' && -n $dpdk_socket_mem ]]
43then
44 #Set to 0, dpdk init script mount hugepages but don't change current allocation
45 sed -i "s/[# ]*\(NR_2M_PAGES=\).*/\10/" /etc/dpdk/dpdk.conf
46 service dpdk start
46 47
47 ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true 48 ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
48 ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="$dpdk_socket_mem" 49 ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="$dpdk_socket_mem"
49 ovs-vsctl --no-wait set Open_vSwitch . other_config:pmd-cpu-mask="$pmd_cpu_mask" 50 ovs-vsctl --no-wait set Open_vSwitch . other_config:pmd-cpu-mask="$pmd_cpu_mask"
50 51
51 service openvswitch-switch restart 52 service openvswitch-switch restart
52 fi
53fi 53fi
diff --git a/ovs_build/build-ovs-dpdk.sh b/ovs_build/build-ovs-dpdk.sh
index 3c05a83..ed1b984 100755
--- a/ovs_build/build-ovs-dpdk.sh
+++ b/ovs_build/build-ovs-dpdk.sh
@@ -10,15 +10,23 @@ BUILD_HOME=${BUILD_HOME:-/tmp/ovs-dpdk}
10 10
11export DEB_BUILD_OPTIONS='parallel=8 nocheck' 11export DEB_BUILD_OPTIONS='parallel=8 nocheck'
12 12
13sudo apt-get -y install devscripts dpkg-dev git wget 13sudo apt-get -y install devscripts dpkg-dev git wget dkms
14 14
15rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME} 15rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME}/deb
16 16
17cd ${BUILD_HOME} 17cd ${BUILD_HOME}
18wget -c http://fast.dpdk.org/rel/dpdk-16.07.tar.xz 18wget -c http://fast.dpdk.org/rel/dpdk-16.07.tar.xz
19xz -d dpdk-16.07.tar.xz; tar xvf dpdk-16.07.tar 19xz -d dpdk-16.07.tar.xz; tar xvf dpdk-16.07.tar
20cd dpdk-16.07 20cd dpdk-16.07
21cp -r ${BUILD_SRC}/dpdk_16.07/debian . 21cp -r ${BUILD_SRC}/dpdk_16.07.fuel/debian .
22cat << EOF > debian/changelog
23dpdk (16.07-0ubuntu5~u1604+fuel10) xenial; urgency=low
24
25 * Rebuild debian package
26 * update librte-eal2.symbols
27
28 -- Ruijing Guo <ruijing.guo@intel.com> $(date --rfc-2822)
29EOF
22 30
23# copy from debian/control 31# copy from debian/control
24sudo apt-get install -y debhelper \ 32sudo apt-get install -y debhelper \
@@ -38,8 +46,9 @@ sudo apt-get install -y debhelper \
38debian/rules build; fakeroot debian/rules binary 46debian/rules build; fakeroot debian/rules binary
39 47
40cd ${BUILD_HOME} 48cd ${BUILD_HOME}
49sudo apt-get install -y hwdata
41sudo dpkg -i *.deb 50sudo dpkg -i *.deb
42apt-get download libxenstore3.0 51mv *.deb ${BUILD_DEST}
43 52
44# copy from debian/control 53# copy from debian/control
45sudo apt-get install -y autoconf \ 54sudo apt-get install -y autoconf \
@@ -80,5 +89,6 @@ debian/rules build; fakeroot debian/rules binary
80cd ${BUILD_HOME}/ovs 89cd ${BUILD_HOME}/ovs
81debian/rules build; fakeroot debian/rules binary 90debian/rules build; fakeroot debian/rules binary
82 91
83cp -r ${BUILD_HOME}/*.deb ${BUILD_DEST} 92cp -r ${BUILD_HOME}/*.deb ${BUILD_HOME}/deb
84rm -rf ${BUILD_HOME} 93cd ${BUILD_HOME}/deb
94tar czvf ${BUILD_DEST}/ovs-dpdk.tar.gz .;
diff --git a/ovs_build/build-ovs-nsh-dpdk.sh b/ovs_build/build-ovs-nsh-dpdk.sh
index e2d52e4..00fbafa 100755
--- a/ovs_build/build-ovs-nsh-dpdk.sh
+++ b/ovs_build/build-ovs-nsh-dpdk.sh
@@ -10,15 +10,23 @@ BUILD_HOME=${BUILD_HOME:-/tmp/ovs-dpdk}
10 10
11export DEB_BUILD_OPTIONS='parallel=8 nocheck' 11export DEB_BUILD_OPTIONS='parallel=8 nocheck'
12 12
13sudo apt-get -y install devscripts dpkg-dev git wget 13sudo apt-get -y install devscripts dpkg-dev git wget dkms
14 14
15rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME} 15rm -rf ${BUILD_HOME}; mkdir -p ${BUILD_HOME}/deb
16 16
17cd ${BUILD_HOME} 17cd ${BUILD_HOME}
18wget -c http://fast.dpdk.org/rel/dpdk-16.07.tar.xz 18wget -c http://fast.dpdk.org/rel/dpdk-16.07.tar.xz
19xz -d dpdk-16.07.tar.xz; tar xvf dpdk-16.07.tar 19xz -d dpdk-16.07.tar.xz; tar xvf dpdk-16.07.tar
20cd dpdk-16.07 20cd dpdk-16.07
21cp -r ${BUILD_SRC}/dpdk_16.07/debian . 21cp -r ${BUILD_SRC}/dpdk_16.07.fuel/debian .
22cat << EOF > debian/changelog
23dpdk (16.07-0ubuntu5~u1604+fuel10) xenial; urgency=low
24
25 * Rebuild debian package
26 * update librte-eal2.symbols
27
28 -- Ruijing Guo <ruijing.guo@intel.com> $(date --rfc-2822)
29EOF
22 30
23# copy from debian/control 31# copy from debian/control
24sudo apt-get install -y debhelper \ 32sudo apt-get install -y debhelper \
@@ -38,8 +46,9 @@ sudo apt-get install -y debhelper \
38debian/rules build; fakeroot debian/rules binary 46debian/rules build; fakeroot debian/rules binary
39 47
40cd ${BUILD_HOME} 48cd ${BUILD_HOME}
49sudo apt-get install -y hwdata
41sudo dpkg -i *.deb 50sudo dpkg -i *.deb
42apt-get download libxenstore3.0 51mv *.deb ${BUILD_DEST}
43 52
44# copy from debian/control 53# copy from debian/control
45sudo apt-get install -y autoconf \ 54sudo apt-get install -y autoconf \
@@ -92,5 +101,6 @@ openvswitch (${OVS_VER}-1.nsh) unstable; urgency=low
92EOF 101EOF
93debian/rules build; fakeroot debian/rules binary 102debian/rules build; fakeroot debian/rules binary
94 103
95cp -r ${BUILD_HOME}/*.deb ${BUILD_DEST} 104cp -r ${BUILD_HOME}/*.deb ${BUILD_HOME}/deb
96rm -rf ${BUILD_HOME} 105cd ${BUILD_HOME}/deb
106tar czvf ${BUILD_DEST}/ovs-nsh-dpdk.tar.gz .;
diff --git a/ovs_build/dpdk_16.07.fuel/debian/librte-eal2.symbols b/ovs_build/dpdk_16.07.fuel/debian/librte-eal2.symbols
index cafe244..cec59ec 100644
--- a/ovs_build/dpdk_16.07.fuel/debian/librte-eal2.symbols
+++ b/ovs_build/dpdk_16.07.fuel/debian/librte-eal2.symbols
@@ -62,7 +62,6 @@ librte_eal.so.2 librte-eal2 #MINVER#
62 rte_eal_primary_proc_alive@DPDK_16.04 16.04 62 rte_eal_primary_proc_alive@DPDK_16.04 16.04
63 rte_eal_process_type@DPDK_2.0 16.04 63 rte_eal_process_type@DPDK_2.0 16.04
64 rte_eal_remote_launch@DPDK_2.0 16.04 64 rte_eal_remote_launch@DPDK_2.0 16.04
65 rte_eal_set_socket_permissions@DPDK_2.2 16.04
66 rte_eal_tailq_lookup@DPDK_2.0 16.04 65 rte_eal_tailq_lookup@DPDK_2.0 16.04
67 rte_eal_tailq_register@DPDK_2.0 16.04 66 rte_eal_tailq_register@DPDK_2.0 16.04
68 rte_eal_vdev_init@DPDK_2.0 16.04 67 rte_eal_vdev_init@DPDK_2.0 16.04
diff --git a/pre_build_hook b/pre_build_hook
index 63cf7b4..43b5936 100755
--- a/pre_build_hook
+++ b/pre_build_hook
@@ -16,14 +16,12 @@ function build_pkg {
16 DEB_DIR=${DIR}/deb-ovs-dpdk 16 DEB_DIR=${DIR}/deb-ovs-dpdk
17 rm -rf ${DEB_DIR}; mkdir -p ${DEB_DIR}; chmod 777 ${DEB_DIR}; 17 rm -rf ${DEB_DIR}; mkdir -p ${DEB_DIR}; chmod 777 ${DEB_DIR};
18 sudo docker run -v ${DEB_DIR}:/deb -t ovs_build /ovs_build/build-ovs-dpdk.sh 18 sudo docker run -v ${DEB_DIR}:/deb -t ovs_build /ovs_build/build-ovs-dpdk.sh
19 cd ${DEB_DIR}; tar czvf ../repositories/ubuntu/ovs-dpdk.tar.gz .; 19 cp -r ${DEB_DIR}/* ${DIR}/repositories/ubuntu/
20 cd ..; rm -rf ${DEB_DIR}
21 20
22 DEB_DIR=${DIR}/deb-ovs-nsh-dpdk
23 rm -rf ${DEB_DIR}; mkdir -p ${DEB_DIR}; chmod 777 ${DEB_DIR}; 21 rm -rf ${DEB_DIR}; mkdir -p ${DEB_DIR}; chmod 777 ${DEB_DIR};
24 sudo docker run -v ${DEB_DIR}:/deb -t ovs_build /ovs_build/build-ovs-nsh-dpdk.sh 22 sudo docker run -v ${DEB_DIR}:/deb -t ovs_build /ovs_build/build-ovs-nsh-dpdk.sh
25 cd ${DEB_DIR}; tar czvf ../repositories/ubuntu/ovs-nsh-dpdk.tar.gz .; 23 cp -r ${DEB_DIR}/* ${DIR}/repositories/ubuntu/
26 cd ..; rm -rf ${DEB_DIR} 24 rm -rf ${DEB_DIR}
27 25
28 ;; 26 ;;
29 *) echo "Not supported system"; exit 1;; 27 *) echo "Not supported system"; exit 1;;