aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authoryexin <yexin13@huawei.com>2018-07-28 11:55:13 +0800
committeryexin <yexin13@huawei.com>2018-08-01 11:36:48 +0800
commitbf279a4aa50a94c64087936bde5bd3e6f1618c21 (patch)
treee0a1b451ec293019156f3ce195046cbc5539c025 /scripts
parent97bf4e9ca99f1343288cbe0e2fafdaee1cb6fc8b (diff)
Fix: disable dpdk1802 KNI mode by default
Change-Id: Ie36d2c50514f6c66b12f2b3920d60f9315e2320e Signed-off-by: yexin <yexin13@huawei.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build_dpdk1802.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/build_dpdk1802.sh b/scripts/build_dpdk1802.sh
index 6430aed..6f2008c 100755
--- a/scripts/build_dpdk1802.sh
+++ b/scripts/build_dpdk1802.sh
@@ -1,3 +1,4 @@
+#!/bin/bash -x
#########################################################################
#
# Copyright (c) 2018 Huawei Technologies Co.,Ltd.
@@ -13,11 +14,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#########################################################################
-#!/bin/bash -x
echo "check whether dpdk installed"
cur_directory=${PWD}
-check_dpdk=$(rpm -qa | grep dpdk)
+check_dpdk=$(rpm -qa | grep dpdk-devel)
if [ -z "$check_dpdk" ]; then
echo "system will install the dpdk"
else
@@ -56,6 +56,12 @@ sed -i '83a sed -i '\''s!CONFIG_RTE_BUILD_SHARED_LIB=.*!CONFIG_RTE_BUILD_SHARED_
sed -i '84a sed -i '\''s!CONFIG_RTE_LIBRTE_EAL=.*!CONFIG_RTE_LIBRTE_EAL=y!1'\'' config/common_base' dpdk.spec
sed -i '85a sed -i '\''s!CONFIG_RTE_EAL_PMD_PATH=.*!CONFIG_RTE_EAL_PMD_PATH="/tmp/dpdk/drivers/"!1'\'' config/common_base' dpdk.spec
+#disable KNI mode by default
+sed -i '93a sed -ri '\''s!CONFIG_RTE_LIBRARY_KNI=.*!CONFIG_RTE_LIBRARY_KNI=n!1'\'' %{target}/.config' dpdk.spec
+sed -i '94a sed -ri '\''s!CONFIG_RTE_LIBRARY_PMD_KNI=.*!CONFIG_RTE_LIBRARY_PMD_KNI=n!1'\'' %{target}/.config' dpdk.spec
+sed -i '95a sed -ri '\''s!CONFIG_RTE_KNI_KMOD=.*!CONFIG_RTE_KNI_KMOD=n!1'\'' %{target}/.config' dpdk.spec
+sed -i '96a sed -ri '\''s!CONFIG_RTE_KNI_PREEMPT_DEFAULT=.*!CONFIG_RTE_KNI_PREEMPT_DEFAULT=n!1'\'' %{target}/.config' dpdk.spec
+
echo "build the dependence"
#sudo yum-builddep -y dpdk.spec
sudo yum install -y libpcap-devel python-sphinx inkscape