Commit f823b7f5 authored by Jim Harris's avatar Jim Harris Committed by Ben Walker
Browse files

ipsec_mb: use EXTRA_CFLAGS to point DPDK to intel-ipsec-mb submodule



This allows us to remove the requirement to install intel-ipsec-mb to
system directories.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I579655a98b515cf148b7cd17823a9bb541ea6ad7

Reviewed-on: https://review.gerrithub.io/c/440785


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarSeth Howell <seth.howell5141@gmail.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 972b7880
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -121,3 +121,6 @@ CONFIG_IGB_UIO_DRIVER=n

# Build FTL library
CONFIG_FTL=n

# Build Intel IPSEC_MB library
CONFIG_IPSEC_MB=n
+5 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ DIRS-y += lib
DIRS-$(CONFIG_SHARED) += shared_lib
DIRS-y += examples app include
DIRS-$(CONFIG_TESTS) += test
DIRS-$(CONFIG_IPSEC_MB) += ipsecbuild

.PHONY: all clean $(DIRS-y) include/spdk/config.h mk/config.mk mk/cc.mk \
	cc_version cxx_version .libs_only_other .ldflags ldflags
@@ -59,6 +60,10 @@ else
LIB = lib
endif

ifeq ($(CONFIG_IPSEC_MB),y)
LIB += ipsecbuild
endif

all: $(DIRS-y)
clean: $(DIRS-y)
	$(Q)rm -f mk/cc.mk
+1 −6
Original line number Diff line number Diff line
@@ -378,13 +378,8 @@ if [[ "${CONFIG[CRYPTO]}" = "y" ]]; then
		echo Crypto requires NASM version 2.12.02 or newer.  Please install
		echo or upgrade then re-run this script.
		exit 1
        else
		if [[ "$(find /usr -xdev -name intel-ipsec-mb.h 2>/dev/null)" == "" ]]; then
			echo "To enable crypto you must first go to the intel-ipsec-mb directory and "
			echo "run 'make' then 'sudo make install' then re-run this script."
			exit 1
		fi
	fi
	CONFIG[IPSEC_MB]=y
fi

if [[ "${CONFIG[REDUCE]}" = "y" ]]; then
+5 −3
Original line number Diff line number Diff line
@@ -36,14 +36,16 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk

.PHONY: all clean install

IPSEC_OPTS=SHARED=n
INTEL_IPSEC_MB_LIB=
CRYPTO_ENABLED=n

DPDK_OPTS =
DPDK_CFLAGS =

ifeq ($(CONFIG_CRYPTO),y)
ifeq ($(TARGET_MACHINE),x86_64)
CRYPTO_ENABLED = y
DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_AESNI_MB=y
DPDK_CFLAGS += -I$(IPSEC_MB_DIR)
DPDK_OPTS += CONFIG_RTE_LIBRTE_REORDER=y
DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_QAT=y
DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_QAT_SYM=y
@@ -85,7 +87,7 @@ else
DPDK_CONFIG := $(DPDK_CONFIG)-gcc
endif

DPDK_CFLAGS = -fPIC
DPDK_CFLAGS += -fPIC

ifeq ($(CONFIG_DEBUG),y)
DPDK_CFLAGS += -O0 -g

ipsecbuild/Makefile

0 → 100644
+45 −0
Original line number Diff line number Diff line
#
#  BSD LICENSE
#
#  Copyright (c) Intel Corporation.
#  All rights reserved.
#
#  Redistribution and use in source and binary forms, with or without
#  modification, are permitted provided that the following conditions
#  are met:
#
#    * Redistributions of source code must retain the above copyright
#      notice, this list of conditions and the following disclaimer.
#    * Redistributions in binary form must reproduce the above copyright
#      notice, this list of conditions and the following disclaimer in
#      the documentation and/or other materials provided with the
#      distribution.
#    * Neither the name of Intel Corporation nor the names of its
#      contributors may be used to endorse or promote products derived
#      from this software without specific prior written permission.
#
#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
#  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
#  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
#  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
#  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
#  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
#  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
#  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
#  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
#  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

SPDK_ROOT_DIR := $(abspath $(CURDIR)/..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk

.PHONY: all clean install

all:
	$(Q)$(MAKE) -C $(SPDK_ROOT_DIR)/intel-ipsec-mb -j$(NPROC) all SHARED=n EXTRA_CFLAGS=-fPIC

install: all

clean:
	$(Q)$(MAKE) -C $(SPDK_ROOT_DIR)/intel-ipsec-mb clean SHARED=n
Loading