Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: faa7ce3ee514
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1f4295927fa9
Choose a head ref
  • 4 commits
  • 3 files changed
  • 2 contributors

Commits on Oct 15, 2019

  1. dpdk: 17.11.2 -> 19.05

    magenbluten committed Oct 15, 2019
    Copy the full SHA
    3812fc9 View commit details
  2. pktgen: 3.5.0 -> 3.7.2

    magenbluten committed Oct 15, 2019
    Copy the full SHA
    7c53479 View commit details
  3. ofp-dpdk: use dpdk 17.11.6 LTS

    magenbluten committed Oct 15, 2019
    Copy the full SHA
    fde6c31 View commit details
  4. Merge pull request #66250 from magenbluten/dpdk

    dpdk update and dpdk 17.11 lts init
    Mic92 authored Oct 15, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    jtojnar Jan Tojnar
    Copy the full SHA
    1f42959 View commit details
Showing with 24 additions and 32 deletions.
  1. +3 −3 pkgs/os-specific/linux/dpdk/default.nix
  2. +13 −5 pkgs/os-specific/linux/odp-dpdk/default.nix
  3. +8 −24 pkgs/os-specific/linux/pktgen/default.nix
6 changes: 3 additions & 3 deletions pkgs/os-specific/linux/dpdk/default.nix
Original file line number Diff line number Diff line change
@@ -8,11 +8,11 @@ let

in stdenv.mkDerivation rec {
name = "dpdk-${version}" + lib.optionalString mod "-${kernel.version}";
version = "17.11.2";
version = "19.05";

src = fetchurl {
url = "https://fast.dpdk.org/rel/dpdk-${version}.tar.xz";
sha256 = "19m5l3jkrns8r1zbjb6ry18w50ff36kbl5b5g6pfcp9p57sfisd2";
sha256 = "1pvxyjx2fpsf15fi8vz7zfkaywihck2yd4ck525w76fl15irw3f8";
};

nativeBuildInputs = [ pkgconfig ];
@@ -59,6 +59,6 @@ EOF
homepage = http://dpdk.org/;
license = with licenses; [ lgpl21 gpl2 bsd2 ];
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ domenkozar orivej ];
maintainers = with maintainers; [ domenkozar magenbluten orivej ];
};
}
18 changes: 13 additions & 5 deletions pkgs/os-specific/linux/odp-dpdk/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
{ stdenv, fetchurl, autoreconfHook, pkgconfig
, dpdk, libconfig, libpcap, numactl, openssl
}:
}: let

stdenv.mkDerivation rec {
dpdk_17_11 = dpdk.overrideAttrs (old: rec {
version = "17.11.6";
src = fetchurl {
url = "https://fast.dpdk.org/rel/dpdk-${version}.tar.xz";
sha256 = "0g4l6yjcn17n18c7q1pxkmnj4fg2kiv0krz7n2vjjsb8s6gmbps2";
};
});

in stdenv.mkDerivation rec {
pname = "odp-dpdk";
version = "1.19.0.0_DPDK_17.11";

@@ -12,16 +20,16 @@ stdenv.mkDerivation rec {
};

nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ dpdk libconfig libpcap numactl openssl ];
buildInputs = [ dpdk_17_11 libconfig libpcap numactl openssl ];

RTE_SDK = "${dpdk}/share/dpdk";
RTE_SDK = "${dpdk_17_11}/share/dpdk";
RTE_TARGET = "x86_64-native-linuxapp-gcc";

dontDisableStatic = true;

configureFlags = [
"--disable-shared"
"--with-dpdk-path=${dpdk}"
"--with-dpdk-path=${dpdk_17_11}"
];

meta = with stdenv.lib; {
32 changes: 8 additions & 24 deletions pkgs/os-specific/linux/pktgen/default.nix
Original file line number Diff line number Diff line change
@@ -1,33 +1,23 @@
{ stdenv, lib, fetchurl, pkgconfig
, dpdk, libpcap, numactl, utillinux
, gtk2, withGtk ? false
, dpdk, libpcap, lua5_3, numactl, utillinux
, gtk2, which, withGtk ? false
}:

let

# pktgen needs a specific version of lua to apply its patch (see lib/lua/Makefile).
lua = rec {
name = "lua-5.3.4";
basename = name + ".tar.gz";
src = fetchurl {
url = "https://www.lua.org/ftp/${basename}";
sha256 = "0320a8dg3aci4hxla380dx1ifkw8gj4gbw5c4dz41g1kh98sm0gn";
};
};

in stdenv.mkDerivation rec {
pname = "pktgen";
version = "3.5.0";
version = "3.7.2";

src = fetchurl {
url = "http://dpdk.org/browse/apps/pktgen-dpdk/snapshot/pktgen-${version}.tar.xz";
sha256 = "1gy99jr9dbwzi9pd3w5k673h3pfnbkz6rbzmrkwcyis72pnphy5z";
url = "http://dpdk.org/browse/apps/pktgen-dpdk/snapshot/${pname}-${version}.tar.xz";
sha256 = "03k7h4j2lsrh6b7477hgn87ljrjh2673ncffx9v261bx1ns54y7w";
};

nativeBuildInputs = stdenv.lib.optionals withGtk [ pkgconfig ];
nativeBuildInputs = [ pkgconfig ];

buildInputs =
[ dpdk libpcap numactl ]
[ dpdk libpcap lua5_3 numactl which ]
++ stdenv.lib.optionals withGtk [gtk2];

RTE_SDK = "${dpdk}/share/dpdk";
@@ -37,19 +27,13 @@ in stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = [ "-msse3" ];

postPatch = let dpdkMajor = lib.versions.major dpdk.version; in ''
substituteInPlace app/Makefile --replace 'yy :=' 'yy := ${dpdkMajor} #'
substituteInPlace lib/common/lscpu.h --replace /usr/bin/lscpu ${utillinux}/bin/lscpu
ln -s ${lua.src} lib/lua/${lua.basename}
make -C lib/lua get_tarball # unpack and patch
substituteInPlace lib/lua/${lua.name}/src/luaconf.h --replace /usr/local $out
'';

installPhase = ''
install -d $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
install -m 0644 Pktgen.lua $out/bin
'';

enableParallelBuilding = true;