mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-17 19:13:13 -04:00
sys-kernel/dpdk-kmod: rename rte_kni-kmod
Signed-off-by: Aisha Tammy <gentoo@aisha.cc>
This commit is contained in:
2
sys-kernel/dpdk-kmod/Manifest
Normal file
2
sys-kernel/dpdk-kmod/Manifest
Normal file
@@ -0,0 +1,2 @@
|
||||
DIST dpdk-21.11.1.tar.xz 15115156 BLAKE2B 089e98279922b5494b205d957f9ac05001a668f4536d45e5fd89b9f7d04779e0671ec428b2408963641da3ae999d5943a1ff5dc59c23020ccefce824609c8f11 SHA512 d7afc0c918626b1706a18a129086fcd3741b251c28fa00c5711eb85a03137e5ee6e08de7bd5ebe957e442dc9b901314042b382b223e74f0fdd5d560ac657f1b3
|
||||
DIST dpdk-22.07.tar.xz 15231912 BLAKE2B 29e36519fb91d440645259932863b5fb6c2386f78d9ba78a871505d7d32e9f4803012aa62044aa578585eee4507aa1c277bda6ec0428a27820faef644f5bfd79 SHA512 8b2adb8a47732efca4e35a68ab03d6c579fc0f699344c0c10be45e62c90d412ebea5ddc37a26efd08a9af08e65c84de177817300a66e6107674f15ecfe3e696c
|
||||
78
sys-kernel/dpdk-kmod/dpdk-kmod-21.11.1.ebuild
Normal file
78
sys-kernel/dpdk-kmod/dpdk-kmod-21.11.1.ebuild
Normal file
@@ -0,0 +1,78 @@
|
||||
# Copyright 2021-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
inherit linux-mod python-single-r1 meson
|
||||
|
||||
DESCRIPTION="DPDK Kernel Nic Interface module"
|
||||
HOMEPAGE="https://dpdk.org/"
|
||||
SRC_URI="https://fast.dpdk.org/rel/dpdk-${PV}.tar.xz"
|
||||
S="${WORKDIR}/dpdk-stable-${PV}"
|
||||
|
||||
LICENSE="BSD GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
# tests need root
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="${PYTHON_DEPS}"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/pyelftools[${PYTHON_USEDEP}]
|
||||
')
|
||||
app-crypt/intel-ipsec-mb
|
||||
dev-libs/elfutils
|
||||
dev-libs/isa-l
|
||||
dev-libs/jansson
|
||||
dev-libs/libbpf
|
||||
dev-libs/libbsd
|
||||
dev-libs/openssl
|
||||
net-libs/libmnl
|
||||
net-libs/libpcap
|
||||
sys-apps/dtc
|
||||
sys-cluster/rdma-core
|
||||
sys-process/numactl
|
||||
"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
"
|
||||
|
||||
CONFIG_CHECK="~IOMMU_SUPPORT ~AMD_IOMMU ~VFIO ~VFIO_PCI ~UIO ~UIO_PDRV_GENIRQ ~UIO_DMEM_GENIRQ ~HPET_MMAP"
|
||||
|
||||
pkg_setup() {
|
||||
linux-mod_pkg_setup
|
||||
python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
linux-mod_pkg_setup
|
||||
python-single-r1_pkg_setup
|
||||
# we still have to do meson configuration as it creates
|
||||
# header files needed for compiling the rte_kni module
|
||||
local emesonargs=(
|
||||
-Denable_kmods=false
|
||||
-Dmachine=default
|
||||
-Dplatform=generic
|
||||
)
|
||||
meson_src_configure
|
||||
|
||||
# export after meson_src_configure as BUILD_DIR is needed for module compilation
|
||||
export MODULE_NAMES="rte_kni(extra/dpdk:${S}/kernel/linux/kni)"
|
||||
export BUILD_PARAMS="-C \"${KERNEL_DIR}\" M=\"${S}\"/kernel/linux/kni \
|
||||
src=\"${S}\"/kernel/linux/kni \
|
||||
MODULE_CFLAGS=\"${HAVE_ARG_TX_QUEUE} -include ${S}/config/rte_config.h -I${S}/lib/eal/include \
|
||||
-I${S}/lib/kni -I${S}/kernel/linux/kni -I${BUILD_DIR} -I${S}\""
|
||||
export BUILD_TARGETS="modules"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
linux-mod_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod_src_install
|
||||
}
|
||||
86
sys-kernel/dpdk-kmod/dpdk-kmod-22.07.ebuild
Normal file
86
sys-kernel/dpdk-kmod/dpdk-kmod-22.07.ebuild
Normal file
@@ -0,0 +1,86 @@
|
||||
# Copyright 2021-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
inherit linux-mod toolchain-funcs python-single-r1 meson
|
||||
|
||||
DESCRIPTION="DPDK Kernel Nic Interface module"
|
||||
HOMEPAGE="https://dpdk.org/"
|
||||
SRC_URI="https://fast.dpdk.org/rel/dpdk-${PV}.tar.xz"
|
||||
S="${WORKDIR}/dpdk-${PV}"
|
||||
|
||||
LICENSE="BSD GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
# tests need root
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="${PYTHON_DEPS}"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/pyelftools[${PYTHON_USEDEP}]
|
||||
')
|
||||
app-crypt/intel-ipsec-mb
|
||||
dev-libs/elfutils
|
||||
dev-libs/isa-l
|
||||
dev-libs/jansson
|
||||
dev-libs/libbpf
|
||||
dev-libs/libbsd
|
||||
dev-libs/openssl
|
||||
net-libs/libmnl
|
||||
net-libs/libpcap
|
||||
sys-apps/dtc
|
||||
sys-cluster/rdma-core
|
||||
sys-process/numactl
|
||||
"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
"
|
||||
|
||||
PATCHES=( "${FILESDIR}/dpdk-22.03-binutils.patch" )
|
||||
|
||||
pkg_setup() {
|
||||
linux-mod_pkg_setup
|
||||
python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed -e "s/@OBJDUMP@/$(tc-getOBJDUMP)/g" -i \
|
||||
buildtools/meson.build \
|
||||
buildtools/check-symbols.sh \
|
||||
devtools/check-abi-version.sh || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
linux-mod_pkg_setup
|
||||
python-single-r1_pkg_setup
|
||||
# we still have to do meson configuration as it creates
|
||||
# header files needed for compiling the rte_kni module
|
||||
local emesonargs=(
|
||||
-Denable_kmods=false
|
||||
-Dmachine=default
|
||||
-Dplatform=generic
|
||||
)
|
||||
meson_src_configure
|
||||
|
||||
# export after meson_src_configure as BUILD_DIR is needed for module compilation
|
||||
export MODULE_NAMES="rte_kni(extra/dpdk:${S}/kernel/linux/kni)"
|
||||
export BUILD_PARAMS="-C \"${KERNEL_DIR}\" M=\"${S}\"/kernel/linux/kni \
|
||||
src=\"${S}\"/kernel/linux/kni \
|
||||
MODULE_CFLAGS=\"${HAVE_ARG_TX_QUEUE} -include ${S}/config/rte_config.h -I${S}/lib/eal/include \
|
||||
-I${S}/lib/kni -I${S}/kernel/linux/kni -I${BUILD_DIR} -I${S}\""
|
||||
export BUILD_TARGETS="modules"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
linux-mod_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod_src_install
|
||||
}
|
||||
60
sys-kernel/dpdk-kmod/files/dpdk-22.03-binutils.patch
Normal file
60
sys-kernel/dpdk-kmod/files/dpdk-22.03-binutils.patch
Normal file
@@ -0,0 +1,60 @@
|
||||
diff --git a/buildtools/check-symbols.sh b/buildtools/check-symbols.sh
|
||||
index e458c0a..9031a18 100755
|
||||
--- a/buildtools/check-symbols.sh
|
||||
+++ b/buildtools/check-symbols.sh
|
||||
@@ -22,7 +22,7 @@ fi
|
||||
|
||||
DUMPFILE=$(mktemp -t dpdk.${0##*/}.objdump.XXXXXX)
|
||||
trap 'rm -f "$DUMPFILE"' EXIT
|
||||
-objdump -t $OBJFILE >$DUMPFILE
|
||||
+@OBJDUMP@ -t $OBJFILE >$DUMPFILE
|
||||
|
||||
ret=0
|
||||
|
||||
diff --git a/buildtools/meson.build b/buildtools/meson.build
|
||||
index e1c600e..6b09e63 100644
|
||||
--- a/buildtools/meson.build
|
||||
+++ b/buildtools/meson.build
|
||||
@@ -4,7 +4,7 @@
|
||||
pkgconf = find_program('pkg-config', 'pkgconf', required: false)
|
||||
check_symbols = find_program('check-symbols.sh')
|
||||
ldflags_ibverbs_static = find_program('options-ibverbs-static.sh')
|
||||
-objdump = find_program('objdump', 'llvm-objdump')
|
||||
+objdump = find_program('@OBJDUMP@')
|
||||
|
||||
python3 = import('python').find_installation(required: false)
|
||||
if python3.found()
|
||||
@@ -24,18 +24,11 @@ binutils_avx512_check = (py3 + files('binutils-avx512-check.py') +
|
||||
# select library and object file format
|
||||
pmdinfo = py3 + files('gen-pmdinfo-cfile.py') + [meson.current_build_dir()]
|
||||
pmdinfogen = py3 + files('pmdinfogen.py')
|
||||
+ar = find_program('ar')
|
||||
+pmdinfo += ar
|
||||
if host_machine.system() == 'windows'
|
||||
- if cc.get_id() == 'gcc'
|
||||
- pmdinfo += 'ar'
|
||||
- else
|
||||
- pmdinfo += 'llvm-ar'
|
||||
- endif
|
||||
pmdinfogen += 'coff'
|
||||
-elif host_machine.system() == 'freebsd'
|
||||
- pmdinfo += 'llvm-ar'
|
||||
- pmdinfogen += 'elf'
|
||||
else
|
||||
- pmdinfo += 'ar'
|
||||
pmdinfogen += 'elf'
|
||||
endif
|
||||
|
||||
diff --git a/devtools/check-abi-version.sh b/devtools/check-abi-version.sh
|
||||
index f0cca42..6efe1eb 100755
|
||||
--- a/devtools/check-abi-version.sh
|
||||
+++ b/devtools/check-abi-version.sh
|
||||
@@ -28,7 +28,7 @@ NEXT_ABIVER="DPDK_$((${2-$DEFAULT_ABI}+1))"
|
||||
ret=0
|
||||
|
||||
# get output of objdump
|
||||
-OBJ_DUMP_OUTPUT=`objdump -TC --section=.text ${LIB} 2>&1 | grep ".text"`
|
||||
+OBJ_DUMP_OUTPUT=`@OBJDUMP@ -TC --section=.text ${LIB} 2>&1 | grep ".text"`
|
||||
|
||||
# there may not be any .text sections in the .so file, in which case exit early
|
||||
echo "${OBJ_DUMP_OUTPUT}" | grep "not found in any input file" -q
|
||||
8
sys-kernel/dpdk-kmod/metadata.xml
Normal file
8
sys-kernel/dpdk-kmod/metadata.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>gentoo@aisha.cc</email>
|
||||
<name>Aisha Tammy</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user