diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2017-09-10 08:56:39 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2017-09-10 08:56:39 +0200 |
commit | dab3272f47f13c2a7442e3aec6b4b5bcc1bfd907 (patch) | |
tree | 3fb86f38ee7bb816ca0e57e6c035491cf7e09c29 /pkgs/os-specific | |
parent | 9d6ac8eadaade4f8564aa54b64bb9eb0dabfa322 (diff) | |
parent | 6521a83efe84a8c15b277e782700f4cf1936d3f9 (diff) | |
download | nixlib-dab3272f47f13c2a7442e3aec6b4b5bcc1bfd907.tar nixlib-dab3272f47f13c2a7442e3aec6b4b5bcc1bfd907.tar.gz nixlib-dab3272f47f13c2a7442e3aec6b4b5bcc1bfd907.tar.bz2 nixlib-dab3272f47f13c2a7442e3aec6b4b5bcc1bfd907.tar.lz nixlib-dab3272f47f13c2a7442e3aec6b4b5bcc1bfd907.tar.xz nixlib-dab3272f47f13c2a7442e3aec6b4b5bcc1bfd907.tar.zst nixlib-dab3272f47f13c2a7442e3aec6b4b5bcc1bfd907.zip |
Merge remote-tracking branch 'upstream/master' into HEAD
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/dpdk/default.nix | 37 | ||||
-rw-r--r-- | pkgs/os-specific/linux/odp-dpdk/configure.patch | 32 | ||||
-rw-r--r-- | pkgs/os-specific/linux/odp-dpdk/default.nix | 12 | ||||
-rw-r--r-- | pkgs/os-specific/linux/odp-dpdk/odp_crypto.patch | 18 | ||||
-rw-r--r-- | pkgs/os-specific/linux/ofp/default.nix | 1 | ||||
-rw-r--r-- | pkgs/os-specific/linux/pktgen/Makefile.patch | 34 | ||||
-rw-r--r-- | pkgs/os-specific/linux/pktgen/default.nix | 10 |
7 files changed, 104 insertions, 40 deletions
diff --git a/pkgs/os-specific/linux/dpdk/default.nix b/pkgs/os-specific/linux/dpdk/default.nix index 47dc42fed5ee..80e4ae4288cf 100644 --- a/pkgs/os-specific/linux/dpdk/default.nix +++ b/pkgs/os-specific/linux/dpdk/default.nix @@ -20,45 +20,18 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = [ "-march=core2" ]; enableParallelBuilding = true; - outputs = [ "out" "kmod" "examples" ]; + outputs = [ "out" "kmod" ]; hardeningDisable = [ "pic" ]; configurePhase = '' - make T=x86_64-native-linuxapp-gcc config - ''; - - buildPhase = '' - make T=x86_64-native-linuxapp-gcc install - make T=x86_64-native-linuxapp-gcc examples + make T=${RTE_TARGET} config ''; installPhase = '' - install -m 0755 -d $out/lib - install -m 0644 ${RTE_TARGET}/lib/*.a $out/lib - - install -m 0755 -d $out/include - install -m 0644 ${RTE_TARGET}/include/*.h $out/include - - install -m 0755 -d $out/include/generic - install -m 0644 ${RTE_TARGET}/include/generic/*.h $out/include/generic - - install -m 0755 -d $out/include/exec-env - install -m 0644 ${RTE_TARGET}/include/exec-env/*.h $out/include/exec-env - - install -m 0755 -d $out/${RTE_TARGET} - install -m 0644 ${RTE_TARGET}/.config $out/${RTE_TARGET} - - install -m 0755 -d $out/${RTE_TARGET}/include - install -m 0644 ${RTE_TARGET}/include/rte_config.h $out/${RTE_TARGET}/include - - cp -pr mk $out/ - - mkdir -p $kmod/lib/modules/${kernel.modDirVersion}/kernel/drivers/net - cp ${RTE_TARGET}/kmod/*.ko $kmod/lib/modules/${kernel.modDirVersion}/kernel/drivers/net - - mkdir -p $examples/bin - find examples ${RTE_TARGET}/app -type f -executable -exec cp {} $examples/bin \; + make install-runtime install-sdk DESTDIR=$out prefix= includedir=/include datadir=/ + make install-sdk DESTDIR=$out prefix= includedir=/include datadir=/ + make install-kmod DESTDIR=$kmod ''; meta = with stdenv.lib; { diff --git a/pkgs/os-specific/linux/odp-dpdk/configure.patch b/pkgs/os-specific/linux/odp-dpdk/configure.patch new file mode 100644 index 000000000000..3dadc98e8342 --- /dev/null +++ b/pkgs/os-specific/linux/odp-dpdk/configure.patch @@ -0,0 +1,32 @@ +diff --git a/configure.ac b/configure.ac +index 001ebfc2893b..7d19ebcd213f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -215,7 +215,7 @@ AC_SUBST([testdir]) + ########################################################################## + AM_CONDITIONAL([netmap_support], [test x$netmap_support = xyes ]) + AM_CONDITIONAL([PKTIO_DPDK], [test x$pktio_dpdk_support = xyes ]) +-AM_CONDITIONAL([HAVE_PCAP], [test $have_pcap = yes]) ++AM_CONDITIONAL([HAVE_PCAP], [test x$have_pcap = xyes]) + AM_CONDITIONAL([DPDK_DEFAULT_DIR], [test "x${DPDK_DEFAULT_DIR}" = "x1"]) + AM_CONDITIONAL([test_installdir], [test "$testdir" != ""]) + AM_CONDITIONAL([cunit_support], [test x$cunit_support = xyes ]) +@@ -320,18 +320,6 @@ ODP_CFLAGS="$ODP_CFLAGS -Wcast-align -Wnested-externs -Wcast-qual -Wformat-nonli + ODP_CFLAGS="$ODP_CFLAGS -Wformat-security -Wundef -Wwrite-strings" + ODP_CFLAGS="$ODP_CFLAGS -std=gnu99" + +-dnl Use -Werror in the checks below since Clang emits a warning instead of +-dnl an error when it encounters an unknown warning option. +-AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough=0], +- [ODP_CFLAGS="$ODP_CFLAGS -Wimplicit-fallthrough=0"], +- [], [-Werror]) +-AX_CHECK_COMPILE_FLAG([-Wformat-truncation=0], +- [ODP_CFLAGS="$ODP_CFLAGS -Wformat-truncation=0"], +- [], [-Werror]) +-AX_CHECK_COMPILE_FLAG([-Wformat-overflow=0], +- [ODP_CFLAGS="$ODP_CFLAGS -Wformat-overflow=0"], +- [], [-Werror]) +- + # Extra flags for example to suppress certain warning types + ODP_CFLAGS="$ODP_CFLAGS $ODP_CFLAGS_EXTRA" + diff --git a/pkgs/os-specific/linux/odp-dpdk/default.nix b/pkgs/os-specific/linux/odp-dpdk/default.nix index 8182394536c5..a444243e802e 100644 --- a/pkgs/os-specific/linux/odp-dpdk/default.nix +++ b/pkgs/os-specific/linux/odp-dpdk/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation rec { name = "odp-dpdk-${version}"; - version = "1.12.0.0"; + version = "1.15.0.0"; src = fetchgit { url = "https://git.linaro.org/lng/odp-dpdk.git"; - rev = "5e370e1113973feafb43a8e57d4c59be40e9aeab"; - sha256 = "0rrakbxnbsqaj148xaz2hwxjvg3cmzlynfkvcp8w56sqyly75d0n"; + rev = "d8533b4e575d62c9f6f2caedd38d98a1a56fb8d3"; + sha256 = "1p09rw7dxxqcxxrdb8wbwp2imapyjvdbvap7s9km2i9hbd8ipdif"; }; nativeBuildInputs = [ autoreconfHook ]; @@ -19,11 +19,15 @@ stdenv.mkDerivation rec { dontDisableStatic = true; configureFlags = [ - "--with-platform=linux-dpdk" "--disable-shared" "--with-sdk-install-path=${dpdk}/${RTE_TARGET}" ]; + patches = [ + ./configure.patch + ./odp_crypto.patch + ]; + meta = with stdenv.lib; { description = "Open Data Plane optimized for DPDK"; homepage = http://www.opendataplane.org; diff --git a/pkgs/os-specific/linux/odp-dpdk/odp_crypto.patch b/pkgs/os-specific/linux/odp-dpdk/odp_crypto.patch new file mode 100644 index 000000000000..44ef155d69fb --- /dev/null +++ b/pkgs/os-specific/linux/odp-dpdk/odp_crypto.patch @@ -0,0 +1,18 @@ +diff --git a/platform/linux-dpdk/odp_crypto.c b/platform/linux-dpdk/odp_crypto.c +index d95b157805dc..d13ad5bbde95 100644 +--- a/platform/linux-dpdk/odp_crypto.c ++++ b/platform/linux-dpdk/odp_crypto.c +@@ -900,11 +900,12 @@ int odp_crypto_session_create(odp_crypto_session_param_t *param, + /* Setup session */ + session = rte_cryptodev_sym_session_create(cdev_id, first_xform); + +- if (session == NULL) ++ if (session == NULL) { + /* remove the crypto_session_entry_t */ + memset(entry, 0, sizeof(*entry)); + free_session(entry); + return -1; ++ } + + entry->rte_session = (intptr_t)session; + entry->cipher_xform = cipher_xform; diff --git a/pkgs/os-specific/linux/ofp/default.nix b/pkgs/os-specific/linux/ofp/default.nix index e083c0f04570..3b2a22e452db 100644 --- a/pkgs/os-specific/linux/ofp/default.nix +++ b/pkgs/os-specific/linux/ofp/default.nix @@ -36,5 +36,6 @@ stdenv.mkDerivation rec { license = licenses.bsd3; platforms = [ "x86_64-linux" ]; maintainers = [ maintainers.abuibrahim ]; + broken = true; }; } diff --git a/pkgs/os-specific/linux/pktgen/Makefile.patch b/pkgs/os-specific/linux/pktgen/Makefile.patch new file mode 100644 index 000000000000..da948bcc5a08 --- /dev/null +++ b/pkgs/os-specific/linux/pktgen/Makefile.patch @@ -0,0 +1,34 @@ +diff --git a/app/Makefile b/app/Makefile +index 5078b9a..99b208a 100644 +--- a/app/Makefile ++++ b/app/Makefile +@@ -46,29 +46,10 @@ APP = pktgen + CFLAGS += -O3 -g $(WERROR_FLAGS) -fno-stack-protector + CFLAGS += -I$(RTE_SRCDIR) -I$(RTE_SRCDIR)/../lib/common + +-dpdk_ver := $(RTE_SDK)/xusertools/dpdk-version.sh +-pktgen_ver := $(RTE_SRCDIR)/../tools/dpdk-version.sh +-ver_cmd := $(if $(wildcard $(dpdk_ver)),$(dpdk_ver),$(pktgen_ver)) +-# $(info ver_cmd=$(ver_cmd)) +- +-yy := $(shell $(ver_cmd) -yy) +-# mm := $(shell $(ver_cmd) -mm) +- +-# $(info yy=$(yy)) +- +-ifeq ($(yy),17) + COMMON_PRE := $(RTE_SRCDIR)/../lib/common + LUA_PRE := $(RTE_SRCDIR)/../lib/lua/src + CLI_PRE := $(RTE_SRCDIR)/../lib/cli + GUI_PRE := $(RTE_SRCDIR)/../gui/gui +-else +-ifeq ($(yy),16) +-COMMON_PRE := $(RTE_SRCDIR)/../lib/common/lib/common +-LUA_PRE := $(RTE_SRCDIR)/../lib/lua/src/lib/lua/src +-CLI_PRE := $(RTE_SRCDIR)/../lib/cli/lib/cli +-GUI_PRE := $(RTE_SRCDIR)/../gui +-endif +-endif + + COMMON_LIB := $(COMMON_PRE)/$(RTE_TARGET) + LUA_LIB := $(LUA_PRE)/$(RTE_TARGET) diff --git a/pkgs/os-specific/linux/pktgen/default.nix b/pkgs/os-specific/linux/pktgen/default.nix index 68237d70f519..9bc8967453b4 100644 --- a/pkgs/os-specific/linux/pktgen/default.nix +++ b/pkgs/os-specific/linux/pktgen/default.nix @@ -5,11 +5,11 @@ stdenv.mkDerivation rec { name = "pktgen-${version}"; - version = "3.1.0"; + version = "3.4.0"; src = fetchurl { - url = "http://dpdk.org/browse/apps/pktgen-dpdk/snapshot/pktgen-v${version}.tar.gz"; - sha256 = "1a1dl8h8p76wlcjlvn736mz4nc2nc5c3764rlydiz86wl45mb0nb"; + url = "http://dpdk.org/browse/apps/pktgen-dpdk/snapshot/pktgen-${version}.tar.gz"; + sha256 = "0fcyb56d4mkvchi5i8s3m210f5c3xa8zbjb08ranpa1a2k1kzfg5"; }; nativeBuildInputs = stdenv.lib.optionals withGtk [ pkgconfig ]; @@ -24,6 +24,8 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = [ "-march=core2" ]; + patches = [ ./Makefile.patch ]; + postPatch = '' substituteInPlace lib/lua/src/luaconf.h --replace /usr/local $out substituteInPlace lib/common/lscpu.h --replace /usr/bin/lscpu ${utillinux}/bin/lscpu @@ -31,7 +33,7 @@ stdenv.mkDerivation rec { installPhase = '' install -d $out/bin - install -m 0755 app/app/${RTE_TARGET}/app/pktgen $out/bin + install -m 0755 app/${RTE_TARGET}/pktgen $out/bin install -d $out/lib/lua/5.3 install -m 0644 Pktgen.lua $out/lib/lua/5.3 ''; |