From nobody Sat Nov 18 09:27:19 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SXT211Hlzz50qRM; Sat, 18 Nov 2023 09:27:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SXT206wwSz3cwR; Sat, 18 Nov 2023 09:27:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700299641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=okwkjA96gWfI5Lv4/orQf9twOpf0d4fF7ogkDMH8seM=; b=Lm2Qi/ELl80Ns9yl1OCE1+IssY1Ox7UFYLdIDuoDa5fuQBUjsdPK9TBzH8b2i5i4zDFdep If06pVoTNFrm4O0Jv1DUUngyt0Mdu9AVxtdGhqwIV7ohenvrnYvCG4Csz1vK8RQ+S5/eGP U3cbP+1a4+7xCVaq0mq2lDiJa+FcRC0pOTL4EHAFvCm4XrXt0+OLYzMAMPjQsknd4ev7+2 thEhc8VTfzaA47d49/sNTwhNCoc7mF4KYQz1iV74TLjdu4qbvB1IC9xn8TFzcgIpItEJXk 1I/xf70z2tLmZixAissZcJNM1EOeMB87LNtlIgbpYUu1n3Q8luKl9sK453PpOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700299641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=okwkjA96gWfI5Lv4/orQf9twOpf0d4fF7ogkDMH8seM=; b=T5Hy1t5Al3Pjscg9x7IWnsC5FTfvFBsHEY5El9ObOH5CEp1GeGTobs03okQDcdCsULjxqb S3hoKUEw4Ql2+sTlHwSTIzJaWrK/NFui8RC4GGgKccQl9iRh/P5gHdE79QR3zM2GOLkebg G8Vrp/ayyJu9wvj2Ex8Pbw2yWZs7nWwAhNE8jH0jSYVxWT6m5JdH5RbQWiTD7goL+6/927 zdobFPHF9VWYu2SGu6zsxae81SbJR3ihL3+HQxEqLdCO1DrEs4bHaVXprPTFRyCpegNsqG CEgDLFq8UCJd6ebOEXjVW/VTHCoeqlNcZBW/VMo5tznCKIPyx5w0V81PE7tMjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700299641; a=rsa-sha256; cv=none; b=Gyiqbd1TBKqFw5Iya0X03G0pb0/ao9JWli9SkN6cRkhuVg5BTzzHV+HIi9PGAn4apxUr+n vg0/4bm3XLWKxPdA3XHc0tAACOKn+ROdteQ4QTKhFHyC+46ZwUfAzeMtgw4TTFf7q1CmD7 R6szqJ/bItj0fJAfvkjzB2MT6dgfhX1IPN1qkb5KrJo/FitBe4biBbHMy+tC/YK3Hhcrze Nfu/vs00mu3fh6W8r/SLVoyMBP8UFGQDQDwGlDXEtbcOKjzbn5qh9aVMl4UMNVw1aEw3L5 WOjpHLj6OJbZ/0aECRALVoMpM0uqSZMdtR8xLpNOpr7bBtXK7GFwO8s/p0KRtQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SXT1z5mZzz66D; Sat, 18 Nov 2023 09:27:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AI9RJ5V014987; Sat, 18 Nov 2023 09:27:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AI9RJUK014984; Sat, 18 Nov 2023 09:27:19 GMT (envelope-from git) Date: Sat, 18 Nov 2023 09:27:19 GMT Message-Id: <202311180927.3AI9RJUK014984@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Daniel Engberg Subject: git: ab116e7b6178 - main - net/dpdk-22.11: New port: Data Plane Development Kit 22.11 (LTS) List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: diizzy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab116e7b61789ba9abb7b157fd1ad41f977861e1 Auto-Submitted: auto-generated The branch main has been updated by diizzy: URL: https://cgit.FreeBSD.org/ports/commit/?id=ab116e7b61789ba9abb7b157fd1ad41f977861e1 commit ab116e7b61789ba9abb7b157fd1ad41f977861e1 Author: Bruce Richardson AuthorDate: 2023-11-18 09:10:22 +0000 Commit: Daniel Engberg CommitDate: 2023-11-18 09:24:50 +0000 net/dpdk-22.11: New port: Data Plane Development Kit 22.11 (LTS) DPDK is the open source Data Plane Development Kit that consists of libraries to accelerate packet processing workloads running on a wide variety of CPU architectures. It provides a set of data plane libraries and network interface controller polling-mode drivers for offloading TCP packet processing from the operating system kernel to processes running in user space. This offloading achieves higher computing efficiency and higher packet throughput than is possible using the interrupt-driven processing provided in the kernel. WWW: https://www.dpdk.org/ Changelog: https://doc.dpdk.org/guides/rel_notes/release_22_11.html PR: 272133 --- net/Makefile | 1 + net/dpdk-22.11/Makefile | 62 + net/dpdk-22.11/distinfo | 3 + net/dpdk-22.11/files/patch-config_meson.build | 12 + .../patch-kernel_freebsd_contigmem_contigmem.c | 20 + .../files/patch-kernel_freebsd_nic__uio_nic__uio.c | 18 + net/dpdk-22.11/pkg-descr | 15 + net/dpdk-22.11/pkg-message | 30 + net/dpdk-22.11/pkg-plist | 1356 ++++++++++++++++++++ 9 files changed, 1517 insertions(+) diff --git a/net/Makefile b/net/Makefile index 4039e79d705c..ed089872d347 100644 --- a/net/Makefile +++ b/net/Makefile @@ -130,6 +130,7 @@ SUBDIR += downzemall SUBDIR += dpdk SUBDIR += dpdk-20.11 + SUBDIR += dpdk-22.11 SUBDIR += dpinger SUBDIR += drawterm SUBDIR += drive diff --git a/net/dpdk-22.11/Makefile b/net/dpdk-22.11/Makefile new file mode 100644 index 000000000000..0696d3ea44af --- /dev/null +++ b/net/dpdk-22.11/Makefile @@ -0,0 +1,62 @@ +PORTNAME= dpdk +DISTVERSION= 22.11.2 +CATEGORIES= net +MASTER_SITES= http://fast.dpdk.org/rel/ +PKGNAMESUFFIX= 22.11 + +MAINTAINER= bruce.richardson@intel.com +COMMENT= DPDK: Software libraries for packet processing +WWW= https://dpdk.org/ + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/license/README + +ONLY_FOR_ARCHS= amd64 +ONLY_FOR_ARCHS_REASON= only tested on 64-bit x86 hardware + +BUILD_DEPENDS= objdump:devel/binutils \ + ${PYTHON_PKGNAMEPREFIX}pyelftools>0:devel/py-pyelftools@${PY_FLAVOR} + +LIB_DEPENDS= libelf.so:devel/elfutils \ + libjansson.so:devel/jansson \ + libpcap.so.1:net/libpcap \ + libisal.so:devel/isa-l + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyelftools>0:devel/py-pyelftools@${PY_FLAVOR} + +USES= kmod meson pkgconfig:both python shebangfix ssl tar:xz +USE_LDCONFIG= yes +SHEBANG_FILES= examples/ipsec-secgw/test/pkttest.py \ + examples/ipsec-secgw/test/pkttest.sh \ + examples/ipsec-secgw/test/run_test.sh \ + examples/ipsec-secgw/test/trs_ipv6opts.py \ + examples/ipsec-secgw/test/tun_null_header_reconstruct.py \ + examples/pipeline/examples/vxlan_table.py \ + usertools/dpdk-devbind.py usertools/dpdk-hugepages.py \ + usertools/dpdk-pmdinfo.py usertools/dpdk-telemetry-client.py \ + usertools/dpdk-telemetry.py + +.if defined(CPUTYPE) +DPDK_CPUTYPE=${CPUTYPE} +.else +DPDK_CPUTYPE=default +.endif + +MESON_ARGS= -Ddefault_library=shared \ + -Denable_kmods=true \ + -Dmachine=${DPDK_CPUTYPE} + +WRKSRC= ${WRKDIR}/${PORTNAME}-stable-${DISTVERSION} + +OPTIONS_DEFINE= EXAMPLES TEST TOOLS +OPTIONS_DEFAULT= TOOLS +OPTIONS_SUB= yes + +TEST_DESC= Build and install automated unit test binary +TOOLS_DESC= Install tool scripts + +EXAMPLES_MESON_ON= -Dexamples=all +TEST_MESON_TRUE= tests +TOOLS_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyelftools>=0:devel/py-pyelftools@${PY_FLAVOR} + +.include diff --git a/net/dpdk-22.11/distinfo b/net/dpdk-22.11/distinfo new file mode 100644 index 000000000000..1d301d7799bc --- /dev/null +++ b/net/dpdk-22.11/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1687361326 +SHA256 (dpdk-22.11.2.tar.xz) = af64bdda15087ff8d429894b9ea6cbbbb6ee7a932bdb344f82b0dc366379a2d4 +SIZE (dpdk-22.11.2.tar.xz) = 15594000 diff --git a/net/dpdk-22.11/files/patch-config_meson.build b/net/dpdk-22.11/files/patch-config_meson.build new file mode 100644 index 000000000000..bad754fc1390 --- /dev/null +++ b/net/dpdk-22.11/files/patch-config_meson.build @@ -0,0 +1,12 @@ +--- config/meson.build.orig 2023-07-18 14:47:33.929900000 +0100 ++++ config/meson.build 2023-07-18 14:47:36.329284000 +0100 +@@ -207,6 +207,9 @@ + dpdk_conf.set('RTE_BACKTRACE', cc.has_header('execinfo.h') or is_windows) + + libarchive = dependency('libarchive', required: false, method: 'pkg-config') ++if not libarchive.found() ++ libarchive = cc.find_library('archive', required: false) ++endif + if libarchive.found() + dpdk_conf.set('RTE_HAS_LIBARCHIVE', 1) + # Push libarchive link dependency at the project level to support diff --git a/net/dpdk-22.11/files/patch-kernel_freebsd_contigmem_contigmem.c b/net/dpdk-22.11/files/patch-kernel_freebsd_contigmem_contigmem.c new file mode 100644 index 000000000000..fa54be32ef58 --- /dev/null +++ b/net/dpdk-22.11/files/patch-kernel_freebsd_contigmem_contigmem.c @@ -0,0 +1,20 @@ +--- kernel/freebsd/contigmem/contigmem.c.orig 2023-05-20 00:00:38 UTC ++++ kernel/freebsd/contigmem/contigmem.c +@@ -111,7 +111,7 @@ static int + }; + + static int +-contigmem_load() ++contigmem_load(void) + { + char index_string[8], description[32]; + int i, error = 0; +@@ -178,7 +178,7 @@ static int + } + + static int +-contigmem_unload() ++contigmem_unload(void) + { + int i; + diff --git a/net/dpdk-22.11/files/patch-kernel_freebsd_nic__uio_nic__uio.c b/net/dpdk-22.11/files/patch-kernel_freebsd_nic__uio_nic__uio.c new file mode 100644 index 000000000000..27bd60e20b78 --- /dev/null +++ b/net/dpdk-22.11/files/patch-kernel_freebsd_nic__uio_nic__uio.c @@ -0,0 +1,18 @@ +--- kernel/freebsd/nic_uio/nic_uio.c.orig 2022-07-26 18:52:05 UTC ++++ kernel/freebsd/nic_uio/nic_uio.c +@@ -78,10 +78,14 @@ struct pci_bdf { + uint32_t function; + }; + ++DEFINE_CLASS_0(nic_uio, nic_uio_driver, nic_uio_methods, sizeof(struct nic_uio_softc)); ++#if __FreeBSD_version >= 1400058 ++DRIVER_MODULE(nic_uio, pci, nic_uio_driver, nic_uio_modevent, NULL); ++#else + static devclass_t nic_uio_devclass; + +-DEFINE_CLASS_0(nic_uio, nic_uio_driver, nic_uio_methods, sizeof(struct nic_uio_softc)); + DRIVER_MODULE(nic_uio, pci, nic_uio_driver, nic_uio_devclass, nic_uio_modevent, 0); ++#endif + + static int + nic_uio_mmap(struct cdev *cdev, vm_ooffset_t offset, vm_paddr_t *paddr, diff --git a/net/dpdk-22.11/pkg-descr b/net/dpdk-22.11/pkg-descr new file mode 100644 index 000000000000..a4f09217b2a0 --- /dev/null +++ b/net/dpdk-22.11/pkg-descr @@ -0,0 +1,15 @@ +The Data Plane Development Kit (DPDK) + +The DPDK is a set of software libraries to enable packet processing. It +consists of a set of polling mode drivers (PMD) which can be used to pull +network packets directly from a Network Interface Card (NIC), as well as +other libraries to assist in the processing of those packets. The additional +libraries include ones for: +* memory and buffer management +* packet classification +* software rings or FIFOs to allow packet transfer between cores +amongst others. + +Applications written using the DPDK run in userspace. The devices used by a +DPDK application are removed from kernel control and are instead managed +directly by that application. diff --git a/net/dpdk-22.11/pkg-message b/net/dpdk-22.11/pkg-message new file mode 100644 index 000000000000..f557b725ac78 --- /dev/null +++ b/net/dpdk-22.11/pkg-message @@ -0,0 +1,30 @@ +[ +{ type: install + message: <