add: nasm and ipsec-mb into vpp-ext-deps packaging

Change-Id: Ie5d85af84ae0d8b15edf5962213ed1b1953bee2f
Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Damjan Marion
2018-09-21 12:27:45 +02:00
committed by Florin Coras
parent d974cd4262
commit 561f2730e8
17 changed files with 549 additions and 399 deletions

View File

@ -20,8 +20,8 @@ else
endif
DPDK_MAKE_ARGS = -C $(call find_source_fn,$(PACKAGE_SOURCE)) \
DPDK_BUILD_DIR=$(PACKAGE_BUILD_DIR) \
DPDK_INSTALL_DIR=$(PACKAGE_INSTALL_DIR) \
BUILD_DIR=$(PACKAGE_BUILD_DIR) \
INSTALL_DIR=$(PACKAGE_INSTALL_DIR) \
DPDK_DEBUG=$(DPDK_DEBUG)
DPDK_MLX5_PMD=$(strip $($(PLATFORM)_uses_dpdk_mlx5_pmd))

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,13 @@
#!/usr/bin/make -f
DH_VERBOSE = 1
DEB_BUILD_OPTIONS = noddebs
PKG=vpp-ext-deps
VERSION = $(shell dpkg-parsechangelog | sed -nr '/^Version:/s/Version: //p')
BASE_VER = $(word 1, $(subst -, ,$(VERSION)))
export DPDK_BUILD_DIR=$(CURDIR)/_build
export DPDK_INSTALL_DIR=$(CURDIR)/debian/tmp/opt/vpp/external/$(shell uname -m)/
export BUILD_DIR=$(CURDIR)/_build
export INSTALL_DIR=$(CURDIR)/debian/tmp/opt/vpp/external/$(shell uname -m)/
MAKE_ARGS=-C ..

View File

@ -1,13 +0,0 @@
diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
index e7e9256e5..2fb0a072c 100644
--- a/drivers/net/ixgbe/base/ixgbe_common.c
+++ b/drivers/net/ixgbe/base/ixgbe_common.c
@@ -5296,7 +5296,7 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
* Section 73.10.2, we may have to wait up to 500ms if KR is
* attempted. 82599 uses the same timing for 10g SFI.
*/
- for (i = 0; i < 5; i++) {
+ for (i = 0; i < 10; i++) {
/* Wait for the link partner to also set speed */
msec_delay(100);

View File

@ -1,29 +0,0 @@
From b01857dfdb4e46b8c7d306c608c58ebbabc252ec Mon Sep 17 00:00:00 2001
From: Lee Roberts <lee.roberts@hpe.com>
Date: Fri, 9 Mar 2018 10:49:34 -0700
Subject: [PATCH] assign QAT cryptodev to correct NUMA node
rte_cryptodev_pmd_init_params should use NUMA node of the QAT device
for its socket_id rather than the socket_id of the initializing process.
Signed-off-by: Lee Roberts <lee.roberts@hpe.com>
---
drivers/crypto/qat/rte_qat_cryptodev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/qat/rte_qat_cryptodev.c b/drivers/crypto/qat/rte_qat_cryptodev.c
index bf83740..82641aa 100644
--- a/drivers/crypto/qat/rte_qat_cryptodev.c
+++ b/drivers/crypto/qat/rte_qat_cryptodev.c
@@ -130,7 +130,7 @@ static int crypto_qat_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
{
struct rte_cryptodev_pmd_init_params init_params = {
.name = "",
- .socket_id = rte_socket_id(),
+ .socket_id = pci_dev->device.numa_node,
.private_data_size = sizeof(struct qat_pmd_private),
.max_nb_sessions = RTE_QAT_PMD_MAX_NB_SESSIONS
};
--
1.9.1

150
build/external/packages.mk vendored Normal file
View File

@ -0,0 +1,150 @@
# Copyright (c) 2018 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
define h1
@echo "--- $(1)"
endef
define package
$1_tarball_strip_dirs ?= 0
$1_src_dir ?= $(B)/src-$1
$1_patch_dir ?= $(CURDIR)/patches/$1_$($1_version)
$1_build_dir ?= $(B)/build-$1
$1_install_dir ?= $(I)
$1_config_log ?= $(B)/$1.config.log
$1_build_log ?= $(B)/$1.build.log
$1_install_log ?= $(B)/$1.install.log
##############################################################################
# Download
##############################################################################
downloads/$($1_tarball):
mkdir -p downloads
@if [ -e $(DL_CACHE_DIR)/$($1_tarball) ] ; \
then cp $(DL_CACHE_DIR)/$($1_tarball) downloads/ ; \
else \
echo "Downloading $($1_url)" ; \
curl -o downloads/$($1_tarball) -LO $($1_url) ; \
fi
@rm -f $(B)/.download.ok
$(B)/.$1.download.ok: downloads/$($1_tarball)
@mkdir -p $(B)
$$(call h1,"validating $1 $($1_version) checksum")
@SUM=$$(shell openssl md5 $$< | cut -f 2 -d " " -) ; \
([ "$$$${SUM}" = "$($1_tarball_md5sum)" ] || \
( echo "==========================================================" && \
echo "Bad Checksum!" && \
echo "Expected: $($1_tarball_md5sum)" && \
echo "Calculated: $$$${SUM}" && \
echo "Please remove $$< and retry" && \
echo "==========================================================" && \
false ))
@touch $$@
.PHONY: $1-download
$1-download: $(B)/.$1.download.ok
##############################################################################
# Extract
##############################################################################
$(B)/.$1.extract.ok: $(B)/.$1.download.ok
$$(call h1,"extracting $1 $($1_version)")
@mkdir -p $$($1_src_dir)
@tar \
--directory $$($1_src_dir) \
--extract \
--strip-components=$$($1_tarball_strip_dirs) \
--file downloads/$($1_tarball)
@touch $$@
.PHONY: $1-extract
$1-extract: $(B)/.$1.extract.ok
##############################################################################
# Patch
##############################################################################
$(B)/.$1.patch.ok: $(B)/.$1.extract.ok
$$(call h1,"patching $1 $($1_version)")
ifneq ($$(wildcard $$($1_patch_dir)/*.patch),)
@for f in $$($1_patch_dir)/*.patch ; do \
echo "Applying patch: $$$$(basename $$$$f)" ; \
patch -p1 -d $$($1_src_dir) < $$$$f ; \
done
endif
@touch $$@
.PHONY: $1-patch
$1-patch: $(B)/.$1.patch.ok
##############################################################################
# Config
##############################################################################
ifeq ($$(call $1_config_cmds),)
define $1_config_cmds
@cd $$($1_build_dir) && \
CFLAGS="$$($1_cflags)" \
$$($1_src_dir)/configure \
--prefix=$$($1_install_dir) \
$$($1_configure_args) > $$($1_config_log)
endef
endif
$(B)/.$1.config.ok: $(B)/.$1.patch.ok $(addsuffix -install,$($1_depends))
$$(call h1,"configuring $1 $($1_version) - log: $$($1_config_log)")
@mkdir -p $$($1_build_dir)
$$(call $1_config_cmds)
@touch $$@
.PHONY: $1-config
$1-config: $(B)/.$1.config.ok
##############################################################################
# Build
##############################################################################
ifeq ($$(call $1_build_cmds),)
define $1_build_cmds
@$(MAKE) $(MAKE_ARGS) -C $$($1_build_dir) > $$($1_build_log)
endef
endif
$(B)/.$1.build.ok: $(B)/.$1.config.ok
$$(call h1,"building $1 $($1_version) - log: $$($1_build_log)")
$$(call $1_build_cmds)
@touch $$@
.PHONY: $1-build
$1-build: $(B)/.$1.build.ok
##############################################################################
# Install
##############################################################################
ifeq ($$(call $1_install_cmds),)
define $1_install_cmds
@$(MAKE) $(MAKE_ARGS) -C $$($1_build_dir) install > $$($1_install_log)
endef
endif
$(B)/.$1.install.ok: $(B)/.$1.build.ok
$$(call h1,"installing $1 $($1_version) - log: $$($1_install_log)")
$$(call $1_install_cmds)
@touch $$@
.PHONY: $1-install
$1-install: $(B)/.$1.install.ok
ALL_TARGETS += $1-install
endef

282
build/external/packages/dpdk.mk vendored Normal file
View File

@ -0,0 +1,282 @@
# Copyright (c) 2018 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DPDK_PKTMBUF_HEADROOM ?= 128
DPDK_CACHE_LINE_SIZE ?= 64
DPDK_DOWNLOAD_DIR ?= $(DL_CACHE_DIR)
DPDK_DEBUG ?= n
DPDK_MLX4_PMD ?= n
DPDK_MLX5_PMD ?= n
DPDK_TAP_PMD ?= n
DPDK_FAILSAFE_PMD ?= n
DPDK_VERSION ?= 18.08
DPDK_BASE_URL ?= http://fast.dpdk.org/rel
DPDK_TARBALL := dpdk-$(DPDK_VERSION).tar.xz
DPDK_TAR_URL := $(DPDK_BASE_URL)/$(DPDK_TARBALL)
DPDK_18.05_TARBALL_MD5_CKSUM := 9fc86367cd9407ff6a8dfea56c4eddc4
DPDK_18.08_TARBALL_MD5_CKSUM := da5e7fb25ab063c47e53929fb8c58be5
MACHINE=$(shell uname -m)
# replace dot with space, and if 3rd word exists we deal with stable dpdk rel
ifeq ($(word 3,$(subst ., ,$(DPDK_VERSION))),)
DPDK_SOURCE := $(B)/dpdk-$(DPDK_VERSION)
else
DPDK_SOURCE := $(B)/dpdk-stable-$(DPDK_VERSION)
endif
ifeq ($(MACHINE),$(filter $(MACHINE),x86_64))
AESNI ?= y
DPDK_BUILD_DEPS := ipsec-mb-install
else
AESNI ?= n
endif
ifneq (,$(findstring clang,$(CC)))
DPDK_CC=clang
else ifneq (,$(findstring icc,$(CC)))
DPDK_CC=icc
else
DPDK_CC=gcc
endif
##############################################################################
# Intel x86
##############################################################################
ifeq ($(MACHINE),$(filter $(MACHINE),x86_64 i686))
DPDK_TARGET ?= $(MACHINE)-native-linuxapp-$(DPDK_CC)
DPDK_MACHINE ?= nhm
DPDK_TUNE ?= core-avx2
##############################################################################
# ARM64
##############################################################################
else ifeq ($(MACHINE),aarch64)
CROSS :=
export CROSS
DPDK_TARGET ?= arm64-armv8a-linuxapp-$(DPDK_CC)
DPDK_MACHINE ?= armv8a
DPDK_TUNE ?= generic
CPU_IMP_ARM = 0x41
CPU_IMP_CAVIUM = 0x43
CPU_PART_ARM_CORTEX_A53 = 0xd03
CPU_PART_ARM_CORTEX_A57 = 0xd07
CPU_PART_ARM_CORTEX_A72 = 0xd08
CPU_PART_ARM_CORTEX_A73 = 0xd09
CPU_PART_CAVIUM_THUNDERX = 0x0a1
CPU_PART_CAVIUM_THUNDERX_81XX = 0x0a2
CPU_PART_CAVIUM_THUNDERX_83XX = 0x0a3
MIDR_IMPLEMENTER=$(shell awk '/implementer/ {print $$4;exit}' /proc/cpuinfo)
MIDR_PARTNUM=$(shell awk '/part/ {print $$4;exit}' /proc/cpuinfo)
ifeq ($(MIDR_IMPLEMENTER),$(CPU_IMP_ARM))
##############################################################################
# Arm Cortex
##############################################################################
CPU_PART_ARM_TUNE := $(CPU_PART_ARM_CORTEX_A53)/cortex-a53 \
$(CPU_PART_ARM_CORTEX_A57)/cortex-a57 \
$(CPU_PART_ARM_CORTEX_A72)/cortex-a72 \
$(CPU_PART_ARM_CORTEX_A73)/cortex-a73
CPU_TUNE = $(notdir $(filter $(MIDR_PARTNUM)/%,$(CPU_PART_ARM_TUNE)))
ifneq ($(CPU_TUNE),)
DPDK_TUNE = $(CPU_TUNE)
else
$(warning Unknown Arm CPU)
endif
else ifeq ($(MIDR_IMPLEMENTER),$(CPU_IMP_CAVIUM))
##############################################################################
# Cavium ThunderX
##############################################################################
ifneq (,$(findstring $(MIDR_PARTNUM),$(CPU_PART_CAVIUM_THUNDERX) \
$(CPU_PART_CAVIUM_THUNDERX_81XX) $(CPU_PART_CAVIUM_THUNDERX_83XX)))
DPDK_TARGET = arm64-thunderx-linuxapp-$(DPDK_CC)
DPDK_MACHINE = thunderx
DPDK_CACHE_LINE_SIZE := 128
else
$(warning Unknown Cavium CPU)
endif
endif
##############################################################################
# Unknown platform
##############################################################################
else
$(error Unknown platform)
endif
# compiler/linker custom arguments
ifeq ($(DPDK_CC),clang)
DPDK_CPU_CFLAGS := -fPIE -fPIC
else
DPDK_CPU_CFLAGS := -pie -fPIC
endif
ifeq ($(DPDK_DEBUG),n)
DPDK_EXTRA_CFLAGS := -g -mtune=$(DPDK_TUNE)
else
DPDK_EXTRA_CFLAGS := -g -O0
endif
# -Wimplicit-fallthrough was introduced starting from GCC 7,
# and it requires newer version of ccache.
# Disable fallthrough warning for old ccache version.
ifeq ($(DPDK_CC),gcc)
GCC_VER_V = "7.0.0"
CCACHE_VER_V = "3.4.1"
GCC_VER = $(shell gcc --version | grep ^gcc | sed 's/^.* //g')
CCACHE_VER = $(shell ccache --version | grep ^ccache | sed 's/^.* //g')
ifeq ($(shell expr "$(GCC_VER)" ">=" "$(GCC_VER_V)"),1)
ifeq ($(shell expr "$(CCACHE_VER)" "<" "$(CCACHE_VER_V)"),1)
DPDK_EXTRA_CFLAGS += -Wimplicit-fallthrough=0
endif
endif
endif
DPDK_EXTRA_CFLAGS += -L$(I)/lib -I$(I)/include
# assemble DPDK make arguments
DPDK_MAKE_ARGS := -C $(DPDK_SOURCE) -j $(JOBS) \
T=$(DPDK_TARGET) \
RTE_CONFIG_TEMPLATE=../custom-config \
EXTRA_CFLAGS="$(DPDK_EXTRA_CFLAGS)" \
EXTRA_LDFLAGS="$(DPDK_EXTRA_LDFLAGS)" \
CPU_CFLAGS="$(DPDK_CPU_CFLAGS)" \
DESTDIR=$(I) \
$(DPDK_MAKE_EXTRA_ARGS)
define set
@if grep -q CONFIG_$1 $@ ; \
then sed -i -e 's/.*\(CONFIG_$1=\).*/\1$2/' $@ ; \
else echo CONFIG_$1=$2 >> $@ ; \
fi
endef
all: build
$(B)/custom-config: $(B)/.patch.ok Makefile
@echo --- generating custom config from $(DPDK_SOURCE)/config/defconfig_$(DPDK_TARGET) ---
@cpp -undef -ffreestanding -x assembler-with-cpp $(DPDK_SOURCE)/config/defconfig_$(DPDK_TARGET) $@
$(call set,RTE_MACHINE,$(DPDK_MACHINE))
@# modify options
$(call set,RTE_MAX_LCORE,256)
$(call set,RTE_PKTMBUF_HEADROOM,$(DPDK_PKTMBUF_HEADROOM))
$(call set,RTE_CACHE_LINE_SIZE,$(DPDK_CACHE_LINE_SIZE))
$(call set,RTE_LIBEAL_USE_HPET,y)
$(call set,RTE_BUILD_COMBINE_LIBS,y)
$(call set,RTE_PCI_CONFIG,y)
$(call set,RTE_PCI_EXTENDED_TAG,"on")
$(call set,RTE_PCI_MAX_READ_REQUEST_SIZE,4096)
@# enable debug init for device drivers
$(call set,RTE_LIBRTE_I40E_DEBUG_INIT,$(DPDK_DEBUG))
$(call set,RTE_LIBRTE_IXGBE_DEBUG_INIT,$(DPDK_DEBUG))
$(call set,RTE_LIBRTE_E1000_DEBUG_INIT,$(DPDK_DEBUG))
$(call set,RTE_LIBRTE_VIRTIO_DEBUG_INIT,$(DPDK_DEBUG))
$(call set,RTE_LIBRTE_VMXNET3_DEBUG_INIT,$(DPDK_DEBUG))
$(call set,RTE_LIBRTE_PMD_BOND,y)
$(call set,RTE_LIBRTE_IP_FRAG,y)
$(call set,RTE_LIBRTE_PMD_QAT,y)
$(call set,RTE_LIBRTE_PMD_AESNI_MB,$(AESNI))
$(call set,RTE_LIBRTE_PMD_AESNI_GCM,$(AESNI))
$(call set,RTE_LIBRTE_MLX4_PMD,$(DPDK_MLX4_PMD))
$(call set,RTE_LIBRTE_MLX5_PMD,$(DPDK_MLX5_PMD))
$(call set,RTE_LIBRTE_PMD_SOFTNIC,n)
$(call set,RTE_LIBRTE_MLX4_DLOPEN_DEPS,$(DPDK_MLX4_PMD))
$(call set,RTE_LIBRTE_MLX5_DLOPEN_DEPS,$(DPDK_MLX5_PMD))
$(call set,RTE_LIBRTE_PMD_TAP,$(DPDK_TAP_PMD))
$(call set,RTE_LIBRTE_PMD_FAILSAFE,$(DPDK_FAILSAFE_PMD))
@# not needed
$(call set,RTE_LIBRTE_CFGFILE,n)
$(call set,RTE_LIBRTE_LPM,n)
$(call set,RTE_LIBRTE_ACL,n)
$(call set,RTE_LIBRTE_POWER,n)
$(call set,RTE_LIBRTE_DISTRIBUTOR,n)
$(call set,RTE_LIBRTE_PORT,n)
$(call set,RTE_LIBRTE_TABLE,n)
$(call set,RTE_LIBRTE_PIPELINE,n)
$(call set,RTE_LIBRTE_FLOW_CLASSIFY,n)
$(call set,RTE_KNI_KMOD,n)
$(call set,RTE_EAL_IGB_UIO,n)
@# currently broken in 18.02
$(call set,RTE_LIBRTE_DPAA_BUS,n)
$(call set,RTE_LIBRTE_DPAA_MEMPOOL,n)
$(call set,RTE_LIBRTE_DPAA_PMD,n)
$(call set,RTE_LIBRTE_PMD_DPAA_SEC,n)
$(call set,RTE_LIBRTE_PMD_DPAA_EVENTDEV,n)
@rm -f .config.ok
$(CURDIR)/$(DPDK_TARBALL):
@if [ -e $(DPDK_DOWNLOAD_DIR)/$(DPDK_TARBALL) ] ; \
then cp $(DPDK_DOWNLOAD_DIR)/$(DPDK_TARBALL) $(CURDIR) ; \
else curl -o $(CURDIR)/$(DPDK_TARBALL) -LO $(DPDK_TAR_URL) ; \
fi
@rm -f $(B)/.download.ok
DPDK_DOWNLOADS = $(CURDIR)/$(DPDK_TARBALL)
$(B)/.download.ok: $(DPDK_DOWNLOADS)
@mkdir -p $(B)
@openssl md5 $< | cut -f 2 -d " " - > $(B)/$(DPDK_TARBALL).md5sum
@([ "$$(<$(B)/$(DPDK_TARBALL).md5sum)" = "$(DPDK_$(DPDK_VERSION)_TARBALL_MD5_CKSUM)" ] || \
( echo "Bad Checksum! Please remove $< and retry" && \
rm $(B)/$(DPDK_TARBALL).md5sum && false ))
@touch $@
.PHONY: download
download: $(B)/.download.ok
$(B)/.extract.ok: $(B)/.download.ok
@echo --- extracting $(DPDK_TARBALL) ---
@tar --directory $(B) --extract --file $(CURDIR)/$(DPDK_TARBALL)
@touch $@
.PHONY: extract
extract: $(B)/.extract.ok
$(B)/.patch.ok: $(B)/.extract.ok
ifneq ($(wildcard $(CURDIR)/patches/dpdk_$(DPDK_VERSION)/*.patch),)
@echo --- patching ---
@for f in $(CURDIR)/patches/dpdk_$(DPDK_VERSION)/*.patch ; do \
echo Applying patch: $$(basename $$f) ; \
patch -p1 -d $(DPDK_SOURCE) < $$f ; \
done
endif
@touch $@
.PHONY: patch
patch: $(B)/.patch.ok
$(B)/.config.ok: $(B)/.patch.ok $(B)/custom-config
@make $(DPDK_MAKE_ARGS) config
@touch $@
.PHONY: config
config: $(B)/.config.ok
.PHONY: build-dpdk
build-dpdk: $(DPDK_BUILD_DEPS)
@if [ ! -e $(B)/.config.ok ] ; then echo 'Please run "make config" first' && false ; fi
@make $(DPDK_MAKE_ARGS) install
$(B)/.build.ok: build-dpdk
@touch $@
.PHONY: build
build: $(B)/.build.ok
.PHONY: install
install: $(B)/.build.ok

43
build/external/packages/ipsec-mb.mk vendored Normal file
View File

@ -0,0 +1,43 @@
# Copyright (c) 2018 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ipsec-mb_version := 0.49
ipsec-mb_tarball := v$(ipsec-mb_version).tar.gz
ipsec-mb_tarball_md5sum_0.49 := 3a2bee86f25f6c8ed720da5b4b8d4297
ipsec-mb_tarball_md5sum_0.50 := c847ed77ae34da551237349f1c9db1e9
ipsec-mb_tarball_md5sum := $(ipsec-mb_tarball_md5sum_$(ipsec-mb_version))
ipsec-mb_tarball_strip_dirs := 1
ipsec-mb_depends := nasm
ipsec-mb_url := http://github.com/01org/intel-ipsec-mb/archive/$(ipsec-mb_tarball)
define ipsec-mb_config_cmds
@true
endef
define ipsec-mb_build_cmds
@true
endef
define ipsec-mb_install_cmds
@mkdir -p $(ipsec-mb_install_dir)/include
@make -C $(ipsec-mb_src_dir) -j \
SHARED=n \
EXTRA_CFLAGS=-fPIC \
NASM=$(ipsec-mb_install_dir)/bin/nasm \
PREFIX=$(ipsec-mb_install_dir) \
install > $(ipsec-mb_install_log)
endef
$(eval $(call package,ipsec-mb))

21
build/external/packages/nasm.mk vendored Normal file
View File

@ -0,0 +1,21 @@
# Copyright (c) 2018 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
nasm_version := 2.13.03
nasm_tarball := nasm-$(nasm_version).tar.xz
nasm_tarball_md5sum := d5ca2ad7121ccbae69dd606b1038532c
nasm_tarball_strip_dirs := 1
nasm_url := http://www.nasm.us/pub/nasm/releasebuilds/$(nasm_version)/$(nasm_tarball)
nasm_cflags := -Wno-implicit-fallthrough -std=c11
$(eval $(call package,nasm))

View File

@ -6,19 +6,19 @@ accepted upstream and made available in the next DPDK release.
The following is the method used to generate these patches:
1. Git clone the DPDK to a new directory:
1. Git clone the package to a new directory:
# git clone http://dpdk.org/git/dpdk dpdk
2. Create a branch based on the DPDK release you wish to patch.
2. Create a branch based on the release you wish to patch.
Note, “git tag” will show you all the release tags. The following example is
for DPDK release tag “v2.2.0” and will create a branch named “two_dot_two”.
# cd dpdk
for release tag “v2.2.0” and will create a branch named “two_dot_two”.
# cd <root dir>
# git checkout -b two_dot_two v2.2.0
3. Apply all the existing VPP DPDK patches to this new branch.
# git am <VPP directory>/dpdk/dpdk-2.2.0_patches/*
3. Apply all the existing patches to this new branch.
# git am </path/to/existing/patches/*>
4. Make your changes and commit your change to your DPDK repository.
4. Make your changes and commit your change to your repository.
# <edit files>
# git commit -s
@ -26,9 +26,5 @@ for DPDK release tag “v2.2.0” and will create a branch named “two_dot_two
for your branch (two_dot_two), with your latest commits as the last ones.
# git format-patch master..two_dot_two
6. Copy, add and commit the new patches into the VPP patches directory.
# cp <new patch files> <VPP directory>/dpdk/dpdk-2.2.0_patches
# cd <VPP directory>
# git add dpdk/dpdk-2.2.0_patches/<new patch files>
# git commit -s
6. Copy, add and commit the new patches into the patches directory.

View File

@ -0,0 +1,26 @@
From aa9324ae33870cd3b9d90251e380a6d704651a60 Mon Sep 17 00:00:00 2001
From: Damjan Marion <damarion@cisco.com>
Date: Mon, 17 Sep 2018 09:25:35 +0200
Subject: [PATCH] Fix gcc-8 compilation
Signed-off-by: Damjan Marion <damarion@cisco.com>
---
include/nasmlib.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/nasmlib.h b/include/nasmlib.h
index 79e866b..5f07d77 100644
--- a/include/nasmlib.h
+++ b/include/nasmlib.h
@@ -191,7 +191,7 @@ int64_t readstrnum(char *str, int length, bool *warn);
* seg_init: Initialise the segment-number allocator.
* seg_alloc: allocate a hitherto unused segment number.
*/
-void pure_func seg_init(void);
+int32_t pure_func seg_init(void);
int32_t pure_func seg_alloc(void);
/*
--
2.17.1

View File

@ -1,5 +1,5 @@
%define _install_dir /opt/vpp/external/%(uname -m)
%define _make_args -C ../.. DPDK_BUILD_DIR=%{_topdir}/tmp DPDK_INSTALL_DIR=%{buildroot}/%{_install_dir}
%define _make_args -C ../.. BUILD_DIR=%{_topdir}/tmp INSTALL_DIR=%{buildroot}%{_install_dir}
Name: vpp-ext-deps
Version: %{_version}
@ -13,6 +13,7 @@ VPP development package with external dependencies
%install
make %{_make_args} config
make %{_make_args} install
export QA_SKIP_BUILD_ROOT=1
%files
%{_install_dir}