1 |
commit: 477401e3f8e461ab5646dc122becd451efd24cb7 |
2 |
Author: Aisha Tammy <gentoo <AT> aisha <DOT> cc> |
3 |
AuthorDate: Thu Dec 23 14:51:42 2021 +0000 |
4 |
Commit: Aisha Tammy <gentoo <AT> aisha <DOT> cc> |
5 |
CommitDate: Thu Dec 23 14:51:42 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=477401e3 |
7 |
|
8 |
sys-kernel/rte_kni-kmod: kernel nic interface module for DPDK |
9 |
|
10 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
11 |
Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc> |
12 |
|
13 |
sys-kernel/rte_kni-kmod/Manifest | 1 + |
14 |
sys-kernel/rte_kni-kmod/metadata.xml | 8 +++ |
15 |
sys-kernel/rte_kni-kmod/rte_kni-kmod-21.11.ebuild | 67 +++++++++++++++++++++++ |
16 |
3 files changed, 76 insertions(+) |
17 |
|
18 |
diff --git a/sys-kernel/rte_kni-kmod/Manifest b/sys-kernel/rte_kni-kmod/Manifest |
19 |
new file mode 100644 |
20 |
index 000000000..cf0fb5cc1 |
21 |
--- /dev/null |
22 |
+++ b/sys-kernel/rte_kni-kmod/Manifest |
23 |
@@ -0,0 +1 @@ |
24 |
+DIST dpdk-21.11.tar.xz 15102516 BLAKE2B e82fb03242b74e458810ee5e0d21feaf5d6d781b81b8dc5c2a2ab977bac202290dadc8734ea13993bb1cb1df4b5c4d770df574052a384b590ac798d19c370c59 SHA512 843282023c2f77a9b8af393d50c6dde54f09d490cd6f4a99f03d4df5df13a7d963aa86885fdf64e13f9da71e01c881d1f301dd093574a32cddd84f4b1fb58fd5 |
25 |
|
26 |
diff --git a/sys-kernel/rte_kni-kmod/metadata.xml b/sys-kernel/rte_kni-kmod/metadata.xml |
27 |
new file mode 100644 |
28 |
index 000000000..65ac1f205 |
29 |
--- /dev/null |
30 |
+++ b/sys-kernel/rte_kni-kmod/metadata.xml |
31 |
@@ -0,0 +1,8 @@ |
32 |
+<?xml version="1.0" encoding="UTF-8"?> |
33 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
34 |
+<pkgmetadata> |
35 |
+ <maintainer type="person"> |
36 |
+ <email>gentoo@×××××.cc</email> |
37 |
+ <name>Aisha Tammy</name> |
38 |
+ </maintainer> |
39 |
+</pkgmetadata> |
40 |
|
41 |
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 |
42 |
new file mode 100644 |
43 |
index 000000000..7f31811a4 |
44 |
--- /dev/null |
45 |
+++ b/sys-kernel/rte_kni-kmod/rte_kni-kmod-21.11.ebuild |
46 |
@@ -0,0 +1,67 @@ |
47 |
+# Copyright 2021 Gentoo Authors |
48 |
+# Distributed under the terms of the GNU General Public License v2 |
49 |
+ |
50 |
+EAPI=7 |
51 |
+ |
52 |
+PYTHON_COMPAT=( python3_{8..10} ) |
53 |
+inherit linux-mod python-any-r1 meson |
54 |
+ |
55 |
+DESCRIPTION="DPDK Kernel Nic Interface module" |
56 |
+HOMEPAGE="https://dpdk.org/" |
57 |
+SRC_URI="https://fast.dpdk.org/rel/dpdk-${PV}.tar.xz" |
58 |
+S="${WORKDIR}/dpdk-${PV}" |
59 |
+ |
60 |
+LICENSE="BSD GPL-2" |
61 |
+SLOT="0" |
62 |
+KEYWORDS="~amd64" |
63 |
+ |
64 |
+DEPEND=" |
65 |
+ dev-libs/elfutils |
66 |
+ dev-libs/jansson |
67 |
+ dev-libs/libbpf |
68 |
+ dev-libs/libbsd |
69 |
+ dev-libs/openssl |
70 |
+ net-libs/libmnl |
71 |
+ net-libs/libpcap |
72 |
+ sys-apps/dtc |
73 |
+ sys-cluster/rdma-core |
74 |
+ sys-process/numactl |
75 |
+" |
76 |
+RDEPEND="${DEPEND}" |
77 |
+BDEPEND=" |
78 |
+ ${PYTHON_DEPS} |
79 |
+" |
80 |
+ |
81 |
+CONFIG_CHECK="~IOMMU_SUPPORT ~AMD_IOMMU ~VFIO ~VFIO_PCI ~UIO ~UIO_PDRV_GENIRQ ~UIO_DMEM_GENIRQ ~HPET_MMAP" |
82 |
+ |
83 |
+pkg_setup() { |
84 |
+ linux-mod_pkg_setup |
85 |
+ python-any-r1_pkg_setup |
86 |
+} |
87 |
+ |
88 |
+src_configure() { |
89 |
+ # we still have to do meson configuration as it creates |
90 |
+ # header files needed for compiling the rte_kni module |
91 |
+ local emesonargs=( |
92 |
+ -Denable_kmods=false |
93 |
+ -Dmachine=default |
94 |
+ -Dplatform=generic |
95 |
+ ) |
96 |
+ meson_src_configure |
97 |
+ |
98 |
+ # export after meson_src_configure as BUILD_DIR is needed for module compilation |
99 |
+ export MODULE_NAMES="rte_kni(extra/dpdk:${S}/kernel/linux/kni)" |
100 |
+ export BUILD_PARAMS="-C \"${KERNEL_DIR}\" M=\"${S}\"/kernel/linux/kni \ |
101 |
+ src=\"${S}\"/kernel/linux/kni \ |
102 |
+ MODULE_CFLAGS=\"${HAVE_ARG_TX_QUEUE} -include ${S}/config/rte_config.h -I${S}/lib/eal/include \ |
103 |
+ -I${S}/lib/kni -I${S}/kernel/linux/kni -I${BUILD_DIR} -I${S}\"" |
104 |
+ export BUILD_TARGETS="modules" |
105 |
+} |
106 |
+ |
107 |
+src_compile() { |
108 |
+ linux-mod_src_compile |
109 |
+} |
110 |
+ |
111 |
+src_install() { |
112 |
+ linux-mod_src_install |
113 |
+} |