diff --git a/sys-kernel/rte_kni-kmod/Manifest b/sys-kernel/rte_kni-kmod/Manifest new file mode 100644 index 0000000000..cf0fb5cc14 --- /dev/null +++ b/sys-kernel/rte_kni-kmod/Manifest @@ -0,0 +1 @@ +DIST dpdk-21.11.tar.xz 15102516 BLAKE2B e82fb03242b74e458810ee5e0d21feaf5d6d781b81b8dc5c2a2ab977bac202290dadc8734ea13993bb1cb1df4b5c4d770df574052a384b590ac798d19c370c59 SHA512 843282023c2f77a9b8af393d50c6dde54f09d490cd6f4a99f03d4df5df13a7d963aa86885fdf64e13f9da71e01c881d1f301dd093574a32cddd84f4b1fb58fd5 diff --git a/sys-kernel/rte_kni-kmod/metadata.xml b/sys-kernel/rte_kni-kmod/metadata.xml new file mode 100644 index 0000000000..65ac1f2056 --- /dev/null +++ b/sys-kernel/rte_kni-kmod/metadata.xml @@ -0,0 +1,8 @@ + + + + + gentoo@aisha.cc + Aisha Tammy + + diff --git a/sys-kernel/rte_kni-kmod/rte_kni-kmod-21.11.ebuild b/sys-kernel/rte_kni-kmod/rte_kni-kmod-21.11.ebuild new file mode 100644 index 0000000000..7f31811a4c --- /dev/null +++ b/sys-kernel/rte_kni-kmod/rte_kni-kmod-21.11.ebuild @@ -0,0 +1,67 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit linux-mod python-any-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" + +DEPEND=" + dev-libs/elfutils + 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 +" +RDEPEND="${DEPEND}" +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-any-r1_pkg_setup +} + +src_configure() { + # 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 +}