* [Buildroot] [PATCH 1/1] package/dpdk: add 24.03 @ 2024-08-15 21:26 Vincent Jardin 2024-08-17 8:29 ` Thomas Petazzoni via buildroot 0 siblings, 1 reply; 31+ messages in thread From: Vincent Jardin @ 2024-08-15 21:26 UTC (permalink / raw) To: buildroot; +Cc: Eric Le Bihan, Vincent JARDIN From: Vincent JARDIN <vjardin@free.fr> This commit adds the integration of the Data Plane Development Kit (DPDK), a suite of libraries and drivers designed for high-performance packet processing from the user space. DPDK enables direct packet steering from some network interfaces to the userland, bypassing the Linux kernel network stack. This is achieved through userland PCI drivers or by leveraging some userland memory mappings of the network devices. Originally inspired by RDMA (Remote Direct Memory Access) concepts, DPDK has been adapted to work with PCI devices that do not inherently support RDMA. This adaptation allows for low-latency, high-throughput data processing by minimizing the overhead typically associated with kernel-space network drivers. Importantly, this commit does not enforce the use of UIO or VFIO kernel frameworks, as DPDK's architecture supports userland memory mappings that do not require these technologies. By maintaining this flexibility, DPDK can operate with a broader range of hardware and software configurations, making it suitable for diverse Buildroot's deployment scenarios. Signed-off-by: Vincent Jardin <vjardin@free.fr> --- package/Config.in | 1 + package/dpdk/Config.in | 14 ++++++++++++++ package/dpdk/dpdk.hash | 1 + package/dpdk/dpdk.mk | 39 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 package/dpdk/Config.in create mode 100644 package/dpdk/dpdk.hash create mode 100644 package/dpdk/dpdk.mk diff --git a/package/Config.in b/package/Config.in index f2c63ffb6e..5b21805e9f 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1990,6 +1990,7 @@ menu "Networking" source "package/daq3/Config.in" source "package/davici/Config.in" source "package/dht/Config.in" + source "package/dpdk/Config.in" source "package/enet/Config.in" source "package/filemq/Config.in" source "package/fmlib/Config.in" diff --git a/package/dpdk/Config.in b/package/dpdk/Config.in new file mode 100644 index 0000000000..56dcb42a33 --- /dev/null +++ b/package/dpdk/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_DPDK + bool "dpdk" + depends on BR2_TOOLCHAIN_HAS_THREADS # glibc or uClibc toolchain required + select BR2_PACKAGE_HOST_PYTHON_PYELFTOOLS + select BR2_PACKAGE_LIBBSD + select BR2_PACKAGE_LIBEXECINFO + select BR2_PACKAGE_JANSSON + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_ZLIB + help + DPDK (Data Plane Development Kit) is a set of libraries + and drivers for fast packet processing. + + http://dpdk.org/ diff --git a/package/dpdk/dpdk.hash b/package/dpdk/dpdk.hash new file mode 100644 index 0000000000..fd8ab5a6aa --- /dev/null +++ b/package/dpdk/dpdk.hash @@ -0,0 +1 @@ +sha256 33ed973b3945af4f5923096ddca250b401dc80be3b5c6393b4e4fe43a1a6c2ad dpdk-24.03.tar.xz diff --git a/package/dpdk/dpdk.mk b/package/dpdk/dpdk.mk new file mode 100644 index 0000000000..56adcf1d00 --- /dev/null +++ b/package/dpdk/dpdk.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# DPDK +# +################################################################################ + +# DPDK_VERSION = main +# DPDK_SITE = https://dpdk.org/git/dpdk +# DPDK_SITE_METHOD = git +DPDK_VERSION ?= 24.03 +DPDK_SOURCE = dpdk-$(DPDK_VERSION).tar.xz +DPDK_SITE = http://fast.dpdk.org/rel +DPDK_LICENSE = BSD-3-Clause +DPDK_LICENSE_FILES = license/bsd-3-clause.txt license/README license/bsd-2-clause.txt license/exceptions.txt license/gpl-2.0.txt license/isc.txt license/lgpl-2.1.txt license/mit.txt + +DPDK_DEPENDENCIES += host-pkgconf +DPDK_DEPENDENCIES += host-python-pyelftools +DPDK_DEPENDENCIES += libbsd +DPDK_DEPENDENCIES += libexecinfo +DPDK_DEPENDENCIES += jansson +DPDK_DEPENDENCIES += libpcap +DPDK_DEPENDENCIES += zlib +#not yet DPDK_DEPENDENCIES += openssl +#not yet DPDK_DEPENDENCIES += libbpf + +DPDK_MARCH = $(BR2_ARCH) +DPDK_MTUNE = $(BR2_ARCH) # not used yet +GCC_TARGET_CPU=$(BR2_GCC_TARGET_ARCH) + +# see meson_options.txt from DPDK +# +DPDK_CONF_OPTS += -Ddeveloper_mode=enabled + +DPDK_CONF_OPTS += -Dcpu_instruction_set=$(DPDK_MARCH) + +# platform can be: native, all, cn9k, cn10k +DPDK_CONF_OPTS += -Dplatform=generic + +$(eval $(meson-package)) -- 2.46.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/dpdk: add 24.03 2024-08-15 21:26 [Buildroot] [PATCH 1/1] package/dpdk: add 24.03 Vincent Jardin @ 2024-08-17 8:29 ` Thomas Petazzoni via buildroot 2024-08-19 22:11 ` [Buildroot] [PATCH v2 0/1] add DPDK libraries Vincent Jardin ` (2 more replies) 0 siblings, 3 replies; 31+ messages in thread From: Thomas Petazzoni via buildroot @ 2024-08-17 8:29 UTC (permalink / raw) To: Vincent Jardin; +Cc: Eric Le Bihan, buildroot Hello Vincent, Thanks for your patch, nice to see a Buildroot patch from you! See some comments below. On Thu, 15 Aug 2024 23:26:58 +0200 Vincent Jardin <vjardin@free.fr> wrote: > Importantly, this commit does not enforce the use of UIO or VFIO > kernel frameworks, as DPDK's architecture supports userland memory > mappings that do not require these technologies. By maintaining this > flexibility, DPDK can operate with a broader range of hardware and > software configurations, making it suitable for diverse Buildroot's > deployment scenarios. Do you intend to follow-up with additional patches supporting the other use-cases? > Signed-off-by: Vincent Jardin <vjardin@free.fr> > --- > package/Config.in | 1 + > package/dpdk/Config.in | 14 ++++++++++++++ > package/dpdk/dpdk.hash | 1 + > package/dpdk/dpdk.mk | 39 +++++++++++++++++++++++++++++++++++++++ > 4 files changed, 55 insertions(+) For all new packages, we require an entry in the DEVELOPERS file to be added. > diff --git a/package/dpdk/Config.in b/package/dpdk/Config.in > new file mode 100644 > index 0000000000..56dcb42a33 > --- /dev/null > +++ b/package/dpdk/Config.in > @@ -0,0 +1,14 @@ > +config BR2_PACKAGE_DPDK > + bool "dpdk" > + depends on BR2_TOOLCHAIN_HAS_THREADS # glibc or uClibc toolchain required The comment does not make sense: the only library that can be compiled without thread support is uClibc. glibc and musl both always have thread support. > + select BR2_PACKAGE_HOST_PYTHON_PYELFTOOLS Not needed, we typically don't select host packages. > + select BR2_PACKAGE_LIBBSD When you "select" an option, you need to replicate its "depends on", so in this case, you need to add: depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS # libbsd depends on !BR2_STATIC_LIBS # libbsd depends on BR2_TOOLCHAIN_HAS_THREADS # libbsd depends on BR2_USE_WCHAR # libbsd > + select BR2_PACKAGE_LIBEXECINFO Selecting libexecinfo only makes sense for non glibc toolchains, so this should be: select BR2_PACKAGE_LIBEXECINFO if !BR2_TOOLCHAIN_USES_GLIBC also, you need to "depends on BR2_USE_WCHAR", or rather because you already have it due to libbsd, you need to do: depends on BR2_USE_WCHAR # libbsd, libexecinfo > + select BR2_PACKAGE_JANSSON > + select BR2_PACKAGE_LIBPCAP > + select BR2_PACKAGE_ZLIB > + help > + DPDK (Data Plane Development Kit) is a set of libraries > + and drivers for fast packet processing. > + > + http://dpdk.org/ You need to add a Config.in comment about the dependencies: comment "dpdk needs a toolchain w/ dynamic library, threads, wchar" depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR > diff --git a/package/dpdk/dpdk.hash b/package/dpdk/dpdk.hash > new file mode 100644 > index 0000000000..fd8ab5a6aa > --- /dev/null > +++ b/package/dpdk/dpdk.hash > @@ -0,0 +1 @@ Please indicate where the hash comes from, in a comment. Calculated locally? Verified with some upstream provided hash? Crypto signature? See other .hash files for example. > +sha256 33ed973b3945af4f5923096ddca250b401dc80be3b5c6393b4e4fe43a1a6c2ad dpdk-24.03.tar.xz Also, please add the hashes of the license files. > diff --git a/package/dpdk/dpdk.mk b/package/dpdk/dpdk.mk > new file mode 100644 > index 0000000000..56adcf1d00 > --- /dev/null > +++ b/package/dpdk/dpdk.mk > @@ -0,0 +1,39 @@ > +################################################################################ > +# > +# DPDK lower case > +# > +################################################################################ > + > +# DPDK_VERSION = main > +# DPDK_SITE = https://dpdk.org/git/dpdk > +# DPDK_SITE_METHOD = git Please drop those 3 lines. > +DPDK_VERSION ?= 24.03 Please turn ?= into just =. > +DPDK_SOURCE = dpdk-$(DPDK_VERSION).tar.xz > +DPDK_SITE = http://fast.dpdk.org/rel > +DPDK_LICENSE = BSD-3-Clause > +DPDK_LICENSE_FILES = license/bsd-3-clause.txt license/README license/bsd-2-clause.txt license/exceptions.txt license/gpl-2.0.txt license/isc.txt license/lgpl-2.1.txt license/mit.txt How can the license be just BSD-3-Clause when there are license files for BSD-2-Clause, GPL-2.0, ISC, LGPL-2.1, MIT, and some exceptions? Also, since the LICENSE_FILES variable is long, please format it as such: DPDK_LICENSE_FILES = \ license/bsd-3-clause.txt \ ... \ ... \ > +DPDK_DEPENDENCIES += host-pkgconf > +DPDK_DEPENDENCIES += host-python-pyelftools > +DPDK_DEPENDENCIES += libbsd > +DPDK_DEPENDENCIES += libexecinfo > +DPDK_DEPENDENCIES += jansson > +DPDK_DEPENDENCIES += libpcap > +DPDK_DEPENDENCIES += zlib Just one assignment, and use = instead of += since these are unconditional: DPDK_DEPENDENCIES = \ host-pkgconf \ host-python-pyelftools \ libbsd \ ... Please add libexecinfo in the dependencies only if BR2_TOOLCHAIN_USES_GLIBC is false: ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),) DPDK_DEPENDENCIES += libexecinfo endif > +#not yet DPDK_DEPENDENCIES += openssl > +#not yet DPDK_DEPENDENCIES += libbpf Please drop commented code. > + > +DPDK_MARCH = $(BR2_ARCH) Are you sure all values of $(BR2_ARCH) are supported as -Dcpu_instruction_set values? What is -Dcpu_instruction_set actually doing? > +DPDK_MTUNE = $(BR2_ARCH) # not used yet Please drop if it's not used. > +GCC_TARGET_CPU=$(BR2_GCC_TARGET_ARCH) Please drop, GCC_TARGET_CPU does not belong to this package. > +# see meson_options.txt from DPDK Comment not needed. > +# > +DPDK_CONF_OPTS += -Ddeveloper_mode=enabled What does it do? Are we sure we want it enabled unconditionally? > +DPDK_CONF_OPTS += -Dcpu_instruction_set=$(DPDK_MARCH) > + > +# platform can be: native, all, cn9k, cn10k > +DPDK_CONF_OPTS += -Dplatform=generic Well, the comment says that platform can be "native", "all", "cn9k", "cn10k"... and you're setting it to "generic". Doesn't really make sense. Also, isn't libpcap only needed for the "generic" platform? Can one select only one platform, or a list of platforms? If one can only select one platform, then maybe we need to have a choice..endchoice in Config.in: choice prompt "Platform" default BR2_PACKAGE_DPDK_PLATFORM_GENERIC config BR2_PACKAGE_DPDK_PLATFORM_GENERIC bool "generic" select BR2_PACKAGE_LIBPCAP endchoice which of course can be extended later with additional platforms. Could you rework your patch according to those suggestions? Thanks a lot! Thanks! Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* [Buildroot] [PATCH v2 0/1] add DPDK libraries 2024-08-17 8:29 ` Thomas Petazzoni via buildroot @ 2024-08-19 22:11 ` Vincent Jardin 2024-08-19 22:11 ` [Buildroot] [PATCH v2 1/1] package/dpdk: add 24.03 Vincent Jardin 2024-08-19 22:20 ` [Buildroot] [PATCH 1/1] package/dpdk: add 24.03 Vincent Jardin 2 siblings, 0 replies; 31+ messages in thread From: Vincent Jardin @ 2024-08-19 22:11 UTC (permalink / raw) To: buildroot; +Cc: Vincent Jardin, thomas.petazzoni Changes from the v1: - include the comments from Thomas Petazzoni - add a meson patch for the DPDK that I forgot to include This patch has been aligned with Yocto so we can share the same feedbacks. I'll upstream it on DPDK too. Vincent Jardin (1): package/dpdk: add 24.03 DEVELOPERS | 3 ++ package/Config.in | 1 + ...-cpu_instruction_set-from-meson-opti.patch | 32 ++++++++++++++ package/dpdk/Config.in | 20 +++++++++ package/dpdk/dpdk.hash | 10 +++++ package/dpdk/dpdk.mk | 43 +++++++++++++++++++ 6 files changed, 109 insertions(+) create mode 100644 package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch create mode 100644 package/dpdk/Config.in create mode 100644 package/dpdk/dpdk.hash create mode 100644 package/dpdk/dpdk.mk -- 2.46.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* [Buildroot] [PATCH v2 1/1] package/dpdk: add 24.03 2024-08-17 8:29 ` Thomas Petazzoni via buildroot 2024-08-19 22:11 ` [Buildroot] [PATCH v2 0/1] add DPDK libraries Vincent Jardin @ 2024-08-19 22:11 ` Vincent Jardin 2024-08-25 21:00 ` Julien Olivain 2024-08-27 0:38 ` [Buildroot] [PATCH v3 0/1] add DPDK libraries Vincent Jardin 2024-08-19 22:20 ` [Buildroot] [PATCH 1/1] package/dpdk: add 24.03 Vincent Jardin 2 siblings, 2 replies; 31+ messages in thread From: Vincent Jardin @ 2024-08-19 22:11 UTC (permalink / raw) To: buildroot; +Cc: Vincent Jardin, thomas.petazzoni This commit adds the integration of the Data Plane Development Kit (DPDK), a suite of libraries and drivers designed for high-performance packet processing from the user space. DPDK enables direct packet steering from some network interfaces to the userland, bypassing the Linux kernel network stack. This is achieved through userland PCI drivers or by leveraging some userland memory mappings of the network devices. Originally inspired by RDMA (Remote Direct Memory Access) concepts, DPDK has been adapted to work with PCI devices that do not inherently support RDMA. This adaptation allows for low-latency, high-throughput data processing by minimizing the overhead typically associated with kernel-space network drivers. Importantly, this commit does not enforce the use of UIO or VFIO kernel frameworks, as DPDK's architecture supports userland memory mappings that do not require these technologies. By maintaining this flexibility, DPDK can operate with a broader range of hardware and software configurations, making it suitable for diverse Buildroot's deployment scenarios. Signed-off-by: Vincent Jardin <vjardin@free.fr> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> --- DEVELOPERS | 3 ++ package/Config.in | 1 + ...-cpu_instruction_set-from-meson-opti.patch | 32 ++++++++++++++ package/dpdk/Config.in | 20 +++++++++ package/dpdk/dpdk.hash | 10 +++++ package/dpdk/dpdk.mk | 43 +++++++++++++++++++ 6 files changed, 109 insertions(+) create mode 100644 package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch create mode 100644 package/dpdk/Config.in create mode 100644 package/dpdk/dpdk.hash create mode 100644 package/dpdk/dpdk.mk diff --git a/DEVELOPERS b/DEVELOPERS index d7d0af3543..7b6f662e6e 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -3241,6 +3241,9 @@ F: package/rtl8822cs/ N: Victor Huesca <victor.huesca@bootlin.com> F: support/testing/tests/core/test_root_password.py +N: Vincent Jardin <vjardin@free.fr> +F: package/dpdk/ + N: Vincent Prince <vincent.prince.fr@gmail.com> F: package/nss-myhostname/ F: package/utp_com/ diff --git a/package/Config.in b/package/Config.in index f2c63ffb6e..5b21805e9f 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1990,6 +1990,7 @@ menu "Networking" source "package/daq3/Config.in" source "package/davici/Config.in" source "package/dht/Config.in" + source "package/dpdk/Config.in" source "package/enet/Config.in" source "package/filemq/Config.in" source "package/fmlib/Config.in" diff --git a/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch new file mode 100644 index 0000000000..92e3523cd8 --- /dev/null +++ b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch @@ -0,0 +1,32 @@ +From 121e5d019f0bb6dec0ace2b361611edd10fc8ff8 Mon Sep 17 00:00:00 2001 +From: Lee Chee Yang <chee.yang.lee@intel.com> +Date: Wed, 6 Dec 2023 16:58:10 +0800 +Subject: [PATCH] config/meson: get cpu_instruction_set from meson option + +Workaround error: +| ../git/config/meson.build:178:8: ERROR: Problem encountered: Compiler +does not support "x86_64" arch flag. + +Upstream-Status: Inappropriate [ yocto specific to set cpu_instruction_set ] + +Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> +--- + config/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/meson.build b/config/meson.build +index a9ccd56deb..f310c7adf6 100644 +--- a/config/meson.build ++++ b/config/meson.build +@@ -105,7 +105,7 @@ platform = get_option('platform') + + # set the cpu_instruction_set and cflags for it + if meson.is_cross_build() +- cpu_instruction_set = host_machine.cpu() ++ cpu_instruction_set = get_option('cpu_instruction_set') + else + cpu_instruction_set = get_option('cpu_instruction_set') + machine = get_option('machine') +-- +2.37.3 + diff --git a/package/dpdk/Config.in b/package/dpdk/Config.in new file mode 100644 index 0000000000..25771aa0dd --- /dev/null +++ b/package/dpdk/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_DPDK + bool "dpdk" + depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS # libbsd + depends on !BR2_STATIC_LIBS # libbsd + depends on BR2_TOOLCHAIN_HAS_THREADS # libbsd + depends on BR2_USE_WCHAR # libbsd, libexecinfo + select BR2_PACKAGE_LIBBSD + select BR2_PACKAGE_LIBEXECINFO if !BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_JANSSON + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_ZLIB + help + DPDK (Data Plane Development Kit) is a set of libraries + and drivers for fast packet processing. + + http://dpdk.org/ + +comment "dpdk needs a toolchain w/ dynamic library, threads, wchar" + depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR diff --git a/package/dpdk/dpdk.hash b/package/dpdk/dpdk.hash new file mode 100644 index 0000000000..371c59d229 --- /dev/null +++ b/package/dpdk/dpdk.hash @@ -0,0 +1,10 @@ +# Locally computed +sha256 33ed973b3945af4f5923096ddca250b401dc80be3b5c6393b4e4fe43a1a6c2ad dpdk-24.03.tar.xz +sha256 1531b66affc3bae796d755e12850795e56e25ccedd685bf7d2644d8ddfadbad8 license/bsd-2-clause.txt +sha256 9acc4bc871a4742550158e3696dcb381953172ef808d04ca248184f9f6322712 license/bsd-3-clause.txt +sha256 e19808bccd90c238fac06da2fc3683e094c64f7ba647e9d86f03a98cf5f2ce05 license/exceptions.txt +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 license/gpl-2.0.txt +sha256 be8f198f2e1c9b30226e293255bbe6933ee6607a580ee5874185aa023bcc3c39 license/isc.txt +sha256 592987e8510228d546540b84a22444bde98e48d03078d3b2eefcd889bec5ce8c license/lgpl-2.1.txt +sha256 6c54c4d44faf3cba829b3d0c21c6955953e758767018fd7244f809b01d4f4845 license/mit.txt +sha256 cae178052c96959741acb7f00634a09a8294e6cafb5ad53e158d63e3510875ab license/README diff --git a/package/dpdk/dpdk.mk b/package/dpdk/dpdk.mk new file mode 100644 index 0000000000..567e886f80 --- /dev/null +++ b/package/dpdk/dpdk.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# dpdk +# +################################################################################ + +DPDK_VERSION = 24.03 +DPDK_SOURCE = dpdk-$(DPDK_VERSION).tar.xz +DPDK_SITE = http://fast.dpdk.org/rel +DPDK_LICENSE = \ + BSD-3-Clause, \ + BSD-2-Clause,\ + GPL-2.0, \ + ISC, \ + LGPL-2.1, \ + MIT + +DPDK_LICENSE_FILES = \ + license/README \ + license/bsd-3-clause.txt \ + license/bsd-2-clause.txt \ + license/exceptions.txt \ + license/gpl-2.0.txt \ + license/isc.txt \ + license/lgpl-2.1.txt \ + license/mit.txt \ + +DPDK_DEPENDENCIES = \ + host-pkgconf \ + host-python-pyelftools \ + libbsd \ + jansson \ + libpcap \ + zlib \ + +ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),) +DPDK_DEPENDENCIES += libexecinfo +endif + +DPDK_CONF_OPTS += -Dcpu_instruction_set=$(BR2_GCC_TARGET_ARCH) +#DPDK_CONF_OPTS += -Dplatform=generic + +$(eval $(meson-package)) -- 2.46.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [Buildroot] [PATCH v2 1/1] package/dpdk: add 24.03 2024-08-19 22:11 ` [Buildroot] [PATCH v2 1/1] package/dpdk: add 24.03 Vincent Jardin @ 2024-08-25 21:00 ` Julien Olivain 2024-08-27 1:12 ` Vincent Jardin 2024-08-27 0:38 ` [Buildroot] [PATCH v3 0/1] add DPDK libraries Vincent Jardin 1 sibling, 1 reply; 31+ messages in thread From: Julien Olivain @ 2024-08-25 21:00 UTC (permalink / raw) To: Vincent Jardin; +Cc: thomas.petazzoni, buildroot Hi Vincent, Thank you for your patch. I am personally interested to see DPDK entering in Buildroot! Please see my comments below. On 20/08/2024 00:11, Vincent Jardin wrote: > This commit adds the integration of the Data Plane Development Kit > (DPDK), > a suite of libraries and drivers designed for high-performance packet > processing from the user space. DPDK enables direct packet steering > from > some network interfaces to the userland, bypassing the Linux kernel > network stack. This is achieved through userland PCI drivers or by > leveraging some userland memory mappings of the network devices. > > Originally inspired by RDMA (Remote Direct Memory Access) concepts, > DPDK > has been adapted to work with PCI devices that do not inherently > support > RDMA. This adaptation allows for low-latency, high-throughput data > processing by minimizing the overhead typically associated with > kernel-space network drivers. > > Importantly, this commit does not enforce the use of UIO or VFIO > kernel frameworks, as DPDK's architecture supports userland memory > mappings that do not require these technologies. By maintaining this > flexibility, DPDK can operate with a broader range of hardware and > software configurations, making it suitable for diverse Buildroot's > deployment scenarios. > > Signed-off-by: Vincent Jardin <vjardin@free.fr> > Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> > --- > DEVELOPERS | 3 ++ > package/Config.in | 1 + > ...-cpu_instruction_set-from-meson-opti.patch | 32 ++++++++++++++ > package/dpdk/Config.in | 20 +++++++++ > package/dpdk/dpdk.hash | 10 +++++ > package/dpdk/dpdk.mk | 43 +++++++++++++++++++ > 6 files changed, 109 insertions(+) > create mode 100644 > package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > create mode 100644 package/dpdk/Config.in > create mode 100644 package/dpdk/dpdk.hash > create mode 100644 package/dpdk/dpdk.mk > > diff --git a/DEVELOPERS b/DEVELOPERS > index d7d0af3543..7b6f662e6e 100644 > --- a/DEVELOPERS > +++ b/DEVELOPERS > @@ -3241,6 +3241,9 @@ F: package/rtl8822cs/ > N: Victor Huesca <victor.huesca@bootlin.com> > F: support/testing/tests/core/test_root_password.py > > +N: Vincent Jardin <vjardin@free.fr> > +F: package/dpdk/ > + > N: Vincent Prince <vincent.prince.fr@gmail.com> > F: package/nss-myhostname/ > F: package/utp_com/ > diff --git a/package/Config.in b/package/Config.in > index f2c63ffb6e..5b21805e9f 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -1990,6 +1990,7 @@ menu "Networking" > source "package/daq3/Config.in" > source "package/davici/Config.in" > source "package/dht/Config.in" > + source "package/dpdk/Config.in" > source "package/enet/Config.in" > source "package/filemq/Config.in" > source "package/fmlib/Config.in" > diff --git > a/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > new file mode 100644 > index 0000000000..92e3523cd8 > --- /dev/null > +++ > b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > @@ -0,0 +1,32 @@ > +From 121e5d019f0bb6dec0ace2b361611edd10fc8ff8 Mon Sep 17 00:00:00 2001 > +From: Lee Chee Yang <chee.yang.lee@intel.com> > +Date: Wed, 6 Dec 2023 16:58:10 +0800 > +Subject: [PATCH] config/meson: get cpu_instruction_set from meson > option > + > +Workaround error: > +| ../git/config/meson.build:178:8: ERROR: Problem encountered: > Compiler > +does not support "x86_64" arch flag. > + > +Upstream-Status: Inappropriate [ yocto specific to set > cpu_instruction_set ] This "Upstream-Status:" tag seems to come from Yocto. Could you add another "Upstream: fetched from https://..." tag including the URL where you picked this patch? This will make tracking easier in future package updates. > + > +Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> > +--- > + config/meson.build | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/config/meson.build b/config/meson.build > +index a9ccd56deb..f310c7adf6 100644 > +--- a/config/meson.build > ++++ b/config/meson.build > +@@ -105,7 +105,7 @@ platform = get_option('platform') > + > + # set the cpu_instruction_set and cflags for it > + if meson.is_cross_build() > +- cpu_instruction_set = host_machine.cpu() > ++ cpu_instruction_set = get_option('cpu_instruction_set') > + else > + cpu_instruction_set = get_option('cpu_instruction_set') > + machine = get_option('machine') > +-- > +2.37.3 > + > diff --git a/package/dpdk/Config.in b/package/dpdk/Config.in > new file mode 100644 > index 0000000000..25771aa0dd > --- /dev/null > +++ b/package/dpdk/Config.in > @@ -0,0 +1,20 @@ I would have expected a definition of BR2_PACKAGE_DPDK_ARCH_SUPPORTS here. I know DPDK has some requirements/restrictions on supported architectures. For example, version 17.08 raised the minimal x86 requirement to have SSE4.2. See: https://doc.dpdk.org/guides-17.08/rel_notes/release_17_08.html So we should have something like: config BR2_PACKAGE_DPDK_ARCH_SUPPORTS bool default y if BR2_RISCV_64 default y if BR2_aarch64 || BR2_aarch64_be default y if BR2_powerpc64le # DPDK requires SSE4.2 for x86_64 since v17.08 default y if BR2_x86_64 && BR2_X86_CPU_HAS_SSE42 there is possibly other supported architectures... This can be tested by running the command: utils/test-pkg -a -p dpdk > +config BR2_PACKAGE_DPDK > + bool "dpdk" > + depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS # libbsd > + depends on !BR2_STATIC_LIBS # libbsd > + depends on BR2_TOOLCHAIN_HAS_THREADS # libbsd > + depends on BR2_USE_WCHAR # libbsd, libexecinfo DPDK has some specific requirements, documented in: https://github.com/DPDK/dpdk/blob/v24.07/doc/guides/linux_gsg/sys_reqs.rst I believe some of those should be captured here. I'm thinking about C11 atomics, and Kernel >= 4.19. We should have dependencies like: depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h # dpdk requires kernel >= 4.14: # https://github.com/DPDK/dpdk/blob/v24.07/doc/guides/linux_gsg/sys_reqs.rst depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14 > + select BR2_PACKAGE_LIBBSD > + select BR2_PACKAGE_LIBEXECINFO if !BR2_TOOLCHAIN_USES_GLIBC > + select BR2_PACKAGE_JANSSON > + select BR2_PACKAGE_LIBPCAP > + select BR2_PACKAGE_ZLIB Those dependencies (libbsd, jansson, libpcap, zlib) seems to be optional. In that case, they should not be selected here. See my comments below in the .mk file. > + help > + DPDK (Data Plane Development Kit) is a set of libraries > + and drivers for fast packet processing. > + > + http://dpdk.org/ This URL redirects to https://www.dpdk.org/ which seems to be the canonical package homepage address. Could you update it? > + > +comment "dpdk needs a toolchain w/ dynamic library, threads, wchar" > + depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS > + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS || > !BR2_USE_WCHAR > diff --git a/package/dpdk/dpdk.hash b/package/dpdk/dpdk.hash > new file mode 100644 > index 0000000000..371c59d229 > --- /dev/null > +++ b/package/dpdk/dpdk.hash > @@ -0,0 +1,10 @@ > +# Locally computed > +sha256 > 33ed973b3945af4f5923096ddca250b401dc80be3b5c6393b4e4fe43a1a6c2ad > dpdk-24.03.tar.xz > +sha256 > 1531b66affc3bae796d755e12850795e56e25ccedd685bf7d2644d8ddfadbad8 > license/bsd-2-clause.txt > +sha256 > 9acc4bc871a4742550158e3696dcb381953172ef808d04ca248184f9f6322712 > license/bsd-3-clause.txt > +sha256 > e19808bccd90c238fac06da2fc3683e094c64f7ba647e9d86f03a98cf5f2ce05 > license/exceptions.txt > +sha256 > 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 > license/gpl-2.0.txt > +sha256 > be8f198f2e1c9b30226e293255bbe6933ee6607a580ee5874185aa023bcc3c39 > license/isc.txt > +sha256 > 592987e8510228d546540b84a22444bde98e48d03078d3b2eefcd889bec5ce8c > license/lgpl-2.1.txt > +sha256 > 6c54c4d44faf3cba829b3d0c21c6955953e758767018fd7244f809b01d4f4845 > license/mit.txt The list of licenses might need updated, see my comment below in the .mk file. > +sha256 > cae178052c96959741acb7f00634a09a8294e6cafb5ad53e158d63e3510875ab > license/README > diff --git a/package/dpdk/dpdk.mk b/package/dpdk/dpdk.mk > new file mode 100644 > index 0000000000..567e886f80 > --- /dev/null > +++ b/package/dpdk/dpdk.mk > @@ -0,0 +1,43 @@ > +################################################################################ > +# > +# dpdk > +# > +################################################################################ > + > +DPDK_VERSION = 24.03 The is already a version 24.07 released few weeks ago. See: https://github.com/DPDK/dpdk/releases/tag/v24.07 In case you send a updated version of this patch, could you upgrade to this new version? > +DPDK_SOURCE = dpdk-$(DPDK_VERSION).tar.xz > +DPDK_SITE = http://fast.dpdk.org/rel This URL redirects to https. Could you update it to https://fast.dpdk.org/rel ? > +DPDK_LICENSE = \ > + BSD-3-Clause, \ > + BSD-2-Clause,\ > + GPL-2.0, \ > + ISC, \ > + LGPL-2.1, \ > + MIT This is maybe too many licenses listed here. The DPDK core libraries are now mostly BSD-3-Clause. The code base has some specific parts under other licenses. Maybe we should identify which license apply to which part. For example: DPDK_LICENSE = \ BSD-3-Clause (core libraries), \ MIT (drivers/net/gve/base/*) Also, the ISC and BSD-2-Clause is used in a Windows-only abstraction layer. See: https://github.com/DPDK/dpdk/blob/v24.07/lib/eal/windows/getopt.c There is also some Freescale/NXP drivers (dpaa) which are dual licensed under (BSD-3-Clause or GPL-2.0), that could be identified. Maybe this is a question to Buildroot maintainers: should we list here licenses of code which are known to be unused, such as this Windows abstraction layer? The DPDK components and licenses can be checked in its git repository, with the command: git grep -F SPDX-License-Identifier: Since DPDK has a somewhat "complex" licensing and history, an explanation could be added in the commit log. For example: Notes about license: DPDK is now mainly under the BSD-3-Clause license. One network driver, the Google Virtual Ethernet (GVE) include files under the MIT license. See [2] and [3]. DPDK used to include a Kernel NIC Interface (KNI) kernel module in GPL-2.0 license. This module was removed in commit [4]. This commit was first included in version v23.11. There is also few files in "lib/eal/windows" under other licenses (namely BSD-2-Clause, ISC and MIT) but are parts of the Environment Abstraction Library (EAL) for Microsoft Windows OS, not used when compiling for Linux in Buildroot. The list of dpdk license exceptions is maintained at [3]. [1] https://www.dpdk.org/ [2] https://github.com/DPDK/dpdk/blob/v24.07/doc/guides/nics/gve.rst [3] https://github.com/DPDK/dpdk/blob/v24.07/license/exceptions.txt [4] https://github.com/DPDK/dpdk/commit/f78c100bc87119c6a94130a6689d773afdaa9d98 > + > +DPDK_LICENSE_FILES = \ > + license/README \ > + license/bsd-3-clause.txt \ > + license/bsd-2-clause.txt \ > + license/exceptions.txt \ > + license/gpl-2.0.txt \ > + license/isc.txt \ > + license/lgpl-2.1.txt \ > + license/mit.txt \ Then the license file list should include only the mentioned license before. The README and exceptions.txt can be kept. > + > +DPDK_DEPENDENCIES = \ > + host-pkgconf \ > + host-python-pyelftools \ > + libbsd \ > + jansson \ > + libpcap \ > + zlib \ libbsd is an optional dependency, see: https://github.com/DPDK/dpdk/blob/v24.07/config/meson.build#L266 other dependencies seems to be optional too. I believe only host-python-pyelftools is really a mandatory dependency and all other are optional. Mandatory dependency can be listed with an assignment such as: DPDK_DEPENDENCIES = \ mandatory_dependency1 \ mandatory_dependency2 While optional dependencies can be added with something like: ifeq ($(BR2_PACKAGE_OPTIONAL_DEPENDENCY),y) DPDK_CONF_OPTS += -DOPTIONAL_DEPENDENCY=true DPDK_DEPENDENCIES += optional-dependency else DPDK_CONF_OPTS += -DOPTIONAL_DEPENDENCY=false endif See the meson example in: https://nightly.buildroot.org/manual.html#_infrastructure_for_meson_based_packages Looking at the Meson file, I think the optional Buildroot package dependencies are: dtc jansson libarchive libbpf libpcap numactl openssl rdma-core zlib > + > +ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),) > +DPDK_DEPENDENCIES += libexecinfo > +endif > + > +DPDK_CONF_OPTS += -Dcpu_instruction_set=$(BR2_GCC_TARGET_ARCH) > +#DPDK_CONF_OPTS += -Dplatform=generic Is this comment intended? If yes, please remove the line. I don't know if it is related, but last time I had to use dpdk-24.03 in Buildroot, I had to define the platform in a Meson extra property such as: DPDK_MESON_EXTRA_PROPERTIES = platform='generic' Could you check if this platform definition is needed? > + Finally, DPDK core has a strong requirement on Kernel having CONFIG_HUGETLBFS enabled. See: https://github.com/DPDK/dpdk/blob/v24.07/doc/guides/linux_gsg/sys_reqs.rst So this package could define a Kernel config fixup, to make sure we'll end up in a working system image: define DPDK_LINUX_CONFIG_FIXUPS $(call KCONFIG_ENABLE_OPT,CONFIG_HUGETLBFS) endef > +$(eval $(meson-package)) > -- > 2.46.0 > > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot Best regards, Julien. _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [Buildroot] [PATCH v2 1/1] package/dpdk: add 24.03 2024-08-25 21:00 ` Julien Olivain @ 2024-08-27 1:12 ` Vincent Jardin 0 siblings, 0 replies; 31+ messages in thread From: Vincent Jardin @ 2024-08-27 1:12 UTC (permalink / raw) To: Julien Olivain; +Cc: Thomas Petazzoni, buildroot Hi Julien, On Sun, Aug 25, 2024 at 11:00:49PM UTC, Julien Olivain wrote: > Thank you for your patch. I am personally interested to see DPDK entering > in Buildroot! Please see my comments below. You welcome and thanks for the thorough review. It has been very valuable. > > +Upstream-Status: Inappropriate [ yocto specific to set > > cpu_instruction_set ] > > This "Upstream-Status:" tag seems to come from Yocto. Could you add > another "Upstream: fetched from https://..." tag including the URL > where you picked this patch? This will make tracking easier in future > package updates. Done: I have added the Buildroot's `Upstream` tag too. I do not want to drop the Yocto's one in order to link it from Yocto too. Down the road, this patch shall be upstreamed on DPDK.org > I would have expected a definition of BR2_PACKAGE_DPDK_ARCH_SUPPORTS > here. I know DPDK has some requirements/restrictions on supported > architectures. For example, version 17.08 raised the minimal x86 > requirement to have SSE4.2. See: > https://doc.dpdk.org/guides-17.08/rel_notes/release_17_08.html done v3 > https://github.com/DPDK/dpdk/blob/v24.07/doc/guides/linux_gsg/sys_reqs.rst > depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14 I hope I have captured it properly, I am still into my learning phases of Buildroot. > > + http://dpdk.org/ > > This URL redirects to https://www.dpdk.org/ which seems to be the > canonical package homepage address. Could you update it? done v3 > > +DPDK_SITE = http://fast.dpdk.org/rel > > This URL redirects to https. Could you update it to > https://fast.dpdk.org/rel ? done v3 > > +DPDK_LICENSE = \ > > + BSD-3-Clause, \ > > + BSD-2-Clause,\ > > + GPL-2.0, \ > > + ISC, \ > > + LGPL-2.1, \ > > + MIT > > This is maybe too many licenses listed here. The DPDK core libraries > are now mostly BSD-3-Clause. The code base has some specific parts > under other licenses. Maybe we should identify which license apply to > which part. For example: > > DPDK_LICENSE = \ > BSD-3-Clause (core libraries), \ > MIT (drivers/net/gve/base/*) > > Also, the ISC and BSD-2-Clause is used in a Windows-only abstraction > layer. See: > https://github.com/DPDK/dpdk/blob/v24.07/lib/eal/windows/getopt.c > > There is also some Freescale/NXP drivers (dpaa) which are dual > licensed under (BSD-3-Clause or GPL-2.0), that could be identified. > > Maybe this is a question to Buildroot maintainers: should we list here > licenses of code which are known to be unused, such as this Windows > abstraction layer? > > The DPDK components and licenses can be checked in its git repository, > with the command: > > git grep -F SPDX-License-Identifier: > > Since DPDK has a somewhat "complex" licensing and history, an > explanation could be added in the commit log. For example: > > Notes about license: > > DPDK is now mainly under the BSD-3-Clause license. > > One network driver, the Google Virtual Ethernet (GVE) include files > under the MIT license. See [2] and [3]. > > DPDK used to include a Kernel NIC Interface (KNI) kernel module in > GPL-2.0 license. This module was removed in commit [4]. This commit > was first included in version v23.11. > > There is also few files in "lib/eal/windows" under other licenses > (namely BSD-2-Clause, ISC and MIT) but are parts of the Environment > Abstraction Library (EAL) for Microsoft Windows OS, not used when > compiling for Linux in Buildroot. > > The list of dpdk license exceptions is maintained at [3]. > > [1] https://www.dpdk.org/ > [2] https://github.com/DPDK/dpdk/blob/v24.07/doc/guides/nics/gve.rst > [3] https://github.com/DPDK/dpdk/blob/v24.07/license/exceptions.txt > [4] https://github.com/DPDK/dpdk/commit/f78c100bc87119c6a94130a6689d773afdaa9d98 Thanks for your suggestions, I have adpated them into the commit log and some additionnal comments included too. > > +DPDK_LICENSE_FILES = \ > > + license/README \ > > + license/bsd-3-clause.txt \ > > + license/bsd-2-clause.txt \ > > + license/exceptions.txt \ > > + license/gpl-2.0.txt \ > > + license/isc.txt \ > > + license/lgpl-2.1.txt \ > > + license/mit.txt \ > > Then the license file list should include only the mentioned license > before. The README and exceptions.txt can be kept. done v3, Windows related topics are removed, same for the kernel module ones, they are removed. > > +DPDK_DEPENDENCIES = \ > > + host-pkgconf \ > > + host-python-pyelftools \ > > + libbsd \ > > + jansson \ > > + libpcap \ > > + zlib \ > > libbsd is an optional dependency, see: > https://github.com/DPDK/dpdk/blob/v24.07/config/meson.build#L266 > other dependencies seems to be optional too. I believe only > host-python-pyelftools is really a mandatory dependency and all other > are optional. done v3, it is per your suggestion. > While optional dependencies can be added with something like: > > ifeq ($(BR2_PACKAGE_OPTIONAL_DEPENDENCY),y) > DPDK_CONF_OPTS += -DOPTIONAL_DEPENDENCY=true > DPDK_DEPENDENCIES += optional-dependency > else > DPDK_CONF_OPTS += -DOPTIONAL_DEPENDENCY=false > endif Why DPDK_CONF_OPTS ? host-pkgconf is doing it automatically when it gets called by meson. > Looking at the Meson file, I think the optional Buildroot package > dependencies are: > dtc jansson libarchive libbpf libpcap numactl openssl rdma-core zlib done v3 except the crypto part (openssl) since I need to include more crypto cases. Those crypto cases will be for another drop, but not this serie. > DPDK_MESON_EXTRA_PROPERTIES = platform='generic' > > Could you check if this platform definition is needed? Currently, DPDK's meson need a bit of clean up, I keep it for the time being. > Finally, DPDK core has a strong requirement on Kernel having > CONFIG_HUGETLBFS enabled. See: > https://github.com/DPDK/dpdk/blob/v24.07/doc/guides/linux_gsg/sys_reqs.rst > > So this package could define a Kernel config fixup, to make sure we'll > end up in a working system image: > > define DPDK_LINUX_CONFIG_FIXUPS > $(call KCONFIG_ENABLE_OPT,CONFIG_HUGETLBFS) > endef No, I disagree to enforce those kernel options ; they are not mandatory. Some targets will not required them. I hope that I did capture all your comments into the v3. best regards, Vincent _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* [Buildroot] [PATCH v3 0/1] add DPDK libraries 2024-08-19 22:11 ` [Buildroot] [PATCH v2 1/1] package/dpdk: add 24.03 Vincent Jardin 2024-08-25 21:00 ` Julien Olivain @ 2024-08-27 0:38 ` Vincent Jardin 2024-08-27 0:38 ` [Buildroot] [PATCH v3 1/1] package/dpdk: add 24.07 Vincent Jardin 1 sibling, 1 reply; 31+ messages in thread From: Vincent Jardin @ 2024-08-27 0:38 UTC (permalink / raw) To: buildroot; +Cc: Vincent Jardin, Julien Olivain, Thomas Petazzoni v2 -> v3 changes: - include the comments from Julien Olivain - refine the licenses - support little endian targets only - many build dependencies if the packages are selected v1 -> v2 changes: - include the comments from Thomas - add a meson patch for the DPDK that I forgot to include This patch has been aligned with Yocto so we can share the same feedbacks. I'll upstream it on DPDK too. Vincent Jardin (1): package/dpdk: add 24.03 DEVELOPERS | 3 + package/Config.in | 1 + ...-cpu_instruction_set-from-meson-opti.patch | 33 +++++++ package/dpdk/Config.in | 29 +++++++ package/dpdk/dpdk.hash | 10 +++ package/dpdk/dpdk.mk | 87 +++++++++++++++++++ 6 files changed, 163 insertions(+) create mode 100644 package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch create mode 100644 package/dpdk/Config.in create mode 100644 package/dpdk/dpdk.hash create mode 100644 package/dpdk/dpdk.mk -- 2.46.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* [Buildroot] [PATCH v3 1/1] package/dpdk: add 24.07 2024-08-27 0:38 ` [Buildroot] [PATCH v3 0/1] add DPDK libraries Vincent Jardin @ 2024-08-27 0:38 ` Vincent Jardin 2024-08-28 10:21 ` [Buildroot] [PATCH v4 0/1] add DPDK libraries Vincent Jardin 0 siblings, 1 reply; 31+ messages in thread From: Vincent Jardin @ 2024-08-27 0:38 UTC (permalink / raw) To: buildroot; +Cc: Vincent Jardin, Julien Olivain, Thomas Petazzoni This commit adds the integration of the Data Plane Development Kit (DPDK), a suite of libraries and drivers designed for high-performance packet processing from the user space. DPDK enables direct packet steering from some network interfaces to the userland, bypassing the Linux kernel network stack. This is achieved through userland PCI drivers or by leveraging some userland memory mappings of the network devices. Originally inspired by RDMA (Remote Direct Memory Access) concepts, DPDK has been adapted to work with PCI devices that do not inherently support RDMA. This adaptation allows for low-latency, high-throughput data processing by minimizing the overhead typically associated with kernel-space network drivers. Importantly, this commit does not enforce the use of UIO or VFIO kernel frameworks, as DPDK's architecture supports userland memory mappings that do not require these technologies. By maintaining this flexibility, DPDK can operate with a broader range of hardware and software configurations, making it suitable for diverse Buildroot's deployment scenarios. Yocto patch imported from: https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch Only the little endian targets are properly supported by DPDK. Big endian was supported, mostly on Power8, but it has not been used for a while and IBM is not strongly pushing any tests. Should big endian be supported again, DPDK community will be welcoming any contributions. Some nice to have for the Kernel, but not mandatory: - CONFIG_VFIO_IOMMU_TYPE1=y - CONFIG_VFIO_VIRQFD=y - CONFIG_VFIO=y - CONFIG_VFIO_NOIOMMU=y - CONFIG_VFIO_PCI=y - CONFIG_VFIO_PCI_MMAP=y - CONFIG_HUGETLBFS=y - CONFIG_HUGETLB_PAGE=y - CONFIG_PROC_PAGE_MONITOR=y For x86 only, HPET and HPET_MMAP can be some nice to have too. Since they are some nice to have, but not mandatory ones, the following Kernel config fixups are not used: define DPDK_LINUX_CONFIG_FIXUPS $(call KCONFIG_ENABLE_OPT, CONFIG_HUGETLBFS) ... endef Notes about license: DPDK was released with the BSD-3-Clause license. One network driver, the Google Virtual Ethernet (GVE) include files under the MIT license. See [2] and [3]. DPDK had been including a Kernel Netdevice Interface (KNI) and an IGB_UIO kernel module under the GPL-2.0 license. Those modules were moved into a different repository [K]. Then, for instance, the KNI module was removed by [KNI]. This commit was first included in version v23.11. The IGB_UIO kernel module was removed by [UIO] since VFIO became capable of supporting all the required usecases for the DPDK. The main remaining issues had been the support of memory mapping within a VM or without the use of nested virtualization but those were fixed by the latest VFIO's kernel support. We can notice that the PMD drivers that are using the ibverbs (RDMA) APIs are not sharing this need of UIO/VFIO. There are also 2 files in "lib/eal/windows" under other licenses (namely BSD-2-Clause, ISC and MIT) but they are parts of the Environment Abstraction Library (EAL) for Microsoft Windows OS, it means they are not used when compiling for the Linux targets of Buildroot. The list of DPDK license exceptions is maintained at [3]. [1] https://www.dpdk.org/ [2] https://github.com/DPDK/dpdk/blob/v24.07/doc/guides/nics/gve.rst [3] https://github.com/DPDK/dpdk/blob/v24.07/license/exceptions.txt [KNI] https://git.dpdk.org/dpdk/commit/?id=f78c100bc87119c6a94130a6689d773afdaa9d98 [UIO] https://git.dpdk.org/dpdk/commit/?id=56bb5841fd0608989101d933f091852a3126b4fe [K] https://git.dpdk.org/dpdk-kmods/commit/?id=d16f3b44987be181b6effee139558a084eaf9f8c Signed-off-by: Vincent Jardin <vjardin@free.fr> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Reviewed-by: Julien Olivain <ju.o@free.fr> --- DEVELOPERS | 3 + package/Config.in | 1 + ...-cpu_instruction_set-from-meson-opti.patch | 33 +++++++ package/dpdk/Config.in | 29 +++++++ package/dpdk/dpdk.hash | 10 +++ package/dpdk/dpdk.mk | 87 +++++++++++++++++++ 6 files changed, 163 insertions(+) create mode 100644 package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch create mode 100644 package/dpdk/Config.in create mode 100644 package/dpdk/dpdk.hash create mode 100644 package/dpdk/dpdk.mk diff --git a/DEVELOPERS b/DEVELOPERS index 426590d5c5..7c3d858e40 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -3238,6 +3238,9 @@ F: package/rtl8822cs/ N: Victor Huesca <victor.huesca@bootlin.com> F: support/testing/tests/core/test_root_password.py +N: Vincent Jardin <vjardin@free.fr> +F: package/dpdk/ + N: Vincent Prince <vincent.prince.fr@gmail.com> F: package/nss-myhostname/ F: package/utp_com/ diff --git a/package/Config.in b/package/Config.in index 211080345a..90e521330b 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1988,6 +1988,7 @@ menu "Networking" source "package/daq3/Config.in" source "package/davici/Config.in" source "package/dht/Config.in" + source "package/dpdk/Config.in" source "package/enet/Config.in" source "package/filemq/Config.in" source "package/fmlib/Config.in" diff --git a/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch new file mode 100644 index 0000000000..8e99379fb6 --- /dev/null +++ b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch @@ -0,0 +1,33 @@ +From 121e5d019f0bb6dec0ace2b361611edd10fc8ff8 Mon Sep 17 00:00:00 2001 +From: Lee Chee Yang <chee.yang.lee@intel.com> +Date: Wed, 6 Dec 2023 16:58:10 +0800 +Subject: [PATCH] config/meson: get cpu_instruction_set from meson option + +Workaround error: +| ../git/config/meson.build:178:8: ERROR: Problem encountered: Compiler +does not support "x86_64" arch flag. + +Upstream-Status: Inappropriate [ yocto specific to set cpu_instruction_set ] + +Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> +Upstream: https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch +--- + config/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/meson.build b/config/meson.build +index a9ccd56deb..f310c7adf6 100644 +--- a/config/meson.build ++++ b/config/meson.build +@@ -105,7 +105,7 @@ platform = get_option('platform') + + # set the cpu_instruction_set and cflags for it + if meson.is_cross_build() +- cpu_instruction_set = host_machine.cpu() ++ cpu_instruction_set = get_option('cpu_instruction_set') + else + cpu_instruction_set = get_option('cpu_instruction_set') + machine = get_option('machine') +-- +2.37.3 + diff --git a/package/dpdk/Config.in b/package/dpdk/Config.in new file mode 100644 index 0000000000..acfb2409d5 --- /dev/null +++ b/package/dpdk/Config.in @@ -0,0 +1,29 @@ +config BR2_PACKAGE_DPDK_ARCH_SUPPORTS + bool + default y + # DPDK can be used for the following little endian architecture + default y if BR2_RISCV_64 + default y if BR2_aarch64 + default y if BR2_powerpc64le + # DPDK requires SSE4.2 for x86_64 since v17.08 + default y if BR2_x86_64 && BR2_X86_CPU_HAS_SSE42 + +config BR2_PACKAGE_DPDK + bool "dpdk" + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS # DPDK design + depends on BR2_USE_MMU # pthread() memory mappings + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 + depends on BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_LIBEXECINFO if !BR2_TOOLCHAIN_USES_GLIBC + help + DPDK (Data Plane Development Kit) is a set of libraries + and drivers for fast packet processing. + + http://dpdk.org/ + +comment "dpdk needs a toolchain w/ dynamic library, threads, wchar, kernel headers >= 4.19" + depends on BR2_USE_MMU # pthread() memory mappings + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/dpdk/dpdk.hash b/package/dpdk/dpdk.hash new file mode 100644 index 0000000000..4e98d9dc25 --- /dev/null +++ b/package/dpdk/dpdk.hash @@ -0,0 +1,10 @@ +# Locally computed +sha256 9944f7e5f268e7ac9b4193e2cd54ef6d98f6e1d7dddc967c77ae4f6616d6fbbd dpdk-24.07.tar.xz +sha256 1531b66affc3bae796d755e12850795e56e25ccedd685bf7d2644d8ddfadbad8 license/bsd-2-clause.txt +sha256 9acc4bc871a4742550158e3696dcb381953172ef808d04ca248184f9f6322712 license/bsd-3-clause.txt +sha256 e19808bccd90c238fac06da2fc3683e094c64f7ba647e9d86f03a98cf5f2ce05 license/exceptions.txt +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 license/gpl-2.0.txt +sha256 be8f198f2e1c9b30226e293255bbe6933ee6607a580ee5874185aa023bcc3c39 license/isc.txt +sha256 592987e8510228d546540b84a22444bde98e48d03078d3b2eefcd889bec5ce8c license/lgpl-2.1.txt +sha256 6c54c4d44faf3cba829b3d0c21c6955953e758767018fd7244f809b01d4f4845 license/mit.txt +sha256 cae178052c96959741acb7f00634a09a8294e6cafb5ad53e158d63e3510875ab license/README diff --git a/package/dpdk/dpdk.mk b/package/dpdk/dpdk.mk new file mode 100644 index 0000000000..4be51ee763 --- /dev/null +++ b/package/dpdk/dpdk.mk @@ -0,0 +1,87 @@ +################################################################################ +# +# dpdk +# +################################################################################ + +DPDK_VERSION = 24.07 +DPDK_SOURCE = dpdk-$(DPDK_VERSION).tar.xz +DPDK_SITE = https://fast.dpdk.org/rel +DPDK_LICENSE = \ + BSD-3-Clause, \ + BSD-2-Clause,\ + GPL-2.0, \ + ISC, \ + LGPL-2.1, \ + MIT + +# Only the Windows target has the 2 following licenses: +# - license/bsd-2-clause.txt +# - license/isc.txt +# which is related to a Windows getopt.[ch] compatibility layer. +# Since Buildroot is not used for Windows target, it is not listed +# here. +# +# All the userland files of DPDK have dual licences BSD or GPL/LGPL +# Since the Linux kernel modules had been removed from the DPDK, there +# is no GPL only code into the DPDK anymore. +# The usage of DPDK with Buildroot is for userland only, it means +# that for the dual licenced files, BSD clause is used but not the +# following ones: +# - license/gpl-2.0.txt +# - license/lgpl-2.1.txt +# See the DPDK's license/README for more details. +# +# The legacy and historical license of the DPDK is BSD-3-clause. +DPDK_LICENSE_FILES = \ + license/README \ + license/bsd-3-clause.txt (legacy) \ + license/exceptions.txt \ + license/mit.txt (drivers/net/gve/base) + +DPDK_DEPENDENCIES = \ + host-pkgconf \ + host-python-pyelftools + +ifeq ($(BR2_PACKAGE_LIBBSD),y) +DPDK_DEPENDENCIES += libbsd +endif + +ifeq ($(BR2_PACKAGE_JANSSON),y) +DPDK_DEPENDENCIES += jansson +endif + +ifeq ($(BR2_PACKAGE_LIBPCAP),y) +DPDK_DEPENDENCIES += libpcap +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +DPDK_DEPENDENCIES += zlib +endif + +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y) +DPDK_DEPENDENCIES += libexecinfo +endif + +ifeq ($(BR2_PACKAGE_NUMACTL),y) +DPDK_DEPENDENCIES += numactl +endif + +ifeq ($(BR2_PACKAGE_LIBARCHIVE),y) +DPDK_DEPENDENCIES += libarchive +endif + +ifeq ($(BR2_PACKAGE_LIBBPF),y) +DPDK_DEPENDENCIES += libbpf +endif + +ifeq ($(BR2_PACKAGE_RDMA_CORE),y) +DPDK_DEPENDENCIES += rdma-core +endif + +# DPDK's meson shall need to be clean'd, hack here along the enclosed patch +DPDK_CONF_OPTS += -Dcpu_instruction_set=$(BR2_GCC_TARGET_ARCH) +# Keep the following, even if not mandatory, until the removal of the patch +DPDK_MESON_EXTRA_PROPERTIES += platform='generic' + +$(eval $(meson-package)) -- 2.46.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 31+ messages in thread
* [Buildroot] [PATCH v4 0/1] add DPDK libraries 2024-08-27 0:38 ` [Buildroot] [PATCH v3 1/1] package/dpdk: add 24.07 Vincent Jardin @ 2024-08-28 10:21 ` Vincent Jardin 2024-08-28 10:21 ` [Buildroot] [PATCH v4 1/1] package/dpdk: add 24.07 Vincent Jardin 2024-09-04 19:44 ` [Buildroot] [PATCH v4 " Vincent Jardin 0 siblings, 2 replies; 31+ messages in thread From: Vincent Jardin @ 2024-08-28 10:21 UTC (permalink / raw) To: buildroot; +Cc: Vincent Jardin, Julien Olivain, Thomas Petazzoni v3 -> v4 changes: - proof readings (dpdk/DPDK, git.dpdk.org instead of github) - gcc 4.9 needed v2 -> v3 changes: - include the comments from Julien Olivain - refine the licenses - support little endian targets only - many build dependencies if the packages are selected v1 -> v2 changes: - include the comments from Thomas - add a meson patch for the DPDK that I forgot to include This patch has been aligned with Yocto so we can share the same feedbacks. I'll upstream it on DPDK too. Vincent Jardin (1): package/dpdk: add 24.07 DEVELOPERS | 3 + package/Config.in | 1 + ...-cpu_instruction_set-from-meson-opti.patch | 33 +++++++ package/dpdk/Config.in | 34 ++++++++ package/dpdk/dpdk.hash | 10 +++ package/dpdk/dpdk.mk | 87 +++++++++++++++++++ 6 files changed, 168 insertions(+) create mode 100644 package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch create mode 100644 package/dpdk/Config.in create mode 100644 package/dpdk/dpdk.hash create mode 100644 package/dpdk/dpdk.mk -- 2.46.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* [Buildroot] [PATCH v4 1/1] package/dpdk: add 24.07 2024-08-28 10:21 ` [Buildroot] [PATCH v4 0/1] add DPDK libraries Vincent Jardin @ 2024-08-28 10:21 ` Vincent Jardin 2024-09-06 22:33 ` Julien Olivain 2024-09-09 12:58 ` [Buildroot] [PATCH v5 0/1] add DPDK libraries Vincent Jardin 2024-09-04 19:44 ` [Buildroot] [PATCH v4 " Vincent Jardin 1 sibling, 2 replies; 31+ messages in thread From: Vincent Jardin @ 2024-08-28 10:21 UTC (permalink / raw) To: buildroot; +Cc: Vincent Jardin, Julien Olivain, Thomas Petazzoni This commit adds the integration of the Data Plane Development Kit (DPDK), a suite of libraries and drivers designed for high-performance packet processing from the user space. DPDK enables direct packet steering from some network interfaces to the userland, bypassing the Linux kernel network stack. This is achieved through userland PCI drivers or by leveraging some userland memory mappings of the network devices. Originally inspired by RDMA (Remote Direct Memory Access) concepts, DPDK has been adapted to work with PCI devices that do not inherently support RDMA. This adaptation allows for low-latency, high-throughput data processing by minimizing the overhead typically associated with kernel-space network drivers. Importantly, this commit does not enforce the use of UIO or VFIO kernel frameworks, as DPDK's architecture supports userland memory mappings that do not require these technologies. By maintaining this flexibility, DPDK can operate with a broader range of hardware and software configurations, making it suitable for diverse Buildroot's deployment scenarios. Yocto patch imported from: https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch Only the little endian targets are properly supported by DPDK. Big endian was supported, mostly on Power8, but it has not been used for a while and IBM is not strongly pushing any tests. Should big endian be supported again, DPDK community will be welcoming any contributions. Some nice to have for the Kernel, but not mandatory: - CONFIG_VFIO_IOMMU_TYPE1=y - CONFIG_VFIO_VIRQFD=y - CONFIG_VFIO=y - CONFIG_VFIO_NOIOMMU=y - CONFIG_VFIO_PCI=y - CONFIG_VFIO_PCI_MMAP=y - CONFIG_HUGETLBFS=y - CONFIG_HUGETLB_PAGE=y - CONFIG_PROC_PAGE_MONITOR=y For x86 only, HPET and HPET_MMAP can be some nice to have too. Since they are some nice to have, but not mandatory ones, the following Kernel config fixups are not used: define DPDK_LINUX_CONFIG_FIXUPS $(call KCONFIG_ENABLE_OPT, CONFIG_HUGETLBFS) ... endef Notes about license: DPDK was released with the BSD-3-Clause license. One network driver, the Google Virtual Ethernet (GVE) include files under the MIT license. See [2] and [3]. DPDK had been including a Kernel Netdevice Interface (KNI) and an IGB_UIO kernel module under the GPL-2.0 license. Those modules were moved into a different repository [K]. Then, for instance, the KNI module was removed by [KNI]. This commit was first included in version v23.11. The IGB_UIO kernel module was removed by [UIO] since VFIO became capable of supporting all the required usecases for the DPDK. The main remaining issues had been the support of memory mapping within a VM or without the use of nested virtualization but those were fixed by the latest VFIO's kernel support. We can notice that the PMD drivers that are using the ibverbs (RDMA) APIs are not sharing this need of UIO/VFIO. There are also 2 files in "lib/eal/windows" under other licenses (namely BSD-2-Clause, ISC and MIT) but they are parts of the Environment Abstraction Library (EAL) for Microsoft Windows OS, it means they are not used when compiling for the Linux targets of Buildroot. The list of DPDK license exceptions is maintained at [3]. [1] https://www.dpdk.org/ [2] https://git.dpdk.org/dpdk/tree/doc/guides/nics/gve.rst?h=v24.07 [3] https://git.dpdk.org/dpdk/tree/license/exceptions.txt?h=v24.07 [KNI] https://git.dpdk.org/dpdk/commit/?id=f78c100bc87119c6a94130a6689d773afdaa9d98 [UIO] https://git.dpdk.org/dpdk/commit/?id=56bb5841fd0608989101d933f091852a3126b4fe [K] https://git.dpdk.org/dpdk-kmods/commit/?id=d16f3b44987be181b6effee139558a084eaf9f8c Signed-off-by: Vincent Jardin <vjardin@free.fr> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Reviewed-by: Julien Olivain <ju.o@free.fr> --- DEVELOPERS | 3 + package/Config.in | 1 + ...-cpu_instruction_set-from-meson-opti.patch | 33 +++++++ package/dpdk/Config.in | 34 ++++++++ package/dpdk/dpdk.hash | 10 +++ package/dpdk/dpdk.mk | 87 +++++++++++++++++++ 6 files changed, 168 insertions(+) create mode 100644 package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch create mode 100644 package/dpdk/Config.in create mode 100644 package/dpdk/dpdk.hash create mode 100644 package/dpdk/dpdk.mk diff --git a/DEVELOPERS b/DEVELOPERS index 426590d5c5..7c3d858e40 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -3238,6 +3238,9 @@ F: package/rtl8822cs/ N: Victor Huesca <victor.huesca@bootlin.com> F: support/testing/tests/core/test_root_password.py +N: Vincent Jardin <vjardin@free.fr> +F: package/dpdk/ + N: Vincent Prince <vincent.prince.fr@gmail.com> F: package/nss-myhostname/ F: package/utp_com/ diff --git a/package/Config.in b/package/Config.in index 211080345a..90e521330b 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1988,6 +1988,7 @@ menu "Networking" source "package/daq3/Config.in" source "package/davici/Config.in" source "package/dht/Config.in" + source "package/dpdk/Config.in" source "package/enet/Config.in" source "package/filemq/Config.in" source "package/fmlib/Config.in" diff --git a/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch new file mode 100644 index 0000000000..8e99379fb6 --- /dev/null +++ b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch @@ -0,0 +1,33 @@ +From 121e5d019f0bb6dec0ace2b361611edd10fc8ff8 Mon Sep 17 00:00:00 2001 +From: Lee Chee Yang <chee.yang.lee@intel.com> +Date: Wed, 6 Dec 2023 16:58:10 +0800 +Subject: [PATCH] config/meson: get cpu_instruction_set from meson option + +Workaround error: +| ../git/config/meson.build:178:8: ERROR: Problem encountered: Compiler +does not support "x86_64" arch flag. + +Upstream-Status: Inappropriate [ yocto specific to set cpu_instruction_set ] + +Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> +Upstream: https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch +--- + config/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/meson.build b/config/meson.build +index a9ccd56deb..f310c7adf6 100644 +--- a/config/meson.build ++++ b/config/meson.build +@@ -105,7 +105,7 @@ platform = get_option('platform') + + # set the cpu_instruction_set and cflags for it + if meson.is_cross_build() +- cpu_instruction_set = host_machine.cpu() ++ cpu_instruction_set = get_option('cpu_instruction_set') + else + cpu_instruction_set = get_option('cpu_instruction_set') + machine = get_option('machine') +-- +2.37.3 + diff --git a/package/dpdk/Config.in b/package/dpdk/Config.in new file mode 100644 index 0000000000..82d9a0a798 --- /dev/null +++ b/package/dpdk/Config.in @@ -0,0 +1,34 @@ +config BR2_PACKAGE_DPDK_ARCH_SUPPORTS + bool + default y + # DPDK can be used for the following little endian architecture + default y if BR2_RISCV_64 + default y if BR2_aarch64 + default y if BR2_powerpc64le + # DPDK requires SSE4.2 for x86_64 since v17.08 + default y if BR2_x86_64 && BR2_X86_CPU_HAS_SSE42 + +config BR2_PACKAGE_DPDK + bool "dpdk" + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS # DPDK design + depends on BR2_USE_MMU # pthread() memory mappings + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 + depends on BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_LIBEXECINFO if !BR2_TOOLCHAIN_USES_GLIBC + help + DPDK (Data Plane Development Kit) is a set of libraries + and drivers for fast packet processing. + + http://dpdk.org/ + +comment "DPDK needs a toolchain w/ dynamic library, threads, wchar, kernel headers >= 4.19" + depends on BR2_USE_MMU # pthread() memory mappings + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_USES_GLIBC || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 diff --git a/package/dpdk/dpdk.hash b/package/dpdk/dpdk.hash new file mode 100644 index 0000000000..4e98d9dc25 --- /dev/null +++ b/package/dpdk/dpdk.hash @@ -0,0 +1,10 @@ +# Locally computed +sha256 9944f7e5f268e7ac9b4193e2cd54ef6d98f6e1d7dddc967c77ae4f6616d6fbbd dpdk-24.07.tar.xz +sha256 1531b66affc3bae796d755e12850795e56e25ccedd685bf7d2644d8ddfadbad8 license/bsd-2-clause.txt +sha256 9acc4bc871a4742550158e3696dcb381953172ef808d04ca248184f9f6322712 license/bsd-3-clause.txt +sha256 e19808bccd90c238fac06da2fc3683e094c64f7ba647e9d86f03a98cf5f2ce05 license/exceptions.txt +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 license/gpl-2.0.txt +sha256 be8f198f2e1c9b30226e293255bbe6933ee6607a580ee5874185aa023bcc3c39 license/isc.txt +sha256 592987e8510228d546540b84a22444bde98e48d03078d3b2eefcd889bec5ce8c license/lgpl-2.1.txt +sha256 6c54c4d44faf3cba829b3d0c21c6955953e758767018fd7244f809b01d4f4845 license/mit.txt +sha256 cae178052c96959741acb7f00634a09a8294e6cafb5ad53e158d63e3510875ab license/README diff --git a/package/dpdk/dpdk.mk b/package/dpdk/dpdk.mk new file mode 100644 index 0000000000..4be51ee763 --- /dev/null +++ b/package/dpdk/dpdk.mk @@ -0,0 +1,87 @@ +################################################################################ +# +# dpdk +# +################################################################################ + +DPDK_VERSION = 24.07 +DPDK_SOURCE = dpdk-$(DPDK_VERSION).tar.xz +DPDK_SITE = https://fast.dpdk.org/rel +DPDK_LICENSE = \ + BSD-3-Clause, \ + BSD-2-Clause,\ + GPL-2.0, \ + ISC, \ + LGPL-2.1, \ + MIT + +# Only the Windows target has the 2 following licenses: +# - license/bsd-2-clause.txt +# - license/isc.txt +# which is related to a Windows getopt.[ch] compatibility layer. +# Since Buildroot is not used for Windows target, it is not listed +# here. +# +# All the userland files of DPDK have dual licences BSD or GPL/LGPL +# Since the Linux kernel modules had been removed from the DPDK, there +# is no GPL only code into the DPDK anymore. +# The usage of DPDK with Buildroot is for userland only, it means +# that for the dual licenced files, BSD clause is used but not the +# following ones: +# - license/gpl-2.0.txt +# - license/lgpl-2.1.txt +# See the DPDK's license/README for more details. +# +# The legacy and historical license of the DPDK is BSD-3-clause. +DPDK_LICENSE_FILES = \ + license/README \ + license/bsd-3-clause.txt (legacy) \ + license/exceptions.txt \ + license/mit.txt (drivers/net/gve/base) + +DPDK_DEPENDENCIES = \ + host-pkgconf \ + host-python-pyelftools + +ifeq ($(BR2_PACKAGE_LIBBSD),y) +DPDK_DEPENDENCIES += libbsd +endif + +ifeq ($(BR2_PACKAGE_JANSSON),y) +DPDK_DEPENDENCIES += jansson +endif + +ifeq ($(BR2_PACKAGE_LIBPCAP),y) +DPDK_DEPENDENCIES += libpcap +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +DPDK_DEPENDENCIES += zlib +endif + +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y) +DPDK_DEPENDENCIES += libexecinfo +endif + +ifeq ($(BR2_PACKAGE_NUMACTL),y) +DPDK_DEPENDENCIES += numactl +endif + +ifeq ($(BR2_PACKAGE_LIBARCHIVE),y) +DPDK_DEPENDENCIES += libarchive +endif + +ifeq ($(BR2_PACKAGE_LIBBPF),y) +DPDK_DEPENDENCIES += libbpf +endif + +ifeq ($(BR2_PACKAGE_RDMA_CORE),y) +DPDK_DEPENDENCIES += rdma-core +endif + +# DPDK's meson shall need to be clean'd, hack here along the enclosed patch +DPDK_CONF_OPTS += -Dcpu_instruction_set=$(BR2_GCC_TARGET_ARCH) +# Keep the following, even if not mandatory, until the removal of the patch +DPDK_MESON_EXTRA_PROPERTIES += platform='generic' + +$(eval $(meson-package)) -- 2.46.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [Buildroot] [PATCH v4 1/1] package/dpdk: add 24.07 2024-08-28 10:21 ` [Buildroot] [PATCH v4 1/1] package/dpdk: add 24.07 Vincent Jardin @ 2024-09-06 22:33 ` Julien Olivain 2024-09-07 6:44 ` Vincent Jardin 2024-09-09 12:58 ` [Buildroot] [PATCH v5 0/1] add DPDK libraries Vincent Jardin 1 sibling, 1 reply; 31+ messages in thread From: Julien Olivain @ 2024-09-06 22:33 UTC (permalink / raw) To: Vincent Jardin; +Cc: Thomas Petazzoni, buildroot Hi Vincent, Thanks for the updated patch. I tested this patch on branch master at commit 3daa037. All of the test-pkg toolchains are failing. In order to have your patch merged, we should only have "OK" or "SKIPPED". You can check with the command: utils/test-pkg -a -p dpdk I have the output: arm-aarch64 [ 1/41]: FAILED bootlin-aarch64-glibc [ 2/41]: FAILED bootlin-arcle-hs38-uclibc [ 3/41]: SKIPPED bootlin-armv5-uclibc [ 4/41]: SKIPPED bootlin-armv7-glibc [ 5/41]: FAILED bootlin-armv7m-uclibc [ 6/41]: SKIPPED bootlin-armv7-musl [ 7/41]: SKIPPED bootlin-m68k-5208-uclibc [ 8/41]: SKIPPED bootlin-m68k-68040-uclibc [ 9/41]: SKIPPED bootlin-microblazeel-uclibc [10/41]: SKIPPED bootlin-mipsel32r6-glibc [11/41]: FAILED bootlin-mipsel-uclibc [12/41]: SKIPPED bootlin-nios2-glibc [13/41]: FAILED bootlin-openrisc-uclibc [14/41]: SKIPPED bootlin-powerpc64le-power8-glibc [15/41]: FAILED bootlin-powerpc-e500mc-uclibc [16/41]: SKIPPED bootlin-riscv32-glibc [17/41]: FAILED bootlin-riscv64-glibc [18/41]: FAILED bootlin-riscv64-musl [19/41]: SKIPPED bootlin-s390x-z13-glibc [20/41]: FAILED bootlin-sh4-uclibc [21/41]: SKIPPED bootlin-sparc64-glibc [22/41]: FAILED bootlin-sparc-uclibc [23/41]: SKIPPED bootlin-x86-64-glibc [24/41]: FAILED bootlin-x86-64-musl [25/41]: SKIPPED bootlin-x86-64-uclibc [26/41]: SKIPPED bootlin-x86-i686-musl [27/41]: SKIPPED bootlin-xtensa-uclibc [28/41]: SKIPPED br-arm-basic [29/41]: SKIPPED br-arm-full-nothread [30/41]: SKIPPED br-arm-full-static [31/41]: SKIPPED br-i386-pentium4-full [32/41]: SKIPPED br-mips64-n64-full [33/41]: SKIPPED br-mips64r6-el-hf-glibc [34/41]: FAILED br-powerpc-603e-basic-cpp [35/41]: SKIPPED br-powerpc64-power7-glibc [36/41]: FAILED linaro-aarch64-be [37/41]: SKIPPED linaro-aarch64 [38/41]: SKIPPED linaro-arm [39/41]: SKIPPED sourcery-mips64 [40/41]: SKIPPED sourcery-mips [41/41]: SKIPPED 41 builds, 28 skipped, 12 build failed, 1 legal-info failed, 0 show-info failed Then, you can check build failure logs, for example with: tail ~/br-test-pkg/arm-aarch64/logfile In most cases, meson configuration fails with message: Compiler for C supports arguments -mcpu=: NO /build/dpdk-24.07/config/meson.build:186:8: ERROR: Problem encountered: Compiler does not support "" arch flag. The dpdk meson does not detect the architecture correctly. Maybe this is introduced by the package patch... Few other failures are due to incorrect _LICENSE_FILES, see below. On my side, I was able to have a working configuration, for x86_64. I think in the current state of the patch, it's probably the only architecture working. I can have a working dpdk build with the commands: cat <<EOF >.config BR2_x86_64=y BR2_x86_nehalem=y BR2_TOOLCHAIN_EXTERNAL=y BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86_64/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="qemu_x86_64_defconfig" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.49" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86_64/linux.config" BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y BR2_PACKAGE_LIBBPF=y BR2_PACKAGE_RDMA_CORE=y BR2_PACKAGE_OPENSSL=y BR2_PACKAGE_DTC=y BR2_PACKAGE_JANSSON=y BR2_PACKAGE_DPDK=y BR2_PACKAGE_LIBPCAP=y BR2_PACKAGE_NUMACTL=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_SIZE="300M" # BR2_TARGET_ROOTFS_TAR is not set EOF make olddefconfig make qemu-system-x86_64 \ -M q35 -cpu Nehalem -smp 4 -m 2G \ -kernel output/images/bzImage \ -drive file=output/images/rootfs.ext2,if=virtio,format=raw \ -append "rootwait root=/dev/vda console=tty1 console=ttyS0" \ -net nic,model=virtio -net user \ -nographic # login, then inside qemu: dpdk-test --no-huge crc_autotest threads_autotest lcores_autotest I'll use such a scenario to write a runtime test later... On 28/08/2024 12:21, Vincent Jardin wrote: > This commit adds the integration of the Data Plane Development Kit > (DPDK), > a suite of libraries and drivers designed for high-performance packet > processing from the user space. DPDK enables direct packet steering > from > some network interfaces to the userland, bypassing the Linux kernel > network stack. This is achieved through userland PCI drivers or by > leveraging some userland memory mappings of the network devices. > > Originally inspired by RDMA (Remote Direct Memory Access) concepts, > DPDK > has been adapted to work with PCI devices that do not inherently > support > RDMA. This adaptation allows for low-latency, high-throughput data > processing by minimizing the overhead typically associated with > kernel-space network drivers. > > Importantly, this commit does not enforce the use of UIO or VFIO > kernel frameworks, as DPDK's architecture supports userland memory > mappings that do not require these technologies. By maintaining this > flexibility, DPDK can operate with a broader range of hardware and > software configurations, making it suitable for diverse Buildroot's > deployment scenarios. > > Yocto patch imported from: > > https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > > Only the little endian targets are properly supported by DPDK. Big > endian > was supported, mostly on Power8, but it has not been used for a while > and > IBM is not strongly pushing any tests. Should big endian be supported > again, DPDK community will be welcoming any contributions. > > Some nice to have for the Kernel, but not mandatory: > - CONFIG_VFIO_IOMMU_TYPE1=y > - CONFIG_VFIO_VIRQFD=y > - CONFIG_VFIO=y > - CONFIG_VFIO_NOIOMMU=y > - CONFIG_VFIO_PCI=y > - CONFIG_VFIO_PCI_MMAP=y > - CONFIG_HUGETLBFS=y > - CONFIG_HUGETLB_PAGE=y > - CONFIG_PROC_PAGE_MONITOR=y > > For x86 only, HPET and HPET_MMAP can be some nice to have too. > > Since they are some nice to have, but not mandatory ones, the following > Kernel config fixups are not used: > define DPDK_LINUX_CONFIG_FIXUPS > $(call KCONFIG_ENABLE_OPT, CONFIG_HUGETLBFS) > ... > endef > > Notes about license: > > DPDK was released with the BSD-3-Clause license. > > One network driver, the Google Virtual Ethernet (GVE) include files > under the MIT license. See [2] and [3]. > > DPDK had been including a Kernel Netdevice Interface (KNI) and an > IGB_UIO > kernel module under the GPL-2.0 license. Those modules were moved into > a > different repository [K]. Then, for instance, the KNI module was > removed > by [KNI]. This commit was first included in version v23.11. The IGB_UIO > kernel > module was removed by [UIO] since VFIO became capable of supporting all > the required usecases for the DPDK. The main remaining issues had been > the support of memory mapping within a VM or without the use of nested > virtualization but those were fixed by the latest VFIO's kernel > support. > We can notice that the PMD drivers that are using the ibverbs (RDMA) > APIs > are not sharing this need of UIO/VFIO. > > There are also 2 files in "lib/eal/windows" under other licenses > (namely BSD-2-Clause, ISC and MIT) but they are parts of the > Environment > Abstraction Library (EAL) for Microsoft Windows OS, it means they are > not used when compiling for the Linux targets of Buildroot. > > The list of DPDK license exceptions is maintained at [3]. > > [1] https://www.dpdk.org/ > [2] https://git.dpdk.org/dpdk/tree/doc/guides/nics/gve.rst?h=v24.07 > [3] https://git.dpdk.org/dpdk/tree/license/exceptions.txt?h=v24.07 > [KNI] > https://git.dpdk.org/dpdk/commit/?id=f78c100bc87119c6a94130a6689d773afdaa9d98 > [UIO] > https://git.dpdk.org/dpdk/commit/?id=56bb5841fd0608989101d933f091852a3126b4fe > [K] > https://git.dpdk.org/dpdk-kmods/commit/?id=d16f3b44987be181b6effee139558a084eaf9f8c > > Signed-off-by: Vincent Jardin <vjardin@free.fr> > Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> > Reviewed-by: Julien Olivain <ju.o@free.fr> > --- > DEVELOPERS | 3 + > package/Config.in | 1 + > ...-cpu_instruction_set-from-meson-opti.patch | 33 +++++++ > package/dpdk/Config.in | 34 ++++++++ > package/dpdk/dpdk.hash | 10 +++ > package/dpdk/dpdk.mk | 87 +++++++++++++++++++ > 6 files changed, 168 insertions(+) > create mode 100644 > package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > create mode 100644 package/dpdk/Config.in > create mode 100644 package/dpdk/dpdk.hash > create mode 100644 package/dpdk/dpdk.mk > > diff --git a/DEVELOPERS b/DEVELOPERS > index 426590d5c5..7c3d858e40 100644 > --- a/DEVELOPERS > +++ b/DEVELOPERS > @@ -3238,6 +3238,9 @@ F: package/rtl8822cs/ > N: Victor Huesca <victor.huesca@bootlin.com> > F: support/testing/tests/core/test_root_password.py > > +N: Vincent Jardin <vjardin@free.fr> > +F: package/dpdk/ > + > N: Vincent Prince <vincent.prince.fr@gmail.com> > F: package/nss-myhostname/ > F: package/utp_com/ > diff --git a/package/Config.in b/package/Config.in > index 211080345a..90e521330b 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -1988,6 +1988,7 @@ menu "Networking" > source "package/daq3/Config.in" > source "package/davici/Config.in" > source "package/dht/Config.in" > + source "package/dpdk/Config.in" > source "package/enet/Config.in" > source "package/filemq/Config.in" > source "package/fmlib/Config.in" > diff --git > a/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > new file mode 100644 > index 0000000000..8e99379fb6 > --- /dev/null > +++ > b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > @@ -0,0 +1,33 @@ > +From 121e5d019f0bb6dec0ace2b361611edd10fc8ff8 Mon Sep 17 00:00:00 2001 > +From: Lee Chee Yang <chee.yang.lee@intel.com> > +Date: Wed, 6 Dec 2023 16:58:10 +0800 > +Subject: [PATCH] config/meson: get cpu_instruction_set from meson > option > + > +Workaround error: > +| ../git/config/meson.build:178:8: ERROR: Problem encountered: > Compiler > +does not support "x86_64" arch flag. > + > +Upstream-Status: Inappropriate [ yocto specific to set > cpu_instruction_set ] > + > +Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> > +Upstream: > https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > +--- > + config/meson.build | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/config/meson.build b/config/meson.build > +index a9ccd56deb..f310c7adf6 100644 > +--- a/config/meson.build > ++++ b/config/meson.build > +@@ -105,7 +105,7 @@ platform = get_option('platform') > + > + # set the cpu_instruction_set and cflags for it > + if meson.is_cross_build() > +- cpu_instruction_set = host_machine.cpu() > ++ cpu_instruction_set = get_option('cpu_instruction_set') > + else > + cpu_instruction_set = get_option('cpu_instruction_set') > + machine = get_option('machine') > +-- > +2.37.3 > + > diff --git a/package/dpdk/Config.in b/package/dpdk/Config.in > new file mode 100644 > index 0000000000..82d9a0a798 > --- /dev/null > +++ b/package/dpdk/Config.in > @@ -0,0 +1,34 @@ > +config BR2_PACKAGE_DPDK_ARCH_SUPPORTS > + bool > + default y Here, the "default y" should be removed, otherwise, this _ARCH_SUPPORTS will not be effective (and will not filter out unsupported architectures). > + # DPDK can be used for the following little endian architecture > + default y if BR2_RISCV_64 > + default y if BR2_aarch64 > + default y if BR2_powerpc64le > + # DPDK requires SSE4.2 for x86_64 since v17.08 > + default y if BR2_x86_64 && BR2_X86_CPU_HAS_SSE42 > + > +config BR2_PACKAGE_DPDK > + bool "dpdk" > + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS > + depends on BR2_TOOLCHAIN_HAS_THREADS # DPDK design > + depends on BR2_USE_MMU # pthread() memory mappings > + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h > + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 > + depends on BR2_TOOLCHAIN_USES_GLIBC > + select BR2_PACKAGE_LIBEXECINFO if !BR2_TOOLCHAIN_USES_GLIBC > + help > + DPDK (Data Plane Development Kit) is a set of libraries > + and drivers for fast packet processing. > + > + http://dpdk.org/ > + > +comment "DPDK needs a toolchain w/ dynamic library, threads, wchar, > kernel headers >= 4.19" > + depends on BR2_USE_MMU # pthread() memory mappings > + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS > + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h > + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 > + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ > + !BR2_TOOLCHAIN_USES_GLIBC || \ > + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \ > + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 > diff --git a/package/dpdk/dpdk.hash b/package/dpdk/dpdk.hash > new file mode 100644 > index 0000000000..4e98d9dc25 > --- /dev/null > +++ b/package/dpdk/dpdk.hash > @@ -0,0 +1,10 @@ > +# Locally computed > +sha256 > 9944f7e5f268e7ac9b4193e2cd54ef6d98f6e1d7dddc967c77ae4f6616d6fbbd > dpdk-24.07.tar.xz > +sha256 > 1531b66affc3bae796d755e12850795e56e25ccedd685bf7d2644d8ddfadbad8 > license/bsd-2-clause.txt > +sha256 > 9acc4bc871a4742550158e3696dcb381953172ef808d04ca248184f9f6322712 > license/bsd-3-clause.txt > +sha256 > e19808bccd90c238fac06da2fc3683e094c64f7ba647e9d86f03a98cf5f2ce05 > license/exceptions.txt > +sha256 > 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 > license/gpl-2.0.txt > +sha256 > be8f198f2e1c9b30226e293255bbe6933ee6607a580ee5874185aa023bcc3c39 > license/isc.txt > +sha256 > 592987e8510228d546540b84a22444bde98e48d03078d3b2eefcd889bec5ce8c > license/lgpl-2.1.txt > +sha256 > 6c54c4d44faf3cba829b3d0c21c6955953e758767018fd7244f809b01d4f4845 > license/mit.txt > +sha256 > cae178052c96959741acb7f00634a09a8294e6cafb5ad53e158d63e3510875ab > license/README > diff --git a/package/dpdk/dpdk.mk b/package/dpdk/dpdk.mk > new file mode 100644 > index 0000000000..4be51ee763 > --- /dev/null > +++ b/package/dpdk/dpdk.mk > @@ -0,0 +1,87 @@ > +################################################################################ > +# > +# dpdk > +# > +################################################################################ > + > +DPDK_VERSION = 24.07 > +DPDK_SOURCE = dpdk-$(DPDK_VERSION).tar.xz > +DPDK_SITE = https://fast.dpdk.org/rel > +DPDK_LICENSE = \ > + BSD-3-Clause, \ > + BSD-2-Clause,\ ^- there is a missing space here > + GPL-2.0, \ > + ISC, \ > + LGPL-2.1, \ > + MIT The identification of components (or group of components) should be added here, rather than in _LICENSE_FILES. > + > +# Only the Windows target has the 2 following licenses: > +# - license/bsd-2-clause.txt > +# - license/isc.txt > +# which is related to a Windows getopt.[ch] compatibility layer. > +# Since Buildroot is not used for Windows target, it is not listed > +# here. > +# > +# All the userland files of DPDK have dual licences BSD or GPL/LGPL > +# Since the Linux kernel modules had been removed from the DPDK, there > +# is no GPL only code into the DPDK anymore. > +# The usage of DPDK with Buildroot is for userland only, it means > +# that for the dual licenced files, BSD clause is used but not the > +# following ones: > +# - license/gpl-2.0.txt > +# - license/lgpl-2.1.txt > +# See the DPDK's license/README for more details. > +# > +# The legacy and historical license of the DPDK is BSD-3-clause. > +DPDK_LICENSE_FILES = \ > + license/README \ > + license/bsd-3-clause.txt (legacy) \ > + license/exceptions.txt \ > + license/mit.txt (drivers/net/gve/base) This variable should only contains only valid file paths (and no annotation). This generates error when collecting legal info. You can see that by running the command: make legal-info It will show the error: ... >>> dpdk 24.07 Collecting legal info license/README: OK (sha256: cae178052c96959741acb7f00634a09a8294e6cafb5ad53e158d63e3510875ab) license/bsd-3-clause.txt: OK (sha256: 9acc4bc871a4742550158e3696dcb381953172ef808d04ca248184f9f6322712) /bin/sh: -c: line 1: syntax error near unexpected token '(' > + > +DPDK_DEPENDENCIES = \ > + host-pkgconf \ > + host-python-pyelftools > + > +ifeq ($(BR2_PACKAGE_LIBBSD),y) > +DPDK_DEPENDENCIES += libbsd > +endif > + > +ifeq ($(BR2_PACKAGE_JANSSON),y) > +DPDK_DEPENDENCIES += jansson > +endif > + > +ifeq ($(BR2_PACKAGE_LIBPCAP),y) > +DPDK_DEPENDENCIES += libpcap > +endif > + > +ifeq ($(BR2_PACKAGE_ZLIB),y) > +DPDK_DEPENDENCIES += zlib > +endif > + > +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y) > +DPDK_DEPENDENCIES += libexecinfo > +endif > + > +ifeq ($(BR2_PACKAGE_NUMACTL),y) > +DPDK_DEPENDENCIES += numactl > +endif > + > +ifeq ($(BR2_PACKAGE_LIBARCHIVE),y) > +DPDK_DEPENDENCIES += libarchive > +endif > + > +ifeq ($(BR2_PACKAGE_LIBBPF),y) > +DPDK_DEPENDENCIES += libbpf > +endif > + > +ifeq ($(BR2_PACKAGE_RDMA_CORE),y) > +DPDK_DEPENDENCIES += rdma-core > +endif > + > +# DPDK's meson shall need to be clean'd, hack here along the enclosed > patch > +DPDK_CONF_OPTS += -Dcpu_instruction_set=$(BR2_GCC_TARGET_ARCH) Maybe this is here the correct "cpu_instruction_set" needs to be mapped to the correct value: maybe DPDK does not exactly accept what Buildroot is providing in BR2_GCC_TARGET_ARCH / BR2_GCC_TARGET_CPU. I think this is the last tricky point to resolve before merging this patch. I'll try to debug a bit on my side (I would like to have at least the architectures listed in the _ARCH_SUPPORTS). > +# Keep the following, even if not mandatory, until the removal of the > patch > +DPDK_MESON_EXTRA_PROPERTIES += platform='generic' > + > +$(eval $(meson-package)) > -- > 2.46.0 > > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot Best regards, Julien. _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [Buildroot] [PATCH v4 1/1] package/dpdk: add 24.07 2024-09-06 22:33 ` Julien Olivain @ 2024-09-07 6:44 ` Vincent Jardin 0 siblings, 0 replies; 31+ messages in thread From: Vincent Jardin @ 2024-09-07 6:44 UTC (permalink / raw) To: Julien Olivain; +Cc: Thomas Petazzoni, buildroot [-- Attachment #1.1: Type: text/plain, Size: 281 bytes --] Hi Julien, Thank you for the checks and helpful hints. I'll review and adjust the supported target CPUs accordingly. For now, let's stick with x86_64 until I can gather a proper build on other GCC target CPUs. I'll make sure to follow your guidelines. Best regards, Vincent [-- Attachment #1.2: Type: text/html, Size: 602 bytes --] [-- Attachment #2: Type: text/plain, Size: 150 bytes --] _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* [Buildroot] [PATCH v5 0/1] add DPDK libraries 2024-08-28 10:21 ` [Buildroot] [PATCH v4 1/1] package/dpdk: add 24.07 Vincent Jardin 2024-09-06 22:33 ` Julien Olivain @ 2024-09-09 12:58 ` Vincent Jardin 2024-09-09 12:58 ` [Buildroot] [PATCH v5 1/1] package/dpdk: add 24.07 Vincent Jardin 1 sibling, 1 reply; 31+ messages in thread From: Vincent Jardin @ 2024-09-09 12:58 UTC (permalink / raw) To: buildroot; +Cc: Vincent Jardin, Julien Olivain, Thomas Petazzoni v4 -> v5 changes: - fix test-pkg dpdk - fix make legal-info - add builds for DPDK tests and examples - support only aarch64/ARM64 and x86_64 - notes: logs of checks at https://github.com/vjardin/br_dpdk/actions/runs/10767364662/job/29854551507 - thans to Julien Olivain for many reviews and contributions v3 -> v4 changes: - proof readings (dpdk/DPDK, git.dpdk.org instead of github) - gcc 4.9 needed v2 -> v3 changes: - include the comments from Julien Olivain - refine the licenses - support little endian targets only - many build dependencies if the packages are selected v1 -> v2 changes: - include the comments from Thomas - add a meson patch for the DPDK that I forgot to include This patch has been aligned with Yocto so we can share the same feedbacks. I'll upstream it on DPDK too. Vincent Jardin (1): package/dpdk: add 24.07 DEVELOPERS | 3 + package/Config.in | 1 + ...-cpu_instruction_set-from-meson-opti.patch | 33 +++++++ package/dpdk/0010-Fix-aarch64-build.patch | 37 +++++++ package/dpdk/Config.in | 45 +++++++++ package/dpdk/dpdk.hash | 10 ++ package/dpdk/dpdk.mk | 99 +++++++++++++++++++ 7 files changed, 228 insertions(+) create mode 100644 package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch create mode 100644 package/dpdk/0010-Fix-aarch64-build.patch create mode 100644 package/dpdk/Config.in create mode 100644 package/dpdk/dpdk.hash create mode 100644 package/dpdk/dpdk.mk -- 2.46.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* [Buildroot] [PATCH v5 1/1] package/dpdk: add 24.07 2024-09-09 12:58 ` [Buildroot] [PATCH v5 0/1] add DPDK libraries Vincent Jardin @ 2024-09-09 12:58 ` Vincent Jardin 2024-09-14 19:56 ` Julien Olivain 0 siblings, 1 reply; 31+ messages in thread From: Vincent Jardin @ 2024-09-09 12:58 UTC (permalink / raw) To: buildroot; +Cc: Vincent Jardin, Julien Olivain, Thomas Petazzoni This commit adds the integration of the Data Plane Development Kit (DPDK), a suite of libraries and drivers designed for high-performance packet processing from the user space. DPDK enables direct packet steering from some network interfaces to the userland, bypassing the Linux kernel network stack. This is achieved through userland PCI drivers or by leveraging some userland memory mappings of the network devices. Originally inspired by RDMA (Remote Direct Memory Access) concepts, DPDK has been adapted to work with PCI devices that do not inherently support RDMA. This adaptation allows for low-latency, high-throughput data processing by minimizing the overhead typically associated with kernel-space network drivers. Importantly, this commit does not enforce the use of UIO or VFIO kernel frameworks, as DPDK's architecture supports userland memory mappings that do not require these technologies. By maintaining this flexibility, DPDK can operate with a broader range of hardware and software configurations, making it suitable for diverse Buildroot's deployment scenarios. Yocto patch imported from: https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch The patch that fixes DPDK's meson for building properly for aarch64 was suggested by Julien. It clearly points that DPDK's meson shall need a proper set of fixes in order to properly cross-compile for aarch64, riscv64 or ppc64. So for the time being, only the x86_64 and aarch64 targets are enabled. Other targets will be enabled later once DPDK upstream will be properly fixed. Only the little endian targets are properly supported by DPDK. Big endian was supported, mostly on Power8, but it has not been used for a while and IBM is not strongly pushing any tests. Should big endian be supported again, DPDK community will be welcoming any contributions. Some nice to have for the Kernel, but not mandatory: - CONFIG_VFIO_IOMMU_TYPE1=y - CONFIG_VFIO_VIRQFD=y - CONFIG_VFIO=y - CONFIG_VFIO_NOIOMMU=y - CONFIG_VFIO_PCI=y - CONFIG_VFIO_PCI_MMAP=y - CONFIG_HUGETLBFS=y - CONFIG_HUGETLB_PAGE=y - CONFIG_PROC_PAGE_MONITOR=y For x86 only, HPET and HPET_MMAP can be some nice to have too. Since they are some nice to have, but not mandatory ones, the following Kernel config fixups are not used: define DPDK_LINUX_CONFIG_FIXUPS $(call KCONFIG_ENABLE_OPT, CONFIG_HUGETLBFS) ... endef Notes about license: DPDK was released with the BSD-3-Clause license. One network driver, the Google Virtual Ethernet (GVE) include files under the MIT license. See [2] and [3]. DPDK had been including a Kernel Netdevice Interface (KNI) and an IGB_UIO kernel module under the GPL-2.0 license. Those modules were moved into a different repository [K]. Then, for instance, the KNI module was removed by [KNI]. This commit was first included in version v23.11. The IGB_UIO kernel module was removed by [UIO] since VFIO became capable of supporting all the required usecases for the DPDK. The main remaining issues had been the support of memory mapping within a VM or without the use of nested virtualization but those were fixed by the latest VFIO's kernel support. We can notice that the PMD drivers that are using the ibverbs (RDMA) APIs are not sharing this need of UIO/VFIO. There are also 2 files in "lib/eal/windows" under other licenses (namely BSD-2-Clause, ISC and MIT) but they are parts of the Environment Abstraction Library (EAL) for Microsoft Windows OS, it means they are not used when compiling for the Linux targets of Buildroot. The list of DPDK license exceptions is maintained at [3]. Add configuration options to enable DPDK examples and tests. [1] https://www.dpdk.org/ [2] https://git.dpdk.org/dpdk/tree/doc/guides/nics/gve.rst?h=v24.07 [3] https://git.dpdk.org/dpdk/tree/license/exceptions.txt?h=v24.07 [KNI] https://git.dpdk.org/dpdk/commit/?id=f78c100bc87119c6a94130a6689d773afdaa9d98 [UIO] https://git.dpdk.org/dpdk/commit/?id=56bb5841fd0608989101d933f091852a3126b4fe [K] https://git.dpdk.org/dpdk-kmods/commit/?id=d16f3b44987be181b6effee139558a084eaf9f8c Signed-off-by: Vincent Jardin <vjardin@free.fr> Suggested-by: Julien Olivain <ju.o@free.fr> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Reviewed-by: Julien Olivain <ju.o@free.fr> --- DEVELOPERS | 3 + package/Config.in | 1 + ...-cpu_instruction_set-from-meson-opti.patch | 33 +++++++ package/dpdk/0010-Fix-aarch64-build.patch | 37 +++++++ package/dpdk/Config.in | 45 +++++++++ package/dpdk/dpdk.hash | 10 ++ package/dpdk/dpdk.mk | 99 +++++++++++++++++++ 7 files changed, 228 insertions(+) create mode 100644 package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch create mode 100644 package/dpdk/0010-Fix-aarch64-build.patch create mode 100644 package/dpdk/Config.in create mode 100644 package/dpdk/dpdk.hash create mode 100644 package/dpdk/dpdk.mk diff --git a/DEVELOPERS b/DEVELOPERS index 426590d5c5..7c3d858e40 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -3238,6 +3238,9 @@ F: package/rtl8822cs/ N: Victor Huesca <victor.huesca@bootlin.com> F: support/testing/tests/core/test_root_password.py +N: Vincent Jardin <vjardin@free.fr> +F: package/dpdk/ + N: Vincent Prince <vincent.prince.fr@gmail.com> F: package/nss-myhostname/ F: package/utp_com/ diff --git a/package/Config.in b/package/Config.in index 211080345a..90e521330b 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1988,6 +1988,7 @@ menu "Networking" source "package/daq3/Config.in" source "package/davici/Config.in" source "package/dht/Config.in" + source "package/dpdk/Config.in" source "package/enet/Config.in" source "package/filemq/Config.in" source "package/fmlib/Config.in" diff --git a/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch new file mode 100644 index 0000000000..8e99379fb6 --- /dev/null +++ b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch @@ -0,0 +1,33 @@ +From 121e5d019f0bb6dec0ace2b361611edd10fc8ff8 Mon Sep 17 00:00:00 2001 +From: Lee Chee Yang <chee.yang.lee@intel.com> +Date: Wed, 6 Dec 2023 16:58:10 +0800 +Subject: [PATCH] config/meson: get cpu_instruction_set from meson option + +Workaround error: +| ../git/config/meson.build:178:8: ERROR: Problem encountered: Compiler +does not support "x86_64" arch flag. + +Upstream-Status: Inappropriate [ yocto specific to set cpu_instruction_set ] + +Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> +Upstream: https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch +--- + config/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/meson.build b/config/meson.build +index a9ccd56deb..f310c7adf6 100644 +--- a/config/meson.build ++++ b/config/meson.build +@@ -105,7 +105,7 @@ platform = get_option('platform') + + # set the cpu_instruction_set and cflags for it + if meson.is_cross_build() +- cpu_instruction_set = host_machine.cpu() ++ cpu_instruction_set = get_option('cpu_instruction_set') + else + cpu_instruction_set = get_option('cpu_instruction_set') + machine = get_option('machine') +-- +2.37.3 + diff --git a/package/dpdk/0010-Fix-aarch64-build.patch b/package/dpdk/0010-Fix-aarch64-build.patch new file mode 100644 index 0000000000..64f44b2b50 --- /dev/null +++ b/package/dpdk/0010-Fix-aarch64-build.patch @@ -0,0 +1,37 @@ +From c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb Mon Sep 17 00:00:00 2001 +From: Julien Olivain <ju.o@free.fr> +Date: Sun, 8 Sep 2024 13:20:14 +0200 +Subject: [PATCH] Fix aarch64 build + +The condition on which DPDK meson skip the -march detection for Aarch64 +seems incorrect or incomplete. This patch changes the condition in order +to better match the comment (that the options are decided in +config/arm/meson.build). It actually test for the architecture name. + +Signed-off-by: Julien Olivain <ju.o@free.fr> +Upstream: https://github.com/DPDK/dpdk/commit/c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb +--- + config/meson.build | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/config/meson.build b/config/meson.build +index 8c8b019c25..ea48e55ce3 100644 +--- a/config/meson.build ++++ b/config/meson.build +@@ -176,10 +176,10 @@ if not is_ms_compiler + else + machine_args += '-march=' + cpu_instruction_set + # arm manages generic/auto config in config/arm/meson.build +- if cpu_instruction_set != 'generic' and cpu_instruction_set != 'auto' +- compiler_arch_support = cc.has_argument('-march=' + cpu_instruction_set) +- else ++ if host_machine.cpu_family().startswith('aarch') + compiler_arch_support = true ++ else ++ compiler_arch_support = cc.has_argument('-march=' + cpu_instruction_set) + endif + endif + if not compiler_arch_support +-- +2.46.0 + diff --git a/package/dpdk/Config.in b/package/dpdk/Config.in new file mode 100644 index 0000000000..2fe129c47f --- /dev/null +++ b/package/dpdk/Config.in @@ -0,0 +1,45 @@ +config BR2_PACKAGE_DPDK_ARCH_SUPPORTS + bool + # DPDK can be used for the following little endian architecture + default y if BR2_aarch64 + # DPDK requires SSE4.2 for x86_64 since v17.08 + default y if BR2_x86_64 && BR2_X86_CPU_HAS_SSE42 + +config BR2_PACKAGE_DPDK + bool "dpdk" + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS # DPDK design + depends on BR2_USE_MMU # pthread() memory mappings + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 + depends on BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_LIBEXECINFO if !BR2_TOOLCHAIN_USES_GLIBC + help + DPDK (Data Plane Development Kit) is a set of libraries + and drivers for fast packet processing. + + http://dpdk.org/ + +if BR2_PACKAGE_DPDK + +config BR2_PACKAGE_DPDK_EXAMPLES + bool "Install examples" + help + Install all DPDK examples. + +config BR2_PACKAGE_DPDK_TESTS + bool "Install tests" + help + Install all DPDK tests. + +endif + +comment "DPDK needs a toolchain w/ dynamic library, threads, wchar, kernel headers >= 4.19" + depends on BR2_USE_MMU # pthread() memory mappings + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_USES_GLIBC || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 diff --git a/package/dpdk/dpdk.hash b/package/dpdk/dpdk.hash new file mode 100644 index 0000000000..4e98d9dc25 --- /dev/null +++ b/package/dpdk/dpdk.hash @@ -0,0 +1,10 @@ +# Locally computed +sha256 9944f7e5f268e7ac9b4193e2cd54ef6d98f6e1d7dddc967c77ae4f6616d6fbbd dpdk-24.07.tar.xz +sha256 1531b66affc3bae796d755e12850795e56e25ccedd685bf7d2644d8ddfadbad8 license/bsd-2-clause.txt +sha256 9acc4bc871a4742550158e3696dcb381953172ef808d04ca248184f9f6322712 license/bsd-3-clause.txt +sha256 e19808bccd90c238fac06da2fc3683e094c64f7ba647e9d86f03a98cf5f2ce05 license/exceptions.txt +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 license/gpl-2.0.txt +sha256 be8f198f2e1c9b30226e293255bbe6933ee6607a580ee5874185aa023bcc3c39 license/isc.txt +sha256 592987e8510228d546540b84a22444bde98e48d03078d3b2eefcd889bec5ce8c license/lgpl-2.1.txt +sha256 6c54c4d44faf3cba829b3d0c21c6955953e758767018fd7244f809b01d4f4845 license/mit.txt +sha256 cae178052c96959741acb7f00634a09a8294e6cafb5ad53e158d63e3510875ab license/README diff --git a/package/dpdk/dpdk.mk b/package/dpdk/dpdk.mk new file mode 100644 index 0000000000..0c6be05e6e --- /dev/null +++ b/package/dpdk/dpdk.mk @@ -0,0 +1,99 @@ +################################################################################ +# +# dpdk +# +################################################################################ + +DPDK_VERSION = 24.07 +DPDK_SOURCE = dpdk-$(DPDK_VERSION).tar.xz +DPDK_SITE = https://fast.dpdk.org/rel +DPDK_LICENSE = \ + BSD-3-Clause (legacy), \ + BSD-2-Clause, \ + GPL-2.0, \ + ISC, \ + LGPL-2.1, \ + MIT (drivers/net/gve/base) + +# Only the Windows target has the 2 following licenses: +# - license/bsd-2-clause.txt +# - license/isc.txt +# which is related to a Windows getopt.[ch] compatibility layer. +# Since Buildroot is not used for Windows target, it is not listed +# here. +# +# All the userland files of DPDK have dual licences BSD or GPL/LGPL +# Since the Linux kernel modules had been removed from the DPDK, there +# is no GPL only code into the DPDK anymore. +# The usage of DPDK with Buildroot is for userland only, it means +# that for the dual licenced files, BSD clause is used but not the +# following ones: +# - license/gpl-2.0.txt +# - license/lgpl-2.1.txt +# See the DPDK's license/README for more details. +# +# The legacy and historical license of the DPDK is BSD-3-clause. +DPDK_LICENSE_FILES = \ + license/README \ + license/bsd-3-clause.txt \ + license/exceptions.txt \ + license/mit.txt + +DPDK_DEPENDENCIES = \ + host-pkgconf \ + host-python-pyelftools + +ifeq ($(BR2_PACKAGE_DPDK_EXAMPLES),y) +DPDK_CONF_OPTS += -Dexamples=all +else +DPDK_CONF_OPTS += -Dexamples= +endif + +ifeq ($(BR2_PACKAGE_DPDK_TESTS),y) +DPDK_CONF_OPTS += -Dtests=true +else +DPDK_CONF_OPTS += -Dtests=false +endif + +ifeq ($(BR2_PACKAGE_LIBBSD),y) +DPDK_DEPENDENCIES += libbsd +endif + +ifeq ($(BR2_PACKAGE_JANSSON),y) +DPDK_DEPENDENCIES += jansson +endif + +ifeq ($(BR2_PACKAGE_LIBPCAP),y) +DPDK_DEPENDENCIES += libpcap +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +DPDK_DEPENDENCIES += zlib +endif + +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y) +DPDK_DEPENDENCIES += libexecinfo +endif + +ifeq ($(BR2_PACKAGE_NUMACTL),y) +DPDK_DEPENDENCIES += numactl +endif + +ifeq ($(BR2_PACKAGE_LIBARCHIVE),y) +DPDK_DEPENDENCIES += libarchive +endif + +ifeq ($(BR2_PACKAGE_LIBBPF),y) +DPDK_DEPENDENCIES += libbpf +endif + +ifeq ($(BR2_PACKAGE_RDMA_CORE),y) +DPDK_DEPENDENCIES += rdma-core +endif + +# DPDK's meson shall need to be clean'd, hack here along the enclosed patch +DPDK_CONF_OPTS += -Dcpu_instruction_set=$(BR2_GCC_TARGET_ARCH) +# Keep the following, even if not mandatory, until the removal of the patch +DPDK_MESON_EXTRA_PROPERTIES += platform='generic' + +$(eval $(meson-package)) -- 2.46.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [Buildroot] [PATCH v5 1/1] package/dpdk: add 24.07 2024-09-09 12:58 ` [Buildroot] [PATCH v5 1/1] package/dpdk: add 24.07 Vincent Jardin @ 2024-09-14 19:56 ` Julien Olivain 2024-09-15 14:30 ` [Buildroot] [PATCH v6 0/1] add DPDK libraries Vincent Jardin 0 siblings, 1 reply; 31+ messages in thread From: Julien Olivain @ 2024-09-14 19:56 UTC (permalink / raw) To: Vincent Jardin; +Cc: Thomas Petazzoni, buildroot Hi Vincent, Thanks for the updated patch. I confirm this patch successfully pass the "utils/test-pkg -a -p dpdk" command (no build failures). I have also one last comment, see below. On 09/09/2024 14:58, Vincent Jardin wrote: > This commit adds the integration of the Data Plane Development Kit > (DPDK), > a suite of libraries and drivers designed for high-performance packet > processing from the user space. DPDK enables direct packet steering > from > some network interfaces to the userland, bypassing the Linux kernel > network stack. This is achieved through userland PCI drivers or by > leveraging some userland memory mappings of the network devices. > > Originally inspired by RDMA (Remote Direct Memory Access) concepts, > DPDK > has been adapted to work with PCI devices that do not inherently > support > RDMA. This adaptation allows for low-latency, high-throughput data > processing by minimizing the overhead typically associated with > kernel-space network drivers. > > Importantly, this commit does not enforce the use of UIO or VFIO > kernel frameworks, as DPDK's architecture supports userland memory > mappings that do not require these technologies. By maintaining this > flexibility, DPDK can operate with a broader range of hardware and > software configurations, making it suitable for diverse Buildroot's > deployment scenarios. > > Yocto patch imported from: > > https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > > The patch that fixes DPDK's meson for building properly for aarch64 was > suggested by Julien. It clearly points that DPDK's meson shall need a > proper set of fixes in order to properly cross-compile for aarch64, > riscv64 or ppc64. So for the time being, only the x86_64 and aarch64 > targets are enabled. Other targets will be enabled later once DPDK > upstream will be properly fixed. > > Only the little endian targets are properly supported by DPDK. Big > endian > was supported, mostly on Power8, but it has not been used for a while > and > IBM is not strongly pushing any tests. Should big endian be supported > again, DPDK community will be welcoming any contributions. > > Some nice to have for the Kernel, but not mandatory: > - CONFIG_VFIO_IOMMU_TYPE1=y > - CONFIG_VFIO_VIRQFD=y > - CONFIG_VFIO=y > - CONFIG_VFIO_NOIOMMU=y > - CONFIG_VFIO_PCI=y > - CONFIG_VFIO_PCI_MMAP=y > - CONFIG_HUGETLBFS=y > - CONFIG_HUGETLB_PAGE=y > - CONFIG_PROC_PAGE_MONITOR=y > > For x86 only, HPET and HPET_MMAP can be some nice to have too. > > Since they are some nice to have, but not mandatory ones, the following > Kernel config fixups are not used: > define DPDK_LINUX_CONFIG_FIXUPS > $(call KCONFIG_ENABLE_OPT, CONFIG_HUGETLBFS) > ... > endef > > Notes about license: > > DPDK was released with the BSD-3-Clause license. > > One network driver, the Google Virtual Ethernet (GVE) include files > under the MIT license. See [2] and [3]. > > DPDK had been including a Kernel Netdevice Interface (KNI) and an > IGB_UIO > kernel module under the GPL-2.0 license. Those modules were moved into > a > different repository [K]. Then, for instance, the KNI module was > removed > by [KNI]. This commit was first included in version v23.11. The IGB_UIO > kernel > module was removed by [UIO] since VFIO became capable of supporting all > the required usecases for the DPDK. The main remaining issues had been > the support of memory mapping within a VM or without the use of nested > virtualization but those were fixed by the latest VFIO's kernel > support. > We can notice that the PMD drivers that are using the ibverbs (RDMA) > APIs > are not sharing this need of UIO/VFIO. > > There are also 2 files in "lib/eal/windows" under other licenses > (namely BSD-2-Clause, ISC and MIT) but they are parts of the > Environment > Abstraction Library (EAL) for Microsoft Windows OS, it means they are > not used when compiling for the Linux targets of Buildroot. > > The list of DPDK license exceptions is maintained at [3]. > > Add configuration options to enable DPDK examples and tests. > > [1] https://www.dpdk.org/ > [2] https://git.dpdk.org/dpdk/tree/doc/guides/nics/gve.rst?h=v24.07 > [3] https://git.dpdk.org/dpdk/tree/license/exceptions.txt?h=v24.07 > [KNI] > https://git.dpdk.org/dpdk/commit/?id=f78c100bc87119c6a94130a6689d773afdaa9d98 > [UIO] > https://git.dpdk.org/dpdk/commit/?id=56bb5841fd0608989101d933f091852a3126b4fe > [K] > https://git.dpdk.org/dpdk-kmods/commit/?id=d16f3b44987be181b6effee139558a084eaf9f8c > > Signed-off-by: Vincent Jardin <vjardin@free.fr> > Suggested-by: Julien Olivain <ju.o@free.fr> > Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> > Reviewed-by: Julien Olivain <ju.o@free.fr> > --- > DEVELOPERS | 3 + > package/Config.in | 1 + > ...-cpu_instruction_set-from-meson-opti.patch | 33 +++++++ > package/dpdk/0010-Fix-aarch64-build.patch | 37 +++++++ > package/dpdk/Config.in | 45 +++++++++ > package/dpdk/dpdk.hash | 10 ++ > package/dpdk/dpdk.mk | 99 +++++++++++++++++++ > 7 files changed, 228 insertions(+) > create mode 100644 > package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > create mode 100644 package/dpdk/0010-Fix-aarch64-build.patch > create mode 100644 package/dpdk/Config.in > create mode 100644 package/dpdk/dpdk.hash > create mode 100644 package/dpdk/dpdk.mk > > diff --git a/DEVELOPERS b/DEVELOPERS > index 426590d5c5..7c3d858e40 100644 > --- a/DEVELOPERS > +++ b/DEVELOPERS > @@ -3238,6 +3238,9 @@ F: package/rtl8822cs/ > N: Victor Huesca <victor.huesca@bootlin.com> > F: support/testing/tests/core/test_root_password.py > > +N: Vincent Jardin <vjardin@free.fr> > +F: package/dpdk/ > + > N: Vincent Prince <vincent.prince.fr@gmail.com> > F: package/nss-myhostname/ > F: package/utp_com/ > diff --git a/package/Config.in b/package/Config.in > index 211080345a..90e521330b 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -1988,6 +1988,7 @@ menu "Networking" > source "package/daq3/Config.in" > source "package/davici/Config.in" > source "package/dht/Config.in" > + source "package/dpdk/Config.in" > source "package/enet/Config.in" > source "package/filemq/Config.in" > source "package/fmlib/Config.in" > diff --git > a/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > new file mode 100644 > index 0000000000..8e99379fb6 > --- /dev/null > +++ > b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > @@ -0,0 +1,33 @@ > +From 121e5d019f0bb6dec0ace2b361611edd10fc8ff8 Mon Sep 17 00:00:00 2001 > +From: Lee Chee Yang <chee.yang.lee@intel.com> > +Date: Wed, 6 Dec 2023 16:58:10 +0800 > +Subject: [PATCH] config/meson: get cpu_instruction_set from meson > option > + > +Workaround error: > +| ../git/config/meson.build:178:8: ERROR: Problem encountered: > Compiler > +does not support "x86_64" arch flag. > + > +Upstream-Status: Inappropriate [ yocto specific to set > cpu_instruction_set ] > + > +Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> > +Upstream: > https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > +--- > + config/meson.build | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/config/meson.build b/config/meson.build > +index a9ccd56deb..f310c7adf6 100644 > +--- a/config/meson.build > ++++ b/config/meson.build > +@@ -105,7 +105,7 @@ platform = get_option('platform') > + > + # set the cpu_instruction_set and cflags for it > + if meson.is_cross_build() > +- cpu_instruction_set = host_machine.cpu() > ++ cpu_instruction_set = get_option('cpu_instruction_set') > + else > + cpu_instruction_set = get_option('cpu_instruction_set') > + machine = get_option('machine') > +-- > +2.37.3 > + > diff --git a/package/dpdk/0010-Fix-aarch64-build.patch > b/package/dpdk/0010-Fix-aarch64-build.patch > new file mode 100644 > index 0000000000..64f44b2b50 > --- /dev/null > +++ b/package/dpdk/0010-Fix-aarch64-build.patch > @@ -0,0 +1,37 @@ > +From c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb Mon Sep 17 00:00:00 2001 > +From: Julien Olivain <ju.o@free.fr> > +Date: Sun, 8 Sep 2024 13:20:14 +0200 > +Subject: [PATCH] Fix aarch64 build > + > +The condition on which DPDK meson skip the -march detection for > Aarch64 > +seems incorrect or incomplete. This patch changes the condition in > order > +to better match the comment (that the options are decided in > +config/arm/meson.build). It actually test for the architecture name. > + > +Signed-off-by: Julien Olivain <ju.o@free.fr> > +Upstream: > https://github.com/DPDK/dpdk/commit/c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb This URL incorrectly suggests this patch has been accepted upstream. It has not. It came from by personal fork, from: https://github.com/jolivain/dpdk/commit/c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb While this patch might need some discussion with DPDK maintainers to cover all situations, it can still be useful here in Buildroot, as it fixes the Aarch64 cross compilation. Then, to better reflect the situation, you could simply add a mention that we will propose this patch later. Something like: Upstream: to be proposed on https://patches.dpdk.org/project/dpdk/list/ Link: Taken from https://github.com/jolivain/dpdk/commit/c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb > +--- > + config/meson.build | 6 +++--- > + 1 file changed, 3 insertions(+), 3 deletions(-) > + > +diff --git a/config/meson.build b/config/meson.build > +index 8c8b019c25..ea48e55ce3 100644 > +--- a/config/meson.build > ++++ b/config/meson.build > +@@ -176,10 +176,10 @@ if not is_ms_compiler > + else > + machine_args += '-march=' + cpu_instruction_set > + # arm manages generic/auto config in config/arm/meson.build > +- if cpu_instruction_set != 'generic' and cpu_instruction_set > != 'auto' > +- compiler_arch_support = cc.has_argument('-march=' + > cpu_instruction_set) > +- else > ++ if host_machine.cpu_family().startswith('aarch') > + compiler_arch_support = true > ++ else > ++ compiler_arch_support = cc.has_argument('-march=' + > cpu_instruction_set) > + endif > + endif > + if not compiler_arch_support > +-- > +2.46.0 > + > diff --git a/package/dpdk/Config.in b/package/dpdk/Config.in > new file mode 100644 > index 0000000000..2fe129c47f > --- /dev/null > +++ b/package/dpdk/Config.in > @@ -0,0 +1,45 @@ > +config BR2_PACKAGE_DPDK_ARCH_SUPPORTS > + bool > + # DPDK can be used for the following little endian architecture > + default y if BR2_aarch64 > + # DPDK requires SSE4.2 for x86_64 since v17.08 > + default y if BR2_x86_64 && BR2_X86_CPU_HAS_SSE42 > + > +config BR2_PACKAGE_DPDK > + bool "dpdk" > + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS > + depends on BR2_TOOLCHAIN_HAS_THREADS # DPDK design > + depends on BR2_USE_MMU # pthread() memory mappings > + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h > + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 > + depends on BR2_TOOLCHAIN_USES_GLIBC > + select BR2_PACKAGE_LIBEXECINFO if !BR2_TOOLCHAIN_USES_GLIBC > + help > + DPDK (Data Plane Development Kit) is a set of libraries > + and drivers for fast packet processing. > + > + http://dpdk.org/ > + > +if BR2_PACKAGE_DPDK > + > +config BR2_PACKAGE_DPDK_EXAMPLES > + bool "Install examples" > + help > + Install all DPDK examples. > + > +config BR2_PACKAGE_DPDK_TESTS > + bool "Install tests" > + help > + Install all DPDK tests. > + > +endif > + > +comment "DPDK needs a toolchain w/ dynamic library, threads, wchar, > kernel headers >= 4.19" > + depends on BR2_USE_MMU # pthread() memory mappings > + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS > + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h > + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 > + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ > + !BR2_TOOLCHAIN_USES_GLIBC || \ > + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \ > + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 > diff --git a/package/dpdk/dpdk.hash b/package/dpdk/dpdk.hash > new file mode 100644 > index 0000000000..4e98d9dc25 > --- /dev/null > +++ b/package/dpdk/dpdk.hash > @@ -0,0 +1,10 @@ > +# Locally computed > +sha256 > 9944f7e5f268e7ac9b4193e2cd54ef6d98f6e1d7dddc967c77ae4f6616d6fbbd > dpdk-24.07.tar.xz > +sha256 > 1531b66affc3bae796d755e12850795e56e25ccedd685bf7d2644d8ddfadbad8 > license/bsd-2-clause.txt > +sha256 > 9acc4bc871a4742550158e3696dcb381953172ef808d04ca248184f9f6322712 > license/bsd-3-clause.txt > +sha256 > e19808bccd90c238fac06da2fc3683e094c64f7ba647e9d86f03a98cf5f2ce05 > license/exceptions.txt > +sha256 > 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 > license/gpl-2.0.txt > +sha256 > be8f198f2e1c9b30226e293255bbe6933ee6607a580ee5874185aa023bcc3c39 > license/isc.txt > +sha256 > 592987e8510228d546540b84a22444bde98e48d03078d3b2eefcd889bec5ce8c > license/lgpl-2.1.txt > +sha256 > 6c54c4d44faf3cba829b3d0c21c6955953e758767018fd7244f809b01d4f4845 > license/mit.txt > +sha256 > cae178052c96959741acb7f00634a09a8294e6cafb5ad53e158d63e3510875ab > license/README > diff --git a/package/dpdk/dpdk.mk b/package/dpdk/dpdk.mk > new file mode 100644 > index 0000000000..0c6be05e6e > --- /dev/null > +++ b/package/dpdk/dpdk.mk > @@ -0,0 +1,99 @@ > +################################################################################ > +# > +# dpdk > +# > +################################################################################ > + > +DPDK_VERSION = 24.07 > +DPDK_SOURCE = dpdk-$(DPDK_VERSION).tar.xz > +DPDK_SITE = https://fast.dpdk.org/rel > +DPDK_LICENSE = \ > + BSD-3-Clause (legacy), \ > + BSD-2-Clause, \ > + GPL-2.0, \ > + ISC, \ > + LGPL-2.1, \ > + MIT (drivers/net/gve/base) > + > +# Only the Windows target has the 2 following licenses: > +# - license/bsd-2-clause.txt > +# - license/isc.txt > +# which is related to a Windows getopt.[ch] compatibility layer. > +# Since Buildroot is not used for Windows target, it is not listed > +# here. > +# > +# All the userland files of DPDK have dual licences BSD or GPL/LGPL > +# Since the Linux kernel modules had been removed from the DPDK, there > +# is no GPL only code into the DPDK anymore. > +# The usage of DPDK with Buildroot is for userland only, it means > +# that for the dual licenced files, BSD clause is used but not the > +# following ones: > +# - license/gpl-2.0.txt > +# - license/lgpl-2.1.txt > +# See the DPDK's license/README for more details. > +# > +# The legacy and historical license of the DPDK is BSD-3-clause. > +DPDK_LICENSE_FILES = \ > + license/README \ > + license/bsd-3-clause.txt \ > + license/exceptions.txt \ > + license/mit.txt > + > +DPDK_DEPENDENCIES = \ > + host-pkgconf \ > + host-python-pyelftools > + > +ifeq ($(BR2_PACKAGE_DPDK_EXAMPLES),y) > +DPDK_CONF_OPTS += -Dexamples=all > +else > +DPDK_CONF_OPTS += -Dexamples= > +endif > + > +ifeq ($(BR2_PACKAGE_DPDK_TESTS),y) > +DPDK_CONF_OPTS += -Dtests=true > +else > +DPDK_CONF_OPTS += -Dtests=false > +endif > + > +ifeq ($(BR2_PACKAGE_LIBBSD),y) > +DPDK_DEPENDENCIES += libbsd > +endif > + > +ifeq ($(BR2_PACKAGE_JANSSON),y) > +DPDK_DEPENDENCIES += jansson > +endif > + > +ifeq ($(BR2_PACKAGE_LIBPCAP),y) > +DPDK_DEPENDENCIES += libpcap > +endif > + > +ifeq ($(BR2_PACKAGE_ZLIB),y) > +DPDK_DEPENDENCIES += zlib > +endif > + > +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y) > +DPDK_DEPENDENCIES += libexecinfo > +endif > + > +ifeq ($(BR2_PACKAGE_NUMACTL),y) > +DPDK_DEPENDENCIES += numactl > +endif > + > +ifeq ($(BR2_PACKAGE_LIBARCHIVE),y) > +DPDK_DEPENDENCIES += libarchive > +endif > + > +ifeq ($(BR2_PACKAGE_LIBBPF),y) > +DPDK_DEPENDENCIES += libbpf > +endif > + > +ifeq ($(BR2_PACKAGE_RDMA_CORE),y) > +DPDK_DEPENDENCIES += rdma-core > +endif > + > +# DPDK's meson shall need to be clean'd, hack here along the enclosed > patch > +DPDK_CONF_OPTS += -Dcpu_instruction_set=$(BR2_GCC_TARGET_ARCH) > +# Keep the following, even if not mandatory, until the removal of the > patch > +DPDK_MESON_EXTRA_PROPERTIES += platform='generic' > + > +$(eval $(meson-package)) > -- > 2.46.0 With that minor change, I would be OK for this patch to be merged as is. Best regards, Julien. _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* [Buildroot] [PATCH v6 0/1] add DPDK libraries 2024-09-14 19:56 ` Julien Olivain @ 2024-09-15 14:30 ` Vincent Jardin 2024-09-15 14:30 ` [Buildroot] [PATCH v6 1/1] package/dpdk: add 24.07 Vincent Jardin 0 siblings, 1 reply; 31+ messages in thread From: Vincent Jardin @ 2024-09-15 14:30 UTC (permalink / raw) To: buildroot; +Cc: Vincent Jardin, Julien Olivain, Thomas Petazzoni v5 -> v6 changes: - update comments on DPDK patch to compile aarch64 with Buildroot v4 -> v5 changes: - fix test-pkg dpdk - fix make legal-info - add builds for DPDK tests and examples - support only aarch64/ARM64 and x86_64 - notes: logs of checks at https://github.com/vjardin/br_dpdk/actions/runs/10767364662/job/29854551507 - thans to Julien Olivain for many reviews and contributions v3 -> v4 changes: - proof readings (dpdk/DPDK, git.dpdk.org instead of github) - gcc 4.9 needed v2 -> v3 changes: - include the comments from Julien Olivain - refine the licenses - support little endian targets only - many build dependencies if the packages are selected v1 -> v2 changes: - include the comments from Thomas - add a meson patch for the DPDK that I forgot to include This patch has been aligned with Yocto so we can share the same feedbacks. I'll upstream it on DPDK too. Vincent Jardin (1): package/dpdk: add 24.07 DEVELOPERS | 3 + package/Config.in | 1 + ...-cpu_instruction_set-from-meson-opti.patch | 33 +++++++ package/dpdk/0010-Fix-aarch64-build.patch | 42 ++++++++ package/dpdk/Config.in | 45 +++++++++ package/dpdk/dpdk.hash | 10 ++ package/dpdk/dpdk.mk | 99 +++++++++++++++++++ 7 files changed, 233 insertions(+) create mode 100644 package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch create mode 100644 package/dpdk/0010-Fix-aarch64-build.patch create mode 100644 package/dpdk/Config.in create mode 100644 package/dpdk/dpdk.hash create mode 100644 package/dpdk/dpdk.mk -- 2.46.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* [Buildroot] [PATCH v6 1/1] package/dpdk: add 24.07 2024-09-15 14:30 ` [Buildroot] [PATCH v6 0/1] add DPDK libraries Vincent Jardin @ 2024-09-15 14:30 ` Vincent Jardin 2024-09-15 17:51 ` Julien Olivain 2024-09-15 22:30 ` Yann E. MORIN 0 siblings, 2 replies; 31+ messages in thread From: Vincent Jardin @ 2024-09-15 14:30 UTC (permalink / raw) To: buildroot; +Cc: Vincent Jardin, Julien Olivain, Thomas Petazzoni This commit adds the integration of the Data Plane Development Kit (DPDK), a suite of libraries and drivers designed for high-performance packet processing from the user space. DPDK enables direct packet steering from some network interfaces to the userland, bypassing the Linux kernel network stack. This is achieved through userland PCI drivers or by leveraging some userland memory mappings of the network devices. Originally inspired by RDMA (Remote Direct Memory Access) concepts, DPDK has been adapted to work with PCI devices that do not inherently support RDMA. This adaptation allows for low-latency, high-throughput data processing by minimizing the overhead typically associated with kernel-space network drivers. Importantly, this commit does not enforce the use of UIO or VFIO kernel frameworks, as DPDK's architecture supports userland memory mappings that do not require these technologies. By maintaining this flexibility, DPDK can operate with a broader range of hardware and software configurations, making it suitable for diverse Buildroot's deployment scenarios. Yocto patch imported from: https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch The patch that fixes DPDK's meson for building properly for aarch64 was suggested by Julien. It clearly points that DPDK's meson shall need a proper set of fixes in order to properly cross-compile for aarch64, riscv64 or ppc64. So for the time being, only the x86_64 and aarch64 targets are enabled. Other targets will be enabled later once DPDK upstream will be properly fixed. Only the little endian targets are properly supported by DPDK. Big endian was supported, mostly on Power8, but it has not been used for a while and IBM is not strongly pushing any tests. Should big endian be supported again, DPDK community will be welcoming any contributions. Some nice to have for the Kernel, but not mandatory: - CONFIG_VFIO_IOMMU_TYPE1=y - CONFIG_VFIO_VIRQFD=y - CONFIG_VFIO=y - CONFIG_VFIO_NOIOMMU=y - CONFIG_VFIO_PCI=y - CONFIG_VFIO_PCI_MMAP=y - CONFIG_HUGETLBFS=y - CONFIG_HUGETLB_PAGE=y - CONFIG_PROC_PAGE_MONITOR=y For x86 only, HPET and HPET_MMAP can be some nice to have too. Since they are some nice to have, but not mandatory ones, the following Kernel config fixups are not used: define DPDK_LINUX_CONFIG_FIXUPS $(call KCONFIG_ENABLE_OPT, CONFIG_HUGETLBFS) ... endef Notes about license: DPDK was released with the BSD-3-Clause license. One network driver, the Google Virtual Ethernet (GVE) include files under the MIT license. See [2] and [3]. DPDK had been including a Kernel Netdevice Interface (KNI) and an IGB_UIO kernel module under the GPL-2.0 license. Those modules were moved into a different repository [K]. Then, for instance, the KNI module was removed by [KNI]. This commit was first included in version v23.11. The IGB_UIO kernel module was removed by [UIO] since VFIO became capable of supporting all the required usecases for the DPDK. The main remaining issues had been the support of memory mapping within a VM or without the use of nested virtualization but those were fixed by the latest VFIO's kernel support. We can notice that the PMD drivers that are using the ibverbs (RDMA) APIs are not sharing this need of UIO/VFIO. There are also 2 files in "lib/eal/windows" under other licenses (namely BSD-2-Clause, ISC and MIT) but they are parts of the Environment Abstraction Library (EAL) for Microsoft Windows OS, it means they are not used when compiling for the Linux targets of Buildroot. The list of DPDK license exceptions is maintained at [3]. Add configuration options to enable DPDK examples and tests. [1] https://www.dpdk.org/ [2] https://git.dpdk.org/dpdk/tree/doc/guides/nics/gve.rst?h=v24.07 [3] https://git.dpdk.org/dpdk/tree/license/exceptions.txt?h=v24.07 [KNI] https://git.dpdk.org/dpdk/commit/?id=f78c100bc87119c6a94130a6689d773afdaa9d98 [UIO] https://git.dpdk.org/dpdk/commit/?id=56bb5841fd0608989101d933f091852a3126b4fe [K] https://git.dpdk.org/dpdk-kmods/commit/?id=d16f3b44987be181b6effee139558a084eaf9f8c Signed-off-by: Vincent Jardin <vjardin@free.fr> Suggested-by: Julien Olivain <ju.o@free.fr> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Reviewed-by: Julien Olivain <ju.o@free.fr> --- DEVELOPERS | 3 + package/Config.in | 1 + ...-cpu_instruction_set-from-meson-opti.patch | 33 +++++++ package/dpdk/0010-Fix-aarch64-build.patch | 42 ++++++++ package/dpdk/Config.in | 45 +++++++++ package/dpdk/dpdk.hash | 10 ++ package/dpdk/dpdk.mk | 99 +++++++++++++++++++ 7 files changed, 233 insertions(+) create mode 100644 package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch create mode 100644 package/dpdk/0010-Fix-aarch64-build.patch create mode 100644 package/dpdk/Config.in create mode 100644 package/dpdk/dpdk.hash create mode 100644 package/dpdk/dpdk.mk diff --git a/DEVELOPERS b/DEVELOPERS index 426590d5c5..7c3d858e40 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -3238,6 +3238,9 @@ F: package/rtl8822cs/ N: Victor Huesca <victor.huesca@bootlin.com> F: support/testing/tests/core/test_root_password.py +N: Vincent Jardin <vjardin@free.fr> +F: package/dpdk/ + N: Vincent Prince <vincent.prince.fr@gmail.com> F: package/nss-myhostname/ F: package/utp_com/ diff --git a/package/Config.in b/package/Config.in index 211080345a..90e521330b 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1988,6 +1988,7 @@ menu "Networking" source "package/daq3/Config.in" source "package/davici/Config.in" source "package/dht/Config.in" + source "package/dpdk/Config.in" source "package/enet/Config.in" source "package/filemq/Config.in" source "package/fmlib/Config.in" diff --git a/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch new file mode 100644 index 0000000000..8e99379fb6 --- /dev/null +++ b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch @@ -0,0 +1,33 @@ +From 121e5d019f0bb6dec0ace2b361611edd10fc8ff8 Mon Sep 17 00:00:00 2001 +From: Lee Chee Yang <chee.yang.lee@intel.com> +Date: Wed, 6 Dec 2023 16:58:10 +0800 +Subject: [PATCH] config/meson: get cpu_instruction_set from meson option + +Workaround error: +| ../git/config/meson.build:178:8: ERROR: Problem encountered: Compiler +does not support "x86_64" arch flag. + +Upstream-Status: Inappropriate [ yocto specific to set cpu_instruction_set ] + +Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> +Upstream: https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch +--- + config/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/meson.build b/config/meson.build +index a9ccd56deb..f310c7adf6 100644 +--- a/config/meson.build ++++ b/config/meson.build +@@ -105,7 +105,7 @@ platform = get_option('platform') + + # set the cpu_instruction_set and cflags for it + if meson.is_cross_build() +- cpu_instruction_set = host_machine.cpu() ++ cpu_instruction_set = get_option('cpu_instruction_set') + else + cpu_instruction_set = get_option('cpu_instruction_set') + machine = get_option('machine') +-- +2.37.3 + diff --git a/package/dpdk/0010-Fix-aarch64-build.patch b/package/dpdk/0010-Fix-aarch64-build.patch new file mode 100644 index 0000000000..845ec9235b --- /dev/null +++ b/package/dpdk/0010-Fix-aarch64-build.patch @@ -0,0 +1,42 @@ +From c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb Mon Sep 17 00:00:00 2001 +From: Julien Olivain <ju.o@free.fr> +Date: Sun, 8 Sep 2024 13:20:14 +0200 +Subject: [PATCH] Fix aarch64 build + +The condition on which DPDK meson skip the -march detection for Aarch64 +seems incorrect or incomplete. This patch changes the condition in order +to better match the comment (that the options are decided in +config/arm/meson.build). It actually test for the architecture name. + +While this patch might need some discussion with DPDK maintainers to +cover all situations, it can still be useful here in Buildroot, as it +fixes the Aarch64 cross compilation. + +Signed-off-by: Julien Olivain <ju.o@free.fr> +Upstream: to be proposed https://patches.dpdk.org/project/dpdk/list/ +Links: cherry-picked from https://github.com/jolivain/dpdk/commit/c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb +--- + config/meson.build | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/config/meson.build b/config/meson.build +index 8c8b019c25..ea48e55ce3 100644 +--- a/config/meson.build ++++ b/config/meson.build +@@ -176,10 +176,10 @@ if not is_ms_compiler + else + machine_args += '-march=' + cpu_instruction_set + # arm manages generic/auto config in config/arm/meson.build +- if cpu_instruction_set != 'generic' and cpu_instruction_set != 'auto' +- compiler_arch_support = cc.has_argument('-march=' + cpu_instruction_set) +- else ++ if host_machine.cpu_family().startswith('aarch') + compiler_arch_support = true ++ else ++ compiler_arch_support = cc.has_argument('-march=' + cpu_instruction_set) + endif + endif + if not compiler_arch_support +-- +2.46.0 + diff --git a/package/dpdk/Config.in b/package/dpdk/Config.in new file mode 100644 index 0000000000..2fe129c47f --- /dev/null +++ b/package/dpdk/Config.in @@ -0,0 +1,45 @@ +config BR2_PACKAGE_DPDK_ARCH_SUPPORTS + bool + # DPDK can be used for the following little endian architecture + default y if BR2_aarch64 + # DPDK requires SSE4.2 for x86_64 since v17.08 + default y if BR2_x86_64 && BR2_X86_CPU_HAS_SSE42 + +config BR2_PACKAGE_DPDK + bool "dpdk" + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS # DPDK design + depends on BR2_USE_MMU # pthread() memory mappings + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 + depends on BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_LIBEXECINFO if !BR2_TOOLCHAIN_USES_GLIBC + help + DPDK (Data Plane Development Kit) is a set of libraries + and drivers for fast packet processing. + + http://dpdk.org/ + +if BR2_PACKAGE_DPDK + +config BR2_PACKAGE_DPDK_EXAMPLES + bool "Install examples" + help + Install all DPDK examples. + +config BR2_PACKAGE_DPDK_TESTS + bool "Install tests" + help + Install all DPDK tests. + +endif + +comment "DPDK needs a toolchain w/ dynamic library, threads, wchar, kernel headers >= 4.19" + depends on BR2_USE_MMU # pthread() memory mappings + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_USES_GLIBC || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 diff --git a/package/dpdk/dpdk.hash b/package/dpdk/dpdk.hash new file mode 100644 index 0000000000..4e98d9dc25 --- /dev/null +++ b/package/dpdk/dpdk.hash @@ -0,0 +1,10 @@ +# Locally computed +sha256 9944f7e5f268e7ac9b4193e2cd54ef6d98f6e1d7dddc967c77ae4f6616d6fbbd dpdk-24.07.tar.xz +sha256 1531b66affc3bae796d755e12850795e56e25ccedd685bf7d2644d8ddfadbad8 license/bsd-2-clause.txt +sha256 9acc4bc871a4742550158e3696dcb381953172ef808d04ca248184f9f6322712 license/bsd-3-clause.txt +sha256 e19808bccd90c238fac06da2fc3683e094c64f7ba647e9d86f03a98cf5f2ce05 license/exceptions.txt +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 license/gpl-2.0.txt +sha256 be8f198f2e1c9b30226e293255bbe6933ee6607a580ee5874185aa023bcc3c39 license/isc.txt +sha256 592987e8510228d546540b84a22444bde98e48d03078d3b2eefcd889bec5ce8c license/lgpl-2.1.txt +sha256 6c54c4d44faf3cba829b3d0c21c6955953e758767018fd7244f809b01d4f4845 license/mit.txt +sha256 cae178052c96959741acb7f00634a09a8294e6cafb5ad53e158d63e3510875ab license/README diff --git a/package/dpdk/dpdk.mk b/package/dpdk/dpdk.mk new file mode 100644 index 0000000000..0c6be05e6e --- /dev/null +++ b/package/dpdk/dpdk.mk @@ -0,0 +1,99 @@ +################################################################################ +# +# dpdk +# +################################################################################ + +DPDK_VERSION = 24.07 +DPDK_SOURCE = dpdk-$(DPDK_VERSION).tar.xz +DPDK_SITE = https://fast.dpdk.org/rel +DPDK_LICENSE = \ + BSD-3-Clause (legacy), \ + BSD-2-Clause, \ + GPL-2.0, \ + ISC, \ + LGPL-2.1, \ + MIT (drivers/net/gve/base) + +# Only the Windows target has the 2 following licenses: +# - license/bsd-2-clause.txt +# - license/isc.txt +# which is related to a Windows getopt.[ch] compatibility layer. +# Since Buildroot is not used for Windows target, it is not listed +# here. +# +# All the userland files of DPDK have dual licences BSD or GPL/LGPL +# Since the Linux kernel modules had been removed from the DPDK, there +# is no GPL only code into the DPDK anymore. +# The usage of DPDK with Buildroot is for userland only, it means +# that for the dual licenced files, BSD clause is used but not the +# following ones: +# - license/gpl-2.0.txt +# - license/lgpl-2.1.txt +# See the DPDK's license/README for more details. +# +# The legacy and historical license of the DPDK is BSD-3-clause. +DPDK_LICENSE_FILES = \ + license/README \ + license/bsd-3-clause.txt \ + license/exceptions.txt \ + license/mit.txt + +DPDK_DEPENDENCIES = \ + host-pkgconf \ + host-python-pyelftools + +ifeq ($(BR2_PACKAGE_DPDK_EXAMPLES),y) +DPDK_CONF_OPTS += -Dexamples=all +else +DPDK_CONF_OPTS += -Dexamples= +endif + +ifeq ($(BR2_PACKAGE_DPDK_TESTS),y) +DPDK_CONF_OPTS += -Dtests=true +else +DPDK_CONF_OPTS += -Dtests=false +endif + +ifeq ($(BR2_PACKAGE_LIBBSD),y) +DPDK_DEPENDENCIES += libbsd +endif + +ifeq ($(BR2_PACKAGE_JANSSON),y) +DPDK_DEPENDENCIES += jansson +endif + +ifeq ($(BR2_PACKAGE_LIBPCAP),y) +DPDK_DEPENDENCIES += libpcap +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +DPDK_DEPENDENCIES += zlib +endif + +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y) +DPDK_DEPENDENCIES += libexecinfo +endif + +ifeq ($(BR2_PACKAGE_NUMACTL),y) +DPDK_DEPENDENCIES += numactl +endif + +ifeq ($(BR2_PACKAGE_LIBARCHIVE),y) +DPDK_DEPENDENCIES += libarchive +endif + +ifeq ($(BR2_PACKAGE_LIBBPF),y) +DPDK_DEPENDENCIES += libbpf +endif + +ifeq ($(BR2_PACKAGE_RDMA_CORE),y) +DPDK_DEPENDENCIES += rdma-core +endif + +# DPDK's meson shall need to be clean'd, hack here along the enclosed patch +DPDK_CONF_OPTS += -Dcpu_instruction_set=$(BR2_GCC_TARGET_ARCH) +# Keep the following, even if not mandatory, until the removal of the patch +DPDK_MESON_EXTRA_PROPERTIES += platform='generic' + +$(eval $(meson-package)) -- 2.46.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [Buildroot] [PATCH v6 1/1] package/dpdk: add 24.07 2024-09-15 14:30 ` [Buildroot] [PATCH v6 1/1] package/dpdk: add 24.07 Vincent Jardin @ 2024-09-15 17:51 ` Julien Olivain 2024-09-15 22:30 ` Yann E. MORIN 1 sibling, 0 replies; 31+ messages in thread From: Julien Olivain @ 2024-09-15 17:51 UTC (permalink / raw) To: Vincent Jardin; +Cc: Thomas Petazzoni, buildroot Hi Vincent, Thanks for the update! With this v6, I'm able to run few dpdk tests in Qemu on x86_64 and Aarch64. In this current state, I would be OK to merge this patch as is. Other improvements can be managed in later patches. I'll propose new runtime tests later, once this patch will be merged. On 15/09/2024 16:30, Vincent Jardin wrote: > This commit adds the integration of the Data Plane Development Kit > (DPDK), > a suite of libraries and drivers designed for high-performance packet > processing from the user space. DPDK enables direct packet steering > from > some network interfaces to the userland, bypassing the Linux kernel > network stack. This is achieved through userland PCI drivers or by > leveraging some userland memory mappings of the network devices. > > Originally inspired by RDMA (Remote Direct Memory Access) concepts, > DPDK > has been adapted to work with PCI devices that do not inherently > support > RDMA. This adaptation allows for low-latency, high-throughput data > processing by minimizing the overhead typically associated with > kernel-space network drivers. > > Importantly, this commit does not enforce the use of UIO or VFIO > kernel frameworks, as DPDK's architecture supports userland memory > mappings that do not require these technologies. By maintaining this > flexibility, DPDK can operate with a broader range of hardware and > software configurations, making it suitable for diverse Buildroot's > deployment scenarios. > > Yocto patch imported from: > > https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > > The patch that fixes DPDK's meson for building properly for aarch64 was > suggested by Julien. It clearly points that DPDK's meson shall need a > proper set of fixes in order to properly cross-compile for aarch64, > riscv64 or ppc64. So for the time being, only the x86_64 and aarch64 > targets are enabled. Other targets will be enabled later once DPDK > upstream will be properly fixed. > > Only the little endian targets are properly supported by DPDK. Big > endian > was supported, mostly on Power8, but it has not been used for a while > and > IBM is not strongly pushing any tests. Should big endian be supported > again, DPDK community will be welcoming any contributions. > > Some nice to have for the Kernel, but not mandatory: > - CONFIG_VFIO_IOMMU_TYPE1=y > - CONFIG_VFIO_VIRQFD=y > - CONFIG_VFIO=y > - CONFIG_VFIO_NOIOMMU=y > - CONFIG_VFIO_PCI=y > - CONFIG_VFIO_PCI_MMAP=y > - CONFIG_HUGETLBFS=y > - CONFIG_HUGETLB_PAGE=y > - CONFIG_PROC_PAGE_MONITOR=y > > For x86 only, HPET and HPET_MMAP can be some nice to have too. > > Since they are some nice to have, but not mandatory ones, the following > Kernel config fixups are not used: > define DPDK_LINUX_CONFIG_FIXUPS > $(call KCONFIG_ENABLE_OPT, CONFIG_HUGETLBFS) > ... > endef > > Notes about license: > > DPDK was released with the BSD-3-Clause license. > > One network driver, the Google Virtual Ethernet (GVE) include files > under the MIT license. See [2] and [3]. > > DPDK had been including a Kernel Netdevice Interface (KNI) and an > IGB_UIO > kernel module under the GPL-2.0 license. Those modules were moved into > a > different repository [K]. Then, for instance, the KNI module was > removed > by [KNI]. This commit was first included in version v23.11. The IGB_UIO > kernel > module was removed by [UIO] since VFIO became capable of supporting all > the required usecases for the DPDK. The main remaining issues had been > the support of memory mapping within a VM or without the use of nested > virtualization but those were fixed by the latest VFIO's kernel > support. > We can notice that the PMD drivers that are using the ibverbs (RDMA) > APIs > are not sharing this need of UIO/VFIO. > > There are also 2 files in "lib/eal/windows" under other licenses > (namely BSD-2-Clause, ISC and MIT) but they are parts of the > Environment > Abstraction Library (EAL) for Microsoft Windows OS, it means they are > not used when compiling for the Linux targets of Buildroot. > > The list of DPDK license exceptions is maintained at [3]. > > Add configuration options to enable DPDK examples and tests. > > [1] https://www.dpdk.org/ > [2] https://git.dpdk.org/dpdk/tree/doc/guides/nics/gve.rst?h=v24.07 > [3] https://git.dpdk.org/dpdk/tree/license/exceptions.txt?h=v24.07 > [KNI] > https://git.dpdk.org/dpdk/commit/?id=f78c100bc87119c6a94130a6689d773afdaa9d98 > [UIO] > https://git.dpdk.org/dpdk/commit/?id=56bb5841fd0608989101d933f091852a3126b4fe > [K] > https://git.dpdk.org/dpdk-kmods/commit/?id=d16f3b44987be181b6effee139558a084eaf9f8c > > Signed-off-by: Vincent Jardin <vjardin@free.fr> > Suggested-by: Julien Olivain <ju.o@free.fr> > Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> > Reviewed-by: Julien Olivain <ju.o@free.fr> > --- > DEVELOPERS | 3 + > package/Config.in | 1 + > ...-cpu_instruction_set-from-meson-opti.patch | 33 +++++++ > package/dpdk/0010-Fix-aarch64-build.patch | 42 ++++++++ > package/dpdk/Config.in | 45 +++++++++ > package/dpdk/dpdk.hash | 10 ++ > package/dpdk/dpdk.mk | 99 +++++++++++++++++++ > 7 files changed, 233 insertions(+) > create mode 100644 > package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > create mode 100644 package/dpdk/0010-Fix-aarch64-build.patch > create mode 100644 package/dpdk/Config.in > create mode 100644 package/dpdk/dpdk.hash > create mode 100644 package/dpdk/dpdk.mk > > diff --git a/DEVELOPERS b/DEVELOPERS > index 426590d5c5..7c3d858e40 100644 > --- a/DEVELOPERS > +++ b/DEVELOPERS > @@ -3238,6 +3238,9 @@ F: package/rtl8822cs/ > N: Victor Huesca <victor.huesca@bootlin.com> > F: support/testing/tests/core/test_root_password.py > > +N: Vincent Jardin <vjardin@free.fr> > +F: package/dpdk/ > + > N: Vincent Prince <vincent.prince.fr@gmail.com> > F: package/nss-myhostname/ > F: package/utp_com/ > diff --git a/package/Config.in b/package/Config.in > index 211080345a..90e521330b 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -1988,6 +1988,7 @@ menu "Networking" > source "package/daq3/Config.in" > source "package/davici/Config.in" > source "package/dht/Config.in" > + source "package/dpdk/Config.in" > source "package/enet/Config.in" > source "package/filemq/Config.in" > source "package/fmlib/Config.in" > diff --git > a/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > new file mode 100644 > index 0000000000..8e99379fb6 > --- /dev/null > +++ > b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > @@ -0,0 +1,33 @@ > +From 121e5d019f0bb6dec0ace2b361611edd10fc8ff8 Mon Sep 17 00:00:00 2001 > +From: Lee Chee Yang <chee.yang.lee@intel.com> > +Date: Wed, 6 Dec 2023 16:58:10 +0800 > +Subject: [PATCH] config/meson: get cpu_instruction_set from meson > option > + > +Workaround error: > +| ../git/config/meson.build:178:8: ERROR: Problem encountered: > Compiler > +does not support "x86_64" arch flag. > + > +Upstream-Status: Inappropriate [ yocto specific to set > cpu_instruction_set ] > + > +Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> > +Upstream: > https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > +--- > + config/meson.build | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/config/meson.build b/config/meson.build > +index a9ccd56deb..f310c7adf6 100644 > +--- a/config/meson.build > ++++ b/config/meson.build > +@@ -105,7 +105,7 @@ platform = get_option('platform') > + > + # set the cpu_instruction_set and cflags for it > + if meson.is_cross_build() > +- cpu_instruction_set = host_machine.cpu() > ++ cpu_instruction_set = get_option('cpu_instruction_set') > + else > + cpu_instruction_set = get_option('cpu_instruction_set') > + machine = get_option('machine') > +-- > +2.37.3 > + > diff --git a/package/dpdk/0010-Fix-aarch64-build.patch > b/package/dpdk/0010-Fix-aarch64-build.patch > new file mode 100644 > index 0000000000..845ec9235b > --- /dev/null > +++ b/package/dpdk/0010-Fix-aarch64-build.patch > @@ -0,0 +1,42 @@ > +From c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb Mon Sep 17 00:00:00 2001 > +From: Julien Olivain <ju.o@free.fr> > +Date: Sun, 8 Sep 2024 13:20:14 +0200 > +Subject: [PATCH] Fix aarch64 build > + > +The condition on which DPDK meson skip the -march detection for > Aarch64 > +seems incorrect or incomplete. This patch changes the condition in > order > +to better match the comment (that the options are decided in > +config/arm/meson.build). It actually test for the architecture name. > + > +While this patch might need some discussion with DPDK maintainers to > +cover all situations, it can still be useful here in Buildroot, as it > +fixes the Aarch64 cross compilation. > + > +Signed-off-by: Julien Olivain <ju.o@free.fr> > +Upstream: to be proposed https://patches.dpdk.org/project/dpdk/list/ > +Links: cherry-picked from > https://github.com/jolivain/dpdk/commit/c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb > +--- > + config/meson.build | 6 +++--- > + 1 file changed, 3 insertions(+), 3 deletions(-) > + > +diff --git a/config/meson.build b/config/meson.build > +index 8c8b019c25..ea48e55ce3 100644 > +--- a/config/meson.build > ++++ b/config/meson.build > +@@ -176,10 +176,10 @@ if not is_ms_compiler > + else > + machine_args += '-march=' + cpu_instruction_set > + # arm manages generic/auto config in config/arm/meson.build > +- if cpu_instruction_set != 'generic' and cpu_instruction_set > != 'auto' > +- compiler_arch_support = cc.has_argument('-march=' + > cpu_instruction_set) > +- else > ++ if host_machine.cpu_family().startswith('aarch') > + compiler_arch_support = true > ++ else > ++ compiler_arch_support = cc.has_argument('-march=' + > cpu_instruction_set) > + endif > + endif > + if not compiler_arch_support > +-- > +2.46.0 > + > diff --git a/package/dpdk/Config.in b/package/dpdk/Config.in > new file mode 100644 > index 0000000000..2fe129c47f > --- /dev/null > +++ b/package/dpdk/Config.in > @@ -0,0 +1,45 @@ > +config BR2_PACKAGE_DPDK_ARCH_SUPPORTS > + bool > + # DPDK can be used for the following little endian architecture > + default y if BR2_aarch64 > + # DPDK requires SSE4.2 for x86_64 since v17.08 > + default y if BR2_x86_64 && BR2_X86_CPU_HAS_SSE42 > + > +config BR2_PACKAGE_DPDK > + bool "dpdk" > + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS > + depends on BR2_TOOLCHAIN_HAS_THREADS # DPDK design > + depends on BR2_USE_MMU # pthread() memory mappings > + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h > + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 > + depends on BR2_TOOLCHAIN_USES_GLIBC > + select BR2_PACKAGE_LIBEXECINFO if !BR2_TOOLCHAIN_USES_GLIBC > + help > + DPDK (Data Plane Development Kit) is a set of libraries > + and drivers for fast packet processing. > + > + http://dpdk.org/ > + > +if BR2_PACKAGE_DPDK > + > +config BR2_PACKAGE_DPDK_EXAMPLES > + bool "Install examples" > + help > + Install all DPDK examples. > + > +config BR2_PACKAGE_DPDK_TESTS > + bool "Install tests" > + help > + Install all DPDK tests. > + > +endif > + > +comment "DPDK needs a toolchain w/ dynamic library, threads, wchar, > kernel headers >= 4.19" > + depends on BR2_USE_MMU # pthread() memory mappings > + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS > + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h > + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 > + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ > + !BR2_TOOLCHAIN_USES_GLIBC || \ > + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \ > + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 > diff --git a/package/dpdk/dpdk.hash b/package/dpdk/dpdk.hash > new file mode 100644 > index 0000000000..4e98d9dc25 > --- /dev/null > +++ b/package/dpdk/dpdk.hash > @@ -0,0 +1,10 @@ > +# Locally computed > +sha256 > 9944f7e5f268e7ac9b4193e2cd54ef6d98f6e1d7dddc967c77ae4f6616d6fbbd > dpdk-24.07.tar.xz > +sha256 > 1531b66affc3bae796d755e12850795e56e25ccedd685bf7d2644d8ddfadbad8 > license/bsd-2-clause.txt > +sha256 > 9acc4bc871a4742550158e3696dcb381953172ef808d04ca248184f9f6322712 > license/bsd-3-clause.txt > +sha256 > e19808bccd90c238fac06da2fc3683e094c64f7ba647e9d86f03a98cf5f2ce05 > license/exceptions.txt > +sha256 > 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 > license/gpl-2.0.txt > +sha256 > be8f198f2e1c9b30226e293255bbe6933ee6607a580ee5874185aa023bcc3c39 > license/isc.txt > +sha256 > 592987e8510228d546540b84a22444bde98e48d03078d3b2eefcd889bec5ce8c > license/lgpl-2.1.txt > +sha256 > 6c54c4d44faf3cba829b3d0c21c6955953e758767018fd7244f809b01d4f4845 > license/mit.txt > +sha256 > cae178052c96959741acb7f00634a09a8294e6cafb5ad53e158d63e3510875ab > license/README > diff --git a/package/dpdk/dpdk.mk b/package/dpdk/dpdk.mk > new file mode 100644 > index 0000000000..0c6be05e6e > --- /dev/null > +++ b/package/dpdk/dpdk.mk > @@ -0,0 +1,99 @@ > +################################################################################ > +# > +# dpdk > +# > +################################################################################ > + > +DPDK_VERSION = 24.07 > +DPDK_SOURCE = dpdk-$(DPDK_VERSION).tar.xz > +DPDK_SITE = https://fast.dpdk.org/rel > +DPDK_LICENSE = \ > + BSD-3-Clause (legacy), \ > + BSD-2-Clause, \ > + GPL-2.0, \ > + ISC, \ > + LGPL-2.1, \ > + MIT (drivers/net/gve/base) > + > +# Only the Windows target has the 2 following licenses: > +# - license/bsd-2-clause.txt > +# - license/isc.txt > +# which is related to a Windows getopt.[ch] compatibility layer. > +# Since Buildroot is not used for Windows target, it is not listed > +# here. > +# > +# All the userland files of DPDK have dual licences BSD or GPL/LGPL > +# Since the Linux kernel modules had been removed from the DPDK, there > +# is no GPL only code into the DPDK anymore. > +# The usage of DPDK with Buildroot is for userland only, it means > +# that for the dual licenced files, BSD clause is used but not the > +# following ones: > +# - license/gpl-2.0.txt > +# - license/lgpl-2.1.txt > +# See the DPDK's license/README for more details. > +# > +# The legacy and historical license of the DPDK is BSD-3-clause. > +DPDK_LICENSE_FILES = \ > + license/README \ > + license/bsd-3-clause.txt \ > + license/exceptions.txt \ > + license/mit.txt > + > +DPDK_DEPENDENCIES = \ > + host-pkgconf \ > + host-python-pyelftools > + > +ifeq ($(BR2_PACKAGE_DPDK_EXAMPLES),y) > +DPDK_CONF_OPTS += -Dexamples=all > +else > +DPDK_CONF_OPTS += -Dexamples= > +endif > + > +ifeq ($(BR2_PACKAGE_DPDK_TESTS),y) > +DPDK_CONF_OPTS += -Dtests=true > +else > +DPDK_CONF_OPTS += -Dtests=false > +endif > + > +ifeq ($(BR2_PACKAGE_LIBBSD),y) > +DPDK_DEPENDENCIES += libbsd > +endif > + > +ifeq ($(BR2_PACKAGE_JANSSON),y) > +DPDK_DEPENDENCIES += jansson > +endif > + > +ifeq ($(BR2_PACKAGE_LIBPCAP),y) > +DPDK_DEPENDENCIES += libpcap > +endif > + > +ifeq ($(BR2_PACKAGE_ZLIB),y) > +DPDK_DEPENDENCIES += zlib > +endif > + > +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y) > +DPDK_DEPENDENCIES += libexecinfo > +endif > + > +ifeq ($(BR2_PACKAGE_NUMACTL),y) > +DPDK_DEPENDENCIES += numactl > +endif > + > +ifeq ($(BR2_PACKAGE_LIBARCHIVE),y) > +DPDK_DEPENDENCIES += libarchive > +endif > + > +ifeq ($(BR2_PACKAGE_LIBBPF),y) > +DPDK_DEPENDENCIES += libbpf > +endif > + > +ifeq ($(BR2_PACKAGE_RDMA_CORE),y) > +DPDK_DEPENDENCIES += rdma-core > +endif > + > +# DPDK's meson shall need to be clean'd, hack here along the enclosed > patch > +DPDK_CONF_OPTS += -Dcpu_instruction_set=$(BR2_GCC_TARGET_ARCH) > +# Keep the following, even if not mandatory, until the removal of the > patch > +DPDK_MESON_EXTRA_PROPERTIES += platform='generic' > + > +$(eval $(meson-package)) > -- > 2.46.0 Best regards, Julien. _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [Buildroot] [PATCH v6 1/1] package/dpdk: add 24.07 2024-09-15 14:30 ` [Buildroot] [PATCH v6 1/1] package/dpdk: add 24.07 Vincent Jardin 2024-09-15 17:51 ` Julien Olivain @ 2024-09-15 22:30 ` Yann E. MORIN 2024-09-23 17:20 ` [Buildroot] [PATCH v7 0/1] add DPDK libraries Vincent Jardin 1 sibling, 1 reply; 31+ messages in thread From: Yann E. MORIN @ 2024-09-15 22:30 UTC (permalink / raw) To: Vincent Jardin; +Cc: Julien Olivain, Thomas Petazzoni, buildroot Vincent, All, On 2024-09-15 16:30 +0200, Vincent Jardin spake thusly: > This commit adds the integration of the Data Plane Development Kit (DPDK), > a suite of libraries and drivers designed for high-performance packet > processing from the user space. DPDK enables direct packet steering from > some network interfaces to the userland, bypassing the Linux kernel > network stack. This is achieved through userland PCI drivers or by > leveraging some userland memory mappings of the network devices. > > Originally inspired by RDMA (Remote Direct Memory Access) concepts, DPDK > has been adapted to work with PCI devices that do not inherently support > RDMA. This adaptation allows for low-latency, high-throughput data > processing by minimizing the overhead typically associated with > kernel-space network drivers. Thank you for this extensive introduction to DPDK. For Buildroot commits, however, one or two sentences are usually sufficient, while focusing on the Buildroot side of things is more important, like describing the challenges and.or decisions that were made in the packaging itself. For example, the following paragraphs are really interesting, as they describe and explain the packaging decisions you made and the rationale behind them. Thanks a lot! > Importantly, this commit does not enforce the use of UIO or VFIO > kernel frameworks, as DPDK's architecture supports userland memory > mappings that do not require these technologies. By maintaining this > flexibility, DPDK can operate with a broader range of hardware and > software configurations, making it suitable for diverse Buildroot's > deployment scenarios. > > Yocto patch imported from: > https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > > The patch that fixes DPDK's meson for building properly for aarch64 was > suggested by Julien. It clearly points that DPDK's meson shall need a > proper set of fixes in order to properly cross-compile for aarch64, > riscv64 or ppc64. So for the time being, only the x86_64 and aarch64 > targets are enabled. Other targets will be enabled later once DPDK > upstream will be properly fixed. > > Only the little endian targets are properly supported by DPDK. Big endian > was supported, mostly on Power8, but it has not been used for a while and > IBM is not strongly pushing any tests. Should big endian be supported > again, DPDK community will be welcoming any contributions. > > Some nice to have for the Kernel, but not mandatory: > - CONFIG_VFIO_IOMMU_TYPE1=y > - CONFIG_VFIO_VIRQFD=y > - CONFIG_VFIO=y > - CONFIG_VFIO_NOIOMMU=y > - CONFIG_VFIO_PCI=y > - CONFIG_VFIO_PCI_MMAP=y > - CONFIG_HUGETLBFS=y > - CONFIG_HUGETLB_PAGE=y > - CONFIG_PROC_PAGE_MONITOR=y > > For x86 only, HPET and HPET_MMAP can be some nice to have too. Since those are only optional and thus not enforced, maybe it would be nice to list them in the help text for the main DPDK option? > Since they are some nice to have, but not mandatory ones, the following > Kernel config fixups are not used: > define DPDK_LINUX_CONFIG_FIXUPS > $(call KCONFIG_ENABLE_OPT, CONFIG_HUGETLBFS) > ... > endef > > Notes about license: > > DPDK was released with the BSD-3-Clause license. > > One network driver, the Google Virtual Ethernet (GVE) include files > under the MIT license. See [2] and [3]. > > DPDK had been including a Kernel Netdevice Interface (KNI) and an IGB_UIO > kernel module under the GPL-2.0 license. Those modules were moved into a > different repository [K]. Then, for instance, the KNI module was removed > by [KNI]. This commit was first included in version v23.11. The IGB_UIO kernel > module was removed by [UIO] since VFIO became capable of supporting all > the required usecases for the DPDK. The main remaining issues had been > the support of memory mapping within a VM or without the use of nested > virtualization but those were fixed by the latest VFIO's kernel support. > We can notice that the PMD drivers that are using the ibverbs (RDMA) APIs > are not sharing this need of UIO/VFIO. I don't think it makes sense to provide that history; a simple sentence would have been enough to clarify the situation, e.g.: There used to be GPL-2.0-only licensed kernel modules, but they got removed in previous versions [K] [KNI], so there is no longer any GPL-2.0-only code; it's all either BSD-3-Clause alone, or the dual license (GPL-2.0 OR BSD-3-Clause). > There are also 2 files in "lib/eal/windows" under other licenses > (namely BSD-2-Clause, ISC and MIT) but they are parts of the Environment > Abstraction Library (EAL) for Microsoft Windows OS, it means they are > not used when compiling for the Linux targets of Buildroot. The above is indeed important, thanks for noticing! [--SNIP--] > diff --git a/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > new file mode 100644 > index 0000000000..8e99379fb6 > --- /dev/null > +++ b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > @@ -0,0 +1,33 @@ > +From 121e5d019f0bb6dec0ace2b361611edd10fc8ff8 Mon Sep 17 00:00:00 2001 > +From: Lee Chee Yang <chee.yang.lee@intel.com> > +Date: Wed, 6 Dec 2023 16:58:10 +0800 > +Subject: [PATCH] config/meson: get cpu_instruction_set from meson option > + > +Workaround error: > +| ../git/config/meson.build:178:8: ERROR: Problem encountered: Compiler > +does not support "x86_64" arch flag. > + > +Upstream-Status: Inappropriate [ yocto specific to set cpu_instruction_set ] > + > +Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> > +Upstream: https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch This is not an "upstream": indeed, Yocto is not the upstream of DPDK, but it is a downstream. The "Upstream" tag must reference the status of the patch in upstream: - has the patch been submitted? What's the URL, then? - if not, why not? - if refused, why do we keep it? And you indeed have sch a status, which is the one in the Yocto's own Upstream-Status tag, so just reuse that. The location where you got it is indeed important, and you can just adsd it below Lee Chee Yang's SoB line. You also need to add your own sign-off on the patches you carry, as your part of the chain of custody for that patch. Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Links: https://yocto..../...... Upstream: Not applicable, see Yocto's Upstream-Status, above Signed-off-by: Your Name <your@email> [--SNIP--] > diff --git a/package/dpdk/0010-Fix-aarch64-build.patch b/package/dpdk/0010-Fix-aarch64-build.patch > new file mode 100644 > index 0000000000..845ec9235b > --- /dev/null > +++ b/package/dpdk/0010-Fix-aarch64-build.patch > @@ -0,0 +1,42 @@ > +From c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb Mon Sep 17 00:00:00 2001 > +From: Julien Olivain <ju.o@free.fr> > +Date: Sun, 8 Sep 2024 13:20:14 +0200 > +Subject: [PATCH] Fix aarch64 build > + > +The condition on which DPDK meson skip the -march detection for Aarch64 > +seems incorrect or incomplete. This patch changes the condition in order > +to better match the comment (that the options are decided in > +config/arm/meson.build). It actually test for the architecture name. > + > +While this patch might need some discussion with DPDK maintainers to > +cover all situations, it can still be useful here in Buildroot, as it > +fixes the Aarch64 cross compilation. > + > +Signed-off-by: Julien Olivain <ju.o@free.fr> > +Upstream: to be proposed https://patches.dpdk.org/project/dpdk/list/ > +Links: cherry-picked from https://github.com/jolivain/dpdk/commit/c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb Ditto, add your sign-off. Will you eventually send that patch upstream? [--SNIP--] > diff --git a/package/dpdk/Config.in b/package/dpdk/Config.in > new file mode 100644 > index 0000000000..2fe129c47f > --- /dev/null > +++ b/package/dpdk/Config.in > @@ -0,0 +1,45 @@ [--SNIP--] > +if BR2_PACKAGE_DPDK > + > +config BR2_PACKAGE_DPDK_EXAMPLES > + bool "Install examples" > + help > + Install all DPDK examples. > + > +config BR2_PACKAGE_DPDK_TESTS > + bool "Install tests" > + help > + Install all DPDK tests. The help texts for those two options are mostly useless; indeed, the phelp text mostly duplicated the prompt, so they do not provide any additional information. If the prompt is enough to understand an option, then there is no need to rpvide a help text. > +endif > + > +comment "DPDK needs a toolchain w/ dynamic library, threads, wchar, kernel headers >= 4.19" > + depends on BR2_USE_MMU # pthread() memory mappings > + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS > + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h > + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 Those two are superfluous and incorrect: we want to see the comment when either consition is false, but with the above two, as soon as gcc >= 4.9 or the headers are >= 4.19, the com ment will be hidden; also, they are already properly inclued in the cpondition below. > + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ > + !BR2_TOOLCHAIN_USES_GLIBC || \ > + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \ > + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 [--SNIP--] > diff --git a/package/dpdk/dpdk.mk b/package/dpdk/dpdk.mk > new file mode 100644 > index 0000000000..0c6be05e6e > --- /dev/null > +++ b/package/dpdk/dpdk.mk > @@ -0,0 +1,99 @@ > +################################################################################ > +# > +# dpdk > +# > +################################################################################ > + > +DPDK_VERSION = 24.07 > +DPDK_SOURCE = dpdk-$(DPDK_VERSION).tar.xz > +DPDK_SITE = https://fast.dpdk.org/rel > +DPDK_LICENSE = \ > + BSD-3-Clause (legacy), \ > + BSD-2-Clause, \ > + GPL-2.0, \ > + ISC, \ > + LGPL-2.1, \ I'm not sure GPL-2.0 and LGPL-2.1 on their own make sense. Indeed, you said earlier that GPL-2.0-only and LGPL-2.1-only code were removed. What we would need however is probably something like: DPDK_LICENSE = \ BSD-2-Clause, \ BSD-3-Clause, \ BSD=-3-Clause OR GPL-2.0, \ BSD=-3-Clause OR LGPL-2.1, \ ISC, \ MIT > + MIT (drivers/net/gve/base) > + > +# Only the Windows target has the 2 following licenses: > +# - license/bsd-2-clause.txt > +# - license/isc.txt > +# which is related to a Windows getopt.[ch] compatibility layer. > +# Since Buildroot is not used for Windows target, it is not listed > +# here. > +# > +# All the userland files of DPDK have dual licences BSD or GPL/LGPL > +# Since the Linux kernel modules had been removed from the DPDK, there > +# is no GPL only code into the DPDK anymore. > +# The usage of DPDK with Buildroot is for userland only, it means > +# that for the dual licenced files, BSD clause is used but not the > +# following ones: > +# - license/gpl-2.0.txt > +# - license/lgpl-2.1.txt I think this is a misunderstanding of licensing terms: the files *are* dual-licensed, so that is the licensing terms they are available under; one is then free to exercise the rights they get from either or both licenses. So we want to include the GPL-2.0 and LGPL-2.0 license files, because they do apply to some files, even if just as an option to choose from. > +# See the DPDK's license/README for more details. > +# > +# The legacy and historical license of the DPDK is BSD-3-clause. > +DPDK_LICENSE_FILES = \ > + license/README \ That file does not contain licensing terms; it just contains the licensing policy to follow when contributoing to DPDK, so it does not belong to the list of licebnse files, IMHO. > + license/bsd-3-clause.txt \ > + license/exceptions.txt \ > + license/mit.txt > + > +DPDK_DEPENDENCIES = \ > + host-pkgconf \ > + host-python-pyelftools This will only guarantee that a "basic" host python3 is available, i.e. without bz2, xz, curses, and ssl. Is that OK? If not, then both BR2_PACKAGE_HOST_PYTHON3 and any needed option should be selected from Config.in. Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* [Buildroot] [PATCH v7 0/1] add DPDK libraries 2024-09-15 22:30 ` Yann E. MORIN @ 2024-09-23 17:20 ` Vincent Jardin 2024-09-23 17:20 ` [Buildroot] [PATCH v7 1/1] package/dpdk: add 24.07 Vincent Jardin 0 siblings, 1 reply; 31+ messages in thread From: Vincent Jardin @ 2024-09-23 17:20 UTC (permalink / raw) To: buildroot; +Cc: Vincent Jardin, Julien Olivain, Yann Morin, Thomas Petazzoni v6 -> v7 changes: - shorter commit log, include comments from Yann Morin - update mk's LICENSE v5 -> v6 changes: - update comments on DPDK patch to compile aarch64 with Buildroot v4 -> v5 changes: - fix test-pkg dpdk - fix make legal-info - add builds for DPDK tests and examples - support only aarch64/ARM64 and x86_64 - notes: logs of checks at https://github.com/vjardin/br_dpdk/actions/runs/10767364662/job/29854551507 - thans to Julien Olivain for many reviews and contributions v3 -> v4 changes: - proof readings (dpdk/DPDK, git.dpdk.org instead of github) - gcc 4.9 needed v2 -> v3 changes: - include the comments from Julien Olivain - refine the licenses - support little endian targets only - many build dependencies if the packages are selected v1 -> v2 changes: - include the comments from Thomas - add a meson patch for the DPDK that I forgot to include This patch has been aligned with Yocto so we can share the same feedbacks. I'll upstream it on DPDK too. Vincent Jardin (1): package/dpdk: add 24.07 DEVELOPERS | 3 + package/Config.in | 1 + ...-cpu_instruction_set-from-meson-opti.patch | 35 +++++++ package/dpdk/0010-Fix-aarch64-build.patch | 43 ++++++++ package/dpdk/Config.in | 55 +++++++++++ package/dpdk/dpdk.hash | 10 ++ package/dpdk/dpdk.mk | 99 +++++++++++++++++++ 7 files changed, 246 insertions(+) create mode 100644 package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch create mode 100644 package/dpdk/0010-Fix-aarch64-build.patch create mode 100644 package/dpdk/Config.in create mode 100644 package/dpdk/dpdk.hash create mode 100644 package/dpdk/dpdk.mk -- 2.46.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* [Buildroot] [PATCH v7 1/1] package/dpdk: add 24.07 2024-09-23 17:20 ` [Buildroot] [PATCH v7 0/1] add DPDK libraries Vincent Jardin @ 2024-09-23 17:20 ` Vincent Jardin 2024-09-23 19:10 ` Arnout Vandecappelle via buildroot 0 siblings, 1 reply; 31+ messages in thread From: Vincent Jardin @ 2024-09-23 17:20 UTC (permalink / raw) To: buildroot; +Cc: Vincent Jardin, Julien Olivain, Yann Morin, Thomas Petazzoni This commit adds the integration of the Data Plane Development Kit (DPDK). This commit does not enforce the use of UIO or VFIO kernel frameworks, as DPDK's architecture supports userland memory mappings that do not require these technologies. By maintaining this flexibility, DPDK can operate with a broader range of hardware and software configurations. Only the little endian targets are properly supported by DPDK. Big endian was supported, mostly on Power8, but it has not been used for a while and IBM is not strongly pushing any tests. Should big endian be supported again, DPDK community will be welcoming any contributions. Since they are some nice to have, but not mandatory ones, the following Kernel config fixups are not used: define DPDK_LINUX_CONFIG_FIXUPS $(call KCONFIG_ENABLE_OPT, CONFIG_HUGETLBFS) ... endef Notes about license: DPDK was released with the BSD-3-Clause license. One network driver, the Google Virtual Ethernet (GVE) include files under the MIT license. See [1] and [2]. There used to be GPL-2.0-only licensed kernel modules, but they got removed in previous versions [K] [KNI], so there is no longer any GPL-2.0-only code; it's all either BSD-3-Clause alone, or the dual license (GPL-2.0 OR BSD-3-Clause). There are also 2 files in "lib/eal/windows" under other licenses (namely BSD-2-Clause, ISC and MIT) but they are parts of the Environment Abstraction Library (EAL) for Microsoft Windows OS, it means they are not used when compiling for the Linux targets of Buildroot. The list of DPDK license exceptions is maintained at [2]. Add configuration options to enable DPDK examples and tests. [1] https://git.dpdk.org/dpdk/tree/doc/guides/nics/gve.rst?h=v24.07 [2] https://git.dpdk.org/dpdk/tree/license/exceptions.txt?h=v24.07 [KNI] https://git.dpdk.org/dpdk/commit/?id=f78c100bc87119c6a94130a6689d773afdaa9d98 [UIO] https://git.dpdk.org/dpdk/commit/?id=56bb5841fd0608989101d933f091852a3126b4fe [K] https://git.dpdk.org/dpdk-kmods/commit/?id=d16f3b44987be181b6effee139558a084eaf9f8c Signed-off-by: Vincent Jardin <vjardin@free.fr> Suggested-by: Julien Olivain <ju.o@free.fr> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Reviewed-by: Yann Morin <yann.morin.1998@free.fr> Reviewed-by: Julien Olivain <ju.o@free.fr> --- DEVELOPERS | 3 + package/Config.in | 1 + ...-cpu_instruction_set-from-meson-opti.patch | 35 +++++++ package/dpdk/0010-Fix-aarch64-build.patch | 43 ++++++++ package/dpdk/Config.in | 55 +++++++++++ package/dpdk/dpdk.hash | 10 ++ package/dpdk/dpdk.mk | 99 +++++++++++++++++++ 7 files changed, 246 insertions(+) create mode 100644 package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch create mode 100644 package/dpdk/0010-Fix-aarch64-build.patch create mode 100644 package/dpdk/Config.in create mode 100644 package/dpdk/dpdk.hash create mode 100644 package/dpdk/dpdk.mk diff --git a/DEVELOPERS b/DEVELOPERS index 426590d5c5..7c3d858e40 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -3238,6 +3238,9 @@ F: package/rtl8822cs/ N: Victor Huesca <victor.huesca@bootlin.com> F: support/testing/tests/core/test_root_password.py +N: Vincent Jardin <vjardin@free.fr> +F: package/dpdk/ + N: Vincent Prince <vincent.prince.fr@gmail.com> F: package/nss-myhostname/ F: package/utp_com/ diff --git a/package/Config.in b/package/Config.in index 211080345a..90e521330b 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1988,6 +1988,7 @@ menu "Networking" source "package/daq3/Config.in" source "package/davici/Config.in" source "package/dht/Config.in" + source "package/dpdk/Config.in" source "package/enet/Config.in" source "package/filemq/Config.in" source "package/fmlib/Config.in" diff --git a/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch new file mode 100644 index 0000000000..c1bfb86448 --- /dev/null +++ b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch @@ -0,0 +1,35 @@ +From 121e5d019f0bb6dec0ace2b361611edd10fc8ff8 Mon Sep 17 00:00:00 2001 +From: Lee Chee Yang <chee.yang.lee@intel.com> +Date: Wed, 6 Dec 2023 16:58:10 +0800 +Subject: [PATCH] config/meson: get cpu_instruction_set from meson option + +Workaround error: +| ../git/config/meson.build:178:8: ERROR: Problem encountered: Compiler +does not support "x86_64" arch flag. + +Upstream-Status: Inappropriate [ yocto specific to set cpu_instruction_set ] + +Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> +Links: https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch +Upstream: Not applicable, see Yocto's status, above +Signed-off-by: Vincent Jardin <vjardin@free.fr> +--- + config/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/meson.build b/config/meson.build +index a9ccd56deb..f310c7adf6 100644 +--- a/config/meson.build ++++ b/config/meson.build +@@ -105,7 +105,7 @@ platform = get_option('platform') + + # set the cpu_instruction_set and cflags for it + if meson.is_cross_build() +- cpu_instruction_set = host_machine.cpu() ++ cpu_instruction_set = get_option('cpu_instruction_set') + else + cpu_instruction_set = get_option('cpu_instruction_set') + machine = get_option('machine') +-- +2.37.3 + diff --git a/package/dpdk/0010-Fix-aarch64-build.patch b/package/dpdk/0010-Fix-aarch64-build.patch new file mode 100644 index 0000000000..55c31c3647 --- /dev/null +++ b/package/dpdk/0010-Fix-aarch64-build.patch @@ -0,0 +1,43 @@ +From c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb Mon Sep 17 00:00:00 2001 +From: Julien Olivain <ju.o@free.fr> +Date: Sun, 8 Sep 2024 13:20:14 +0200 +Subject: [PATCH] Fix aarch64 build + +The condition on which DPDK meson skip the -march detection for Aarch64 +seems incorrect or incomplete. This patch changes the condition in order +to better match the comment (that the options are decided in +config/arm/meson.build). It actually test for the architecture name. + +While this patch might need some discussion with DPDK maintainers to +cover all situations, it can still be useful here in Buildroot, as it +fixes the Aarch64 cross compilation. + +Signed-off-by: Julien Olivain <ju.o@free.fr> +Signed-off-by: Vincent Jardin <vjardin@free.fr> +Upstream: to be proposed https://patches.dpdk.org/project/dpdk/list/ +Links: cherry-picked from https://github.com/jolivain/dpdk/commit/c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb +--- + config/meson.build | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/config/meson.build b/config/meson.build +index 8c8b019c25..ea48e55ce3 100644 +--- a/config/meson.build ++++ b/config/meson.build +@@ -176,10 +176,10 @@ if not is_ms_compiler + else + machine_args += '-march=' + cpu_instruction_set + # arm manages generic/auto config in config/arm/meson.build +- if cpu_instruction_set != 'generic' and cpu_instruction_set != 'auto' +- compiler_arch_support = cc.has_argument('-march=' + cpu_instruction_set) +- else ++ if host_machine.cpu_family().startswith('aarch') + compiler_arch_support = true ++ else ++ compiler_arch_support = cc.has_argument('-march=' + cpu_instruction_set) + endif + endif + if not compiler_arch_support +-- +2.46.0 + diff --git a/package/dpdk/Config.in b/package/dpdk/Config.in new file mode 100644 index 0000000000..ebb875216b --- /dev/null +++ b/package/dpdk/Config.in @@ -0,0 +1,55 @@ +config BR2_PACKAGE_DPDK_ARCH_SUPPORTS + bool + # DPDK can be used for the following little endian architecture + default y if BR2_aarch64 + # DPDK requires SSE4.2 for x86_64 since v17.08 + default y if BR2_x86_64 && BR2_X86_CPU_HAS_SSE42 + +config BR2_PACKAGE_DPDK + bool "dpdk" + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS # DPDK design + depends on BR2_USE_MMU # pthread() memory mappings + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 + depends on BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_LIBEXECINFO if !BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_HOST_PYTHON3 # Ensure a Python3 installation on the host + help + DPDK (Data Plane Development Kit) is a set of libraries + and drivers for fast packet processing. + + http://dpdk.org/ + + Optional but recommended kernel configurations: + - CONFIG_VFIO_IOMMU_TYPE1 + - CONFIG_VFIO_VIRQFD + - CONFIG_VFIO + - CONFIG_VFIO_NOIOMMU + - CONFIG_VFIO_PCI + - CONFIG_VFIO_PCI_MMAP + - CONFIG_HUGETLBFS + - CONFIG_HUGETLB_PAGE + - CONFIG_PROC_PAGE_MONITOR + + For x86 only, the following can also be useful: + - CONFIG_HPET + - CONFIG_HPET_MMAP + +if BR2_PACKAGE_DPDK + +config BR2_PACKAGE_DPDK_EXAMPLES + bool "Install examples" + +config BR2_PACKAGE_DPDK_TESTS + bool "Install tests" + +endif + +comment "DPDK needs a toolchain w/ dynamic library, threads, wchar, kernel headers >= 4.19" + depends on BR2_USE_MMU # pthread() memory mappings + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_USES_GLIBC || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 diff --git a/package/dpdk/dpdk.hash b/package/dpdk/dpdk.hash new file mode 100644 index 0000000000..4e98d9dc25 --- /dev/null +++ b/package/dpdk/dpdk.hash @@ -0,0 +1,10 @@ +# Locally computed +sha256 9944f7e5f268e7ac9b4193e2cd54ef6d98f6e1d7dddc967c77ae4f6616d6fbbd dpdk-24.07.tar.xz +sha256 1531b66affc3bae796d755e12850795e56e25ccedd685bf7d2644d8ddfadbad8 license/bsd-2-clause.txt +sha256 9acc4bc871a4742550158e3696dcb381953172ef808d04ca248184f9f6322712 license/bsd-3-clause.txt +sha256 e19808bccd90c238fac06da2fc3683e094c64f7ba647e9d86f03a98cf5f2ce05 license/exceptions.txt +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 license/gpl-2.0.txt +sha256 be8f198f2e1c9b30226e293255bbe6933ee6607a580ee5874185aa023bcc3c39 license/isc.txt +sha256 592987e8510228d546540b84a22444bde98e48d03078d3b2eefcd889bec5ce8c license/lgpl-2.1.txt +sha256 6c54c4d44faf3cba829b3d0c21c6955953e758767018fd7244f809b01d4f4845 license/mit.txt +sha256 cae178052c96959741acb7f00634a09a8294e6cafb5ad53e158d63e3510875ab license/README diff --git a/package/dpdk/dpdk.mk b/package/dpdk/dpdk.mk new file mode 100644 index 0000000000..bfc49e3ce7 --- /dev/null +++ b/package/dpdk/dpdk.mk @@ -0,0 +1,99 @@ +################################################################################ +# +# dpdk +# +################################################################################ + +DPDK_VERSION = 24.07 +DPDK_SOURCE = dpdk-$(DPDK_VERSION).tar.xz +DPDK_SITE = https://fast.dpdk.org/rel +DPDK_LICENSE = \ + BSD-2-Clause, \ + BSD-3-Clause, \ + BSD=-3-Clause OR GPL-2.0, \ + BSD=-3-Clause OR LGPL-2.1, \ + ISC, \ + MIT + +# Only the Windows target has the 2 following licenses: +# - license/bsd-2-clause.txt +# - license/isc.txt +# which is related to a Windows getopt.[ch] compatibility layer. +# Since Buildroot is not used for Windows target, it is not listed +# here. +# +# All the userland files of DPDK have dual licences BSD or GPL/LGPL +# Since the Linux kernel modules had been removed from the DPDK, there +# is no GPL only code into the DPDK anymore. +# The usage of DPDK with Buildroot is for userland only, it means +# that for the dual licenced files, BSD clause is used but not the +# following ones: +# - license/gpl-2.0.txt +# - license/lgpl-2.1.txt +# See the DPDK's license/README for more details. +# +# The legacy and historical license of the DPDK is BSD-3-clause. +DPDK_LICENSE_FILES = \ + license/README \ + license/bsd-3-clause.txt \ + license/exceptions.txt \ + license/mit.txt + +DPDK_DEPENDENCIES = \ + host-pkgconf \ + host-python-pyelftools + +ifeq ($(BR2_PACKAGE_DPDK_EXAMPLES),y) +DPDK_CONF_OPTS += -Dexamples=all +else +DPDK_CONF_OPTS += -Dexamples= +endif + +ifeq ($(BR2_PACKAGE_DPDK_TESTS),y) +DPDK_CONF_OPTS += -Dtests=true +else +DPDK_CONF_OPTS += -Dtests=false +endif + +ifeq ($(BR2_PACKAGE_LIBBSD),y) +DPDK_DEPENDENCIES += libbsd +endif + +ifeq ($(BR2_PACKAGE_JANSSON),y) +DPDK_DEPENDENCIES += jansson +endif + +ifeq ($(BR2_PACKAGE_LIBPCAP),y) +DPDK_DEPENDENCIES += libpcap +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +DPDK_DEPENDENCIES += zlib +endif + +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y) +DPDK_DEPENDENCIES += libexecinfo +endif + +ifeq ($(BR2_PACKAGE_NUMACTL),y) +DPDK_DEPENDENCIES += numactl +endif + +ifeq ($(BR2_PACKAGE_LIBARCHIVE),y) +DPDK_DEPENDENCIES += libarchive +endif + +ifeq ($(BR2_PACKAGE_LIBBPF),y) +DPDK_DEPENDENCIES += libbpf +endif + +ifeq ($(BR2_PACKAGE_RDMA_CORE),y) +DPDK_DEPENDENCIES += rdma-core +endif + +# DPDK's meson shall need to be clean'd, hack here along the enclosed patch +DPDK_CONF_OPTS += -Dcpu_instruction_set=$(BR2_GCC_TARGET_ARCH) +# Keep the following, even if not mandatory, until the removal of the patch +DPDK_MESON_EXTRA_PROPERTIES += platform='generic' + +$(eval $(meson-package)) -- 2.46.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [Buildroot] [PATCH v7 1/1] package/dpdk: add 24.07 2024-09-23 17:20 ` [Buildroot] [PATCH v7 1/1] package/dpdk: add 24.07 Vincent Jardin @ 2024-09-23 19:10 ` Arnout Vandecappelle via buildroot 2024-09-24 14:53 ` Vincent Jardin 0 siblings, 1 reply; 31+ messages in thread From: Arnout Vandecappelle via buildroot @ 2024-09-23 19:10 UTC (permalink / raw) To: Vincent Jardin, buildroot; +Cc: Julien Olivain, Yann Morin, Thomas Petazzoni Hi Vincent, On 23/09/2024 19:20, Vincent Jardin wrote: > This commit adds the integration of the Data Plane Development Kit (DPDK). [snip] > diff --git a/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > new file mode 100644 > index 0000000000..c1bfb86448 > --- /dev/null > +++ b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > @@ -0,0 +1,35 @@ > +From 121e5d019f0bb6dec0ace2b361611edd10fc8ff8 Mon Sep 17 00:00:00 2001 > +From: Lee Chee Yang <chee.yang.lee@intel.com> > +Date: Wed, 6 Dec 2023 16:58:10 +0800 > +Subject: [PATCH] config/meson: get cpu_instruction_set from meson option > + > +Workaround error: > +| ../git/config/meson.build:178:8: ERROR: Problem encountered: Compiler > +does not support "x86_64" arch flag. > + > +Upstream-Status: Inappropriate [ yocto specific to set cpu_instruction_set ] > + > +Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> > +Links: https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > +Upstream: Not applicable, see Yocto's status, above > +Signed-off-by: Vincent Jardin <vjardin@free.fr> > +--- > + config/meson.build | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/config/meson.build b/config/meson.build > +index a9ccd56deb..f310c7adf6 100644 > +--- a/config/meson.build > ++++ b/config/meson.build > +@@ -105,7 +105,7 @@ platform = get_option('platform') > + > + # set the cpu_instruction_set and cflags for it > + if meson.is_cross_build() Is this patch actually needed? I thought that the fact that we supply a cross_compilation.conf file was enough to tell meson that we're cross-compiling. > +- cpu_instruction_set = host_machine.cpu() Oh, hang on, isn't this an upstream bug? If we're cross-compiling we shouldn't be using host_machine, right? Regards, Arnout [snip] > diff --git a/package/dpdk/Config.in b/package/dpdk/Config.in > new file mode 100644 > index 0000000000..ebb875216b > --- /dev/null > +++ b/package/dpdk/Config.in > @@ -0,0 +1,55 @@ > +config BR2_PACKAGE_DPDK_ARCH_SUPPORTS > + bool > + # DPDK can be used for the following little endian architecture > + default y if BR2_aarch64 > + # DPDK requires SSE4.2 for x86_64 since v17.08 > + default y if BR2_x86_64 && BR2_X86_CPU_HAS_SSE42 > + > +config BR2_PACKAGE_DPDK > + bool "dpdk" > + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS > + depends on BR2_TOOLCHAIN_HAS_THREADS # DPDK design > + depends on BR2_USE_MMU # pthread() memory mappings > + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h > + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 > + depends on BR2_TOOLCHAIN_USES_GLIBC > + select BR2_PACKAGE_LIBEXECINFO if !BR2_TOOLCHAIN_USES_GLIBC Just above it depends on glibc, so this select seems redundant? > + select BR2_PACKAGE_HOST_PYTHON3 # Ensure a Python3 installation on the host Comment is redundant. It would be useful to say # host-python-pyelftools > + help > + DPDK (Data Plane Development Kit) is a set of libraries > + and drivers for fast packet processing. > + > + http://dpdk.org/ > + > + Optional but recommended kernel configurations: > + - CONFIG_VFIO_IOMMU_TYPE1 > + - CONFIG_VFIO_VIRQFD > + - CONFIG_VFIO > + - CONFIG_VFIO_NOIOMMU > + - CONFIG_VFIO_PCI > + - CONFIG_VFIO_PCI_MMAP > + - CONFIG_HUGETLBFS > + - CONFIG_HUGETLB_PAGE > + - CONFIG_PROC_PAGE_MONITOR > + > + For x86 only, the following can also be useful: > + - CONFIG_HPET > + - CONFIG_HPET_MMAP > + > +if BR2_PACKAGE_DPDK > + > +config BR2_PACKAGE_DPDK_EXAMPLES > + bool "Install examples" > + > +config BR2_PACKAGE_DPDK_TESTS > + bool "Install tests" > + > +endif > + > +comment "DPDK needs a toolchain w/ dynamic library, threads, wchar, kernel headers >= 4.19" > + depends on BR2_USE_MMU # pthread() memory mappings > + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS > + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ > + !BR2_TOOLCHAIN_USES_GLIBC || \ > + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \ > + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 > diff --git a/package/dpdk/dpdk.hash b/package/dpdk/dpdk.hash > new file mode 100644 > index 0000000000..4e98d9dc25 > --- /dev/null > +++ b/package/dpdk/dpdk.hash > @@ -0,0 +1,10 @@ > +# Locally computed > +sha256 9944f7e5f268e7ac9b4193e2cd54ef6d98f6e1d7dddc967c77ae4f6616d6fbbd dpdk-24.07.tar.xz > +sha256 1531b66affc3bae796d755e12850795e56e25ccedd685bf7d2644d8ddfadbad8 license/bsd-2-clause.txt > +sha256 9acc4bc871a4742550158e3696dcb381953172ef808d04ca248184f9f6322712 license/bsd-3-clause.txt > +sha256 e19808bccd90c238fac06da2fc3683e094c64f7ba647e9d86f03a98cf5f2ce05 license/exceptions.txt > +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 license/gpl-2.0.txt > +sha256 be8f198f2e1c9b30226e293255bbe6933ee6607a580ee5874185aa023bcc3c39 license/isc.txt > +sha256 592987e8510228d546540b84a22444bde98e48d03078d3b2eefcd889bec5ce8c license/lgpl-2.1.txt > +sha256 6c54c4d44faf3cba829b3d0c21c6955953e758767018fd7244f809b01d4f4845 license/mit.txt > +sha256 cae178052c96959741acb7f00634a09a8294e6cafb5ad53e158d63e3510875ab license/README > diff --git a/package/dpdk/dpdk.mk b/package/dpdk/dpdk.mk > new file mode 100644 > index 0000000000..bfc49e3ce7 > --- /dev/null > +++ b/package/dpdk/dpdk.mk > @@ -0,0 +1,99 @@ > +################################################################################ > +# > +# dpdk > +# > +################################################################################ > + > +DPDK_VERSION = 24.07 > +DPDK_SOURCE = dpdk-$(DPDK_VERSION).tar.xz > +DPDK_SITE = https://fast.dpdk.org/rel > +DPDK_LICENSE = \ > + BSD-2-Clause, \ > + BSD-3-Clause, \ > + BSD=-3-Clause OR GPL-2.0, \ > + BSD=-3-Clause OR LGPL-2.1, \ > + ISC, \ > + MIT According to the commit message, the BSD-2-Clause, ISC, and MIT licenses are only in code that is not actually used. Up to now, we've always dropped such licenses in Buildroot's _LICENSE tag (and also from the hash file). > + > +# Only the Windows target has the 2 following licenses: > +# - license/bsd-2-clause.txt > +# - license/isc.txt > +# which is related to a Windows getopt.[ch] compatibility layer. > +# Since Buildroot is not used for Windows target, it is not listed > +# here. > +# > +# All the userland files of DPDK have dual licences BSD or GPL/LGPL > +# Since the Linux kernel modules had been removed from the DPDK, there > +# is no GPL only code into the DPDK anymore. > +# The usage of DPDK with Buildroot is for userland only, it means > +# that for the dual licenced files, BSD clause is used but not the > +# following ones: That is not true (unless there's a specific text that says that GPL only applies to the kernel module build). It's normally up to the consumer to decide if they choose the BSD or GPL license. If this is not the case, the OR specifier in _LICENSE is incorrect. > +# - license/gpl-2.0.txt > +# - license/lgpl-2.1.txt > +# See the DPDK's license/README for more details. > +# > +# The legacy and historical license of the DPDK is BSD-3-clause. > +DPDK_LICENSE_FILES = \ > + license/README \ > + license/bsd-3-clause.txt \ > + license/exceptions.txt \ > + license/mit.txt The hash file contains additional license files - please only contain in the hash file what we also have in _LICENSE_FILES. And since we have BSD=-3-Clause OR GPL-2.0, we should have the GPL license file as well. Regards, Arnout > + > +DPDK_DEPENDENCIES = \ > + host-pkgconf \ > + host-python-pyelftools > + > +ifeq ($(BR2_PACKAGE_DPDK_EXAMPLES),y) > +DPDK_CONF_OPTS += -Dexamples=all > +else > +DPDK_CONF_OPTS += -Dexamples= > +endif > + > +ifeq ($(BR2_PACKAGE_DPDK_TESTS),y) > +DPDK_CONF_OPTS += -Dtests=true > +else > +DPDK_CONF_OPTS += -Dtests=false > +endif > + > +ifeq ($(BR2_PACKAGE_LIBBSD),y) > +DPDK_DEPENDENCIES += libbsd > +endif > + > +ifeq ($(BR2_PACKAGE_JANSSON),y) > +DPDK_DEPENDENCIES += jansson > +endif > + > +ifeq ($(BR2_PACKAGE_LIBPCAP),y) > +DPDK_DEPENDENCIES += libpcap > +endif > + > +ifeq ($(BR2_PACKAGE_ZLIB),y) > +DPDK_DEPENDENCIES += zlib > +endif > + > +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y) > +DPDK_DEPENDENCIES += libexecinfo > +endif > + > +ifeq ($(BR2_PACKAGE_NUMACTL),y) > +DPDK_DEPENDENCIES += numactl > +endif > + > +ifeq ($(BR2_PACKAGE_LIBARCHIVE),y) > +DPDK_DEPENDENCIES += libarchive > +endif > + > +ifeq ($(BR2_PACKAGE_LIBBPF),y) > +DPDK_DEPENDENCIES += libbpf > +endif > + > +ifeq ($(BR2_PACKAGE_RDMA_CORE),y) > +DPDK_DEPENDENCIES += rdma-core > +endif > + > +# DPDK's meson shall need to be clean'd, hack here along the enclosed patch > +DPDK_CONF_OPTS += -Dcpu_instruction_set=$(BR2_GCC_TARGET_ARCH) > +# Keep the following, even if not mandatory, until the removal of the patch > +DPDK_MESON_EXTRA_PROPERTIES += platform='generic' > + > +$(eval $(meson-package)) _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [Buildroot] [PATCH v7 1/1] package/dpdk: add 24.07 2024-09-23 19:10 ` Arnout Vandecappelle via buildroot @ 2024-09-24 14:53 ` Vincent Jardin 2024-09-24 15:24 ` [Buildroot] [PATCH v8 0/1] add DPDK libraries Vincent Jardin 0 siblings, 1 reply; 31+ messages in thread From: Vincent Jardin @ 2024-09-24 14:53 UTC (permalink / raw) To: Arnout Vandecappelle; +Cc: ju.o, yann.morin.1998, thomas.petazzoni, buildroot Thanks Arnout, see enclosed. I have included your comments into a v8 that will follow. They help to optimize the scope of the licenses. On Mon, Sep 23, 2024 at 09:10:46PM UTC, Arnout Vandecappelle wrote: > > +--- a/config/meson.build > > ++++ b/config/meson.build > > +@@ -105,7 +105,7 @@ platform = get_option('platform') > > + > > + # set the cpu_instruction_set and cflags for it > > + if meson.is_cross_build() > > Is this patch actually needed? I thought that the fact that we supply a > cross_compilation.conf file was enough to tell meson that we're > cross-compiling. yes, it is until the DPDK's mesons will be fixed. It'll be another topic. But for the timebeing, there is no b plan. It was already discussed with Julien on September 14th: "it can still be useful here in Buildroot, as it fixes the Aarch64 cross compilation." > > +- cpu_instruction_set = host_machine.cpu() > > Oh, hang on, isn't this an upstream bug? If we're cross-compiling we > shouldn't be using host_machine, right? yes. > > diff --git a/package/dpdk/Config.in b/package/dpdk/Config.in > > new file mode 100644 > > index 0000000000..ebb875216b > > --- /dev/null > > +++ b/package/dpdk/Config.in > > @@ -0,0 +1,55 @@ > > +config BR2_PACKAGE_DPDK_ARCH_SUPPORTS > > + bool > > + # DPDK can be used for the following little endian architecture > > + default y if BR2_aarch64 > > + # DPDK requires SSE4.2 for x86_64 since v17.08 > > + default y if BR2_x86_64 && BR2_X86_CPU_HAS_SSE42 > > + > > +config BR2_PACKAGE_DPDK > > + bool "dpdk" > > + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS > > + depends on BR2_TOOLCHAIN_HAS_THREADS # DPDK design > > + depends on BR2_USE_MMU # pthread() memory mappings > > + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h > > + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 > > + depends on BR2_TOOLCHAIN_USES_GLIBC > > + select BR2_PACKAGE_LIBEXECINFO if !BR2_TOOLCHAIN_USES_GLIBC > > Just above it depends on glibc, so this select seems redundant? Right, it can be dropped. Non glibc setup will be another thread for DPDK. > > + select BR2_PACKAGE_HOST_PYTHON3 # Ensure a Python3 installation on the host > > Comment is redundant. It would be useful to say # host-python-pyelftools thanks for this comment, included for the v8 > > +DPDK_LICENSE = \ > > + BSD-2-Clause, \ > > + BSD-3-Clause, \ > > + BSD=-3-Clause OR GPL-2.0, \ > > + BSD=-3-Clause OR LGPL-2.1, \ > > + ISC, \ > > + MIT > > According to the commit message, the BSD-2-Clause, ISC, and MIT licenses > are only in code that is not actually used. Up to now, we've always dropped > such licenses in Buildroot's _LICENSE tag (and also from the hash file). OK, I get the point. So BSD-2-Claude, ISC is for Windows / getopt -> removed MIT: it is required for the google's Virtual NIC (gve). > > +# All the userland files of DPDK have dual licences BSD or GPL/LGPL > > +# Since the Linux kernel modules had been removed from the DPDK, there > > +# is no GPL only code into the DPDK anymore. > > +# The usage of DPDK with Buildroot is for userland only, it means > > +# that for the dual licenced files, BSD clause is used but not the > > +# following ones: > > That is not true (unless there's a specific text that says that GPL only > applies to the kernel module build). It's normally up to the consumer to > decide if they choose the BSD or GPL license. If this is not the case, the > OR specifier in _LICENSE is incorrect. Following your former comments, since Buildroot is not used to build the kernel modules of DPDK, let's drop the GPL references. Done into v8 See the comments from the contribute guidelines of the DPDK: The DPDK uses the Open Source BSD-3-Clause license for the core libraries and drivers. The kernel components are GPL-2.0 licensed. > The hash file contains additional license files - please only contain in > the hash file what we also have in _LICENSE_FILES. done _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* [Buildroot] [PATCH v8 0/1] add DPDK libraries 2024-09-24 14:53 ` Vincent Jardin @ 2024-09-24 15:24 ` Vincent Jardin 2024-09-24 15:24 ` [Buildroot] [PATCH v8 1/1] package/dpdk: add 24.07 Vincent Jardin 2024-09-30 13:41 ` [Buildroot] [PATCH v8 0/1] add DPDK libraries Vincent Jardin 0 siblings, 2 replies; 31+ messages in thread From: Vincent Jardin @ 2024-09-24 15:24 UTC (permalink / raw) To: buildroot Cc: Vincent Jardin, Julien Olivain, Yann Morin, Thomas Petazzoni, Arnout Vandecappelle v7 -> v8 changes: - focus glibc - drop any licenses which do not apply to the Buildroot's builds v6 -> v7 changes: - shorter commit log, include comments from Yann Morin - update mk's LICENSE v5 -> v6 changes: - update comments on DPDK patch to compile aarch64 with Buildroot v4 -> v5 changes: - fix test-pkg dpdk - fix make legal-info - add builds for DPDK tests and examples - support only aarch64/ARM64 and x86_64 - notes: logs of checks at https://github.com/vjardin/br_dpdk/actions/runs/10767364662/job/29854551507 - thans to Julien Olivain for many reviews and contributions v3 -> v4 changes: - proof readings (dpdk/DPDK, git.dpdk.org instead of github) - gcc 4.9 needed v2 -> v3 changes: - include the comments from Julien Olivain - refine the licenses - support little endian targets only - many build dependencies if the packages are selected v1 -> v2 changes: - include the comments from Thomas - add a meson patch for the DPDK that I forgot to include This patch has been aligned with Yocto so we can share the same feedbacks. I'll upstream it on DPDK too. Vincent Jardin (1): package/dpdk: add 24.07 DEVELOPERS | 3 + package/Config.in | 1 + ...-cpu_instruction_set-from-meson-opti.patch | 35 +++++++ package/dpdk/0010-Fix-aarch64-build.patch | 43 +++++++++ package/dpdk/Config.in | 54 +++++++++++ package/dpdk/dpdk.hash | 6 ++ package/dpdk/dpdk.mk | 95 +++++++++++++++++++ 7 files changed, 237 insertions(+) create mode 100644 package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch create mode 100644 package/dpdk/0010-Fix-aarch64-build.patch create mode 100644 package/dpdk/Config.in create mode 100644 package/dpdk/dpdk.hash create mode 100644 package/dpdk/dpdk.mk -- 2.46.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* [Buildroot] [PATCH v8 1/1] package/dpdk: add 24.07 2024-09-24 15:24 ` [Buildroot] [PATCH v8 0/1] add DPDK libraries Vincent Jardin @ 2024-09-24 15:24 ` Vincent Jardin 2024-10-02 21:58 ` Julien Olivain 2024-10-23 19:23 ` Julien Olivain 2024-09-30 13:41 ` [Buildroot] [PATCH v8 0/1] add DPDK libraries Vincent Jardin 1 sibling, 2 replies; 31+ messages in thread From: Vincent Jardin @ 2024-09-24 15:24 UTC (permalink / raw) To: buildroot Cc: Vincent Jardin, Julien Olivain, Yann Morin, Thomas Petazzoni, Arnout Vandecappelle This commit adds the integration of the Data Plane Development Kit (DPDK). This commit does not enforce the use of UIO or VFIO kernel frameworks, as DPDK's architecture supports userland memory mappings that do not require these technologies. By maintaining this flexibility, DPDK can operate with a broader range of hardware and software configurations. Only the little endian targets are properly supported by DPDK. Big endian was supported, mostly on Power8, but it has not been used for a while and IBM is not strongly pushing any tests. Should big endian be supported again, DPDK community will be welcoming any contributions. Notes about license: DPDK was released with the BSD-3-Clause license. One network driver, the Google Virtual Ethernet (GVE) include files under the MIT license. See [1] and [2]. There used to be GPL-2.0-only licensed kernel modules, but they got removed in previous versions [K] [KNI], so Buildroot won't be used to compile the GPL-2.0-only code. There are also 2 files in "lib/eal/windows" under other licenses (namely BSD-2-Clause, ISC and MIT) but they are parts of the Environment Abstraction Library (EAL) for Microsoft Windows OS, it means they are not used when compiling for the Linux targets of Buildroot. The list of DPDK license exceptions is maintained at [2]. Add configuration options to enable DPDK examples and tests. [1] https://git.dpdk.org/dpdk/tree/doc/guides/nics/gve.rst?h=v24.07 [2] https://git.dpdk.org/dpdk/tree/license/exceptions.txt?h=v24.07 [KNI] https://git.dpdk.org/dpdk/commit/?id=f78c100bc87119c6a94130a6689d773afdaa9d98 [UIO] https://git.dpdk.org/dpdk/commit/?id=56bb5841fd0608989101d933f091852a3126b4fe [K] https://git.dpdk.org/dpdk-kmods/commit/?id=d16f3b44987be181b6effee139558a084eaf9f8c Signed-off-by: Vincent Jardin <vjardin@free.fr> Suggested-by: Julien Olivain <ju.o@free.fr> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Reviewed-by: Julien Olivain <ju.o@free.fr> Reviewed-by: Yann Morin <yann.morin.1998@free.fr> Reviewed-by: Arnout Vandecappelle <arnout@mind.de> --- DEVELOPERS | 3 + package/Config.in | 1 + ...-cpu_instruction_set-from-meson-opti.patch | 35 +++++++ package/dpdk/0010-Fix-aarch64-build.patch | 43 +++++++++ package/dpdk/Config.in | 54 +++++++++++ package/dpdk/dpdk.hash | 6 ++ package/dpdk/dpdk.mk | 95 +++++++++++++++++++ 7 files changed, 237 insertions(+) create mode 100644 package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch create mode 100644 package/dpdk/0010-Fix-aarch64-build.patch create mode 100644 package/dpdk/Config.in create mode 100644 package/dpdk/dpdk.hash create mode 100644 package/dpdk/dpdk.mk diff --git a/DEVELOPERS b/DEVELOPERS index 426590d5c5..7c3d858e40 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -3238,6 +3238,9 @@ F: package/rtl8822cs/ N: Victor Huesca <victor.huesca@bootlin.com> F: support/testing/tests/core/test_root_password.py +N: Vincent Jardin <vjardin@free.fr> +F: package/dpdk/ + N: Vincent Prince <vincent.prince.fr@gmail.com> F: package/nss-myhostname/ F: package/utp_com/ diff --git a/package/Config.in b/package/Config.in index 211080345a..90e521330b 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1988,6 +1988,7 @@ menu "Networking" source "package/daq3/Config.in" source "package/davici/Config.in" source "package/dht/Config.in" + source "package/dpdk/Config.in" source "package/enet/Config.in" source "package/filemq/Config.in" source "package/fmlib/Config.in" diff --git a/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch new file mode 100644 index 0000000000..c1bfb86448 --- /dev/null +++ b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch @@ -0,0 +1,35 @@ +From 121e5d019f0bb6dec0ace2b361611edd10fc8ff8 Mon Sep 17 00:00:00 2001 +From: Lee Chee Yang <chee.yang.lee@intel.com> +Date: Wed, 6 Dec 2023 16:58:10 +0800 +Subject: [PATCH] config/meson: get cpu_instruction_set from meson option + +Workaround error: +| ../git/config/meson.build:178:8: ERROR: Problem encountered: Compiler +does not support "x86_64" arch flag. + +Upstream-Status: Inappropriate [ yocto specific to set cpu_instruction_set ] + +Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> +Links: https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch +Upstream: Not applicable, see Yocto's status, above +Signed-off-by: Vincent Jardin <vjardin@free.fr> +--- + config/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/meson.build b/config/meson.build +index a9ccd56deb..f310c7adf6 100644 +--- a/config/meson.build ++++ b/config/meson.build +@@ -105,7 +105,7 @@ platform = get_option('platform') + + # set the cpu_instruction_set and cflags for it + if meson.is_cross_build() +- cpu_instruction_set = host_machine.cpu() ++ cpu_instruction_set = get_option('cpu_instruction_set') + else + cpu_instruction_set = get_option('cpu_instruction_set') + machine = get_option('machine') +-- +2.37.3 + diff --git a/package/dpdk/0010-Fix-aarch64-build.patch b/package/dpdk/0010-Fix-aarch64-build.patch new file mode 100644 index 0000000000..55c31c3647 --- /dev/null +++ b/package/dpdk/0010-Fix-aarch64-build.patch @@ -0,0 +1,43 @@ +From c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb Mon Sep 17 00:00:00 2001 +From: Julien Olivain <ju.o@free.fr> +Date: Sun, 8 Sep 2024 13:20:14 +0200 +Subject: [PATCH] Fix aarch64 build + +The condition on which DPDK meson skip the -march detection for Aarch64 +seems incorrect or incomplete. This patch changes the condition in order +to better match the comment (that the options are decided in +config/arm/meson.build). It actually test for the architecture name. + +While this patch might need some discussion with DPDK maintainers to +cover all situations, it can still be useful here in Buildroot, as it +fixes the Aarch64 cross compilation. + +Signed-off-by: Julien Olivain <ju.o@free.fr> +Signed-off-by: Vincent Jardin <vjardin@free.fr> +Upstream: to be proposed https://patches.dpdk.org/project/dpdk/list/ +Links: cherry-picked from https://github.com/jolivain/dpdk/commit/c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb +--- + config/meson.build | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/config/meson.build b/config/meson.build +index 8c8b019c25..ea48e55ce3 100644 +--- a/config/meson.build ++++ b/config/meson.build +@@ -176,10 +176,10 @@ if not is_ms_compiler + else + machine_args += '-march=' + cpu_instruction_set + # arm manages generic/auto config in config/arm/meson.build +- if cpu_instruction_set != 'generic' and cpu_instruction_set != 'auto' +- compiler_arch_support = cc.has_argument('-march=' + cpu_instruction_set) +- else ++ if host_machine.cpu_family().startswith('aarch') + compiler_arch_support = true ++ else ++ compiler_arch_support = cc.has_argument('-march=' + cpu_instruction_set) + endif + endif + if not compiler_arch_support +-- +2.46.0 + diff --git a/package/dpdk/Config.in b/package/dpdk/Config.in new file mode 100644 index 0000000000..328129ea65 --- /dev/null +++ b/package/dpdk/Config.in @@ -0,0 +1,54 @@ +config BR2_PACKAGE_DPDK_ARCH_SUPPORTS + bool + # DPDK can be used for the following little endian architecture + default y if BR2_aarch64 + # DPDK requires SSE4.2 for x86_64 since v17.08 + default y if BR2_x86_64 && BR2_X86_CPU_HAS_SSE42 + +config BR2_PACKAGE_DPDK + bool "dpdk" + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS # DPDK design + depends on BR2_USE_MMU # pthread() memory mappings + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 + depends on BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_HOST_PYTHON3 # host-python-pyelftools + help + DPDK (Data Plane Development Kit) is a set of libraries + and drivers for fast packet processing. + + http://dpdk.org/ + + Optional but recommended kernel configurations: + - CONFIG_VFIO_IOMMU_TYPE1 + - CONFIG_VFIO_VIRQFD + - CONFIG_VFIO + - CONFIG_VFIO_NOIOMMU + - CONFIG_VFIO_PCI + - CONFIG_VFIO_PCI_MMAP + - CONFIG_HUGETLBFS + - CONFIG_HUGETLB_PAGE + - CONFIG_PROC_PAGE_MONITOR + + For x86 only, the following can also be useful: + - CONFIG_HPET + - CONFIG_HPET_MMAP + +if BR2_PACKAGE_DPDK + +config BR2_PACKAGE_DPDK_EXAMPLES + bool "Install examples" + +config BR2_PACKAGE_DPDK_TESTS + bool "Install tests" + +endif + +comment "DPDK needs a toolchain w/ dynamic library, threads, wchar, kernel headers >= 4.19" + depends on BR2_USE_MMU # pthread() memory mappings + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_USES_GLIBC || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 diff --git a/package/dpdk/dpdk.hash b/package/dpdk/dpdk.hash new file mode 100644 index 0000000000..27c06476e7 --- /dev/null +++ b/package/dpdk/dpdk.hash @@ -0,0 +1,6 @@ +# Locally computed +sha256 9944f7e5f268e7ac9b4193e2cd54ef6d98f6e1d7dddc967c77ae4f6616d6fbbd dpdk-24.07.tar.xz +sha256 9acc4bc871a4742550158e3696dcb381953172ef808d04ca248184f9f6322712 license/bsd-3-clause.txt +sha256 e19808bccd90c238fac06da2fc3683e094c64f7ba647e9d86f03a98cf5f2ce05 license/exceptions.txt +sha256 6c54c4d44faf3cba829b3d0c21c6955953e758767018fd7244f809b01d4f4845 license/mit.txt +sha256 cae178052c96959741acb7f00634a09a8294e6cafb5ad53e158d63e3510875ab license/README diff --git a/package/dpdk/dpdk.mk b/package/dpdk/dpdk.mk new file mode 100644 index 0000000000..b685e12408 --- /dev/null +++ b/package/dpdk/dpdk.mk @@ -0,0 +1,95 @@ +################################################################################ +# +# dpdk +# +################################################################################ + +DPDK_VERSION = 24.07 +DPDK_SOURCE = dpdk-$(DPDK_VERSION).tar.xz +DPDK_SITE = https://fast.dpdk.org/rel +DPDK_LICENSE = \ + BSD-3-Clause, \ + MIT + +# Only the Windows target has the 2 following licenses: +# - license/bsd-2-clause.txt +# - license/isc.txt +# which is related to a Windows getopt.[ch] compatibility layer. +# Since Buildroot is not used for Windows target, it is not listed +# here. +# +# All the userland files of DPDK have dual licences BSD or GPL/LGPL +# Since the Linux kernel modules had been removed from the DPDK, there +# is no GPL only code into the DPDK anymore. +# The usage of DPDK with Buildroot is for userland only, it means +# that for the dual licenced files, BSD clause is used but not the +# following ones: +# - license/gpl-2.0.txt +# - license/lgpl-2.1.txt +# See the DPDK's license/README for more details. +# +# The legacy and historical license of the DPDK is BSD-3-clause. +DPDK_LICENSE_FILES = \ + license/README \ + license/bsd-3-clause.txt \ + license/exceptions.txt \ + license/mit.txt + +DPDK_DEPENDENCIES = \ + host-pkgconf \ + host-python-pyelftools + +ifeq ($(BR2_PACKAGE_DPDK_EXAMPLES),y) +DPDK_CONF_OPTS += -Dexamples=all +else +DPDK_CONF_OPTS += -Dexamples= +endif + +ifeq ($(BR2_PACKAGE_DPDK_TESTS),y) +DPDK_CONF_OPTS += -Dtests=true +else +DPDK_CONF_OPTS += -Dtests=false +endif + +ifeq ($(BR2_PACKAGE_LIBBSD),y) +DPDK_DEPENDENCIES += libbsd +endif + +ifeq ($(BR2_PACKAGE_JANSSON),y) +DPDK_DEPENDENCIES += jansson +endif + +ifeq ($(BR2_PACKAGE_LIBPCAP),y) +DPDK_DEPENDENCIES += libpcap +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +DPDK_DEPENDENCIES += zlib +endif + +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y) +DPDK_DEPENDENCIES += libexecinfo +endif + +ifeq ($(BR2_PACKAGE_NUMACTL),y) +DPDK_DEPENDENCIES += numactl +endif + +ifeq ($(BR2_PACKAGE_LIBARCHIVE),y) +DPDK_DEPENDENCIES += libarchive +endif + +ifeq ($(BR2_PACKAGE_LIBBPF),y) +DPDK_DEPENDENCIES += libbpf +endif + +ifeq ($(BR2_PACKAGE_RDMA_CORE),y) +DPDK_DEPENDENCIES += rdma-core +endif + +# DPDK's meson shall need to be clean'd, hack here along the enclosed patch +DPDK_CONF_OPTS += -Dcpu_instruction_set=$(BR2_GCC_TARGET_ARCH) +# Keep the following, even if not mandatory, until the removal of the patch +DPDK_MESON_EXTRA_PROPERTIES += platform='generic' + +$(eval $(meson-package)) -- 2.46.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [Buildroot] [PATCH v8 1/1] package/dpdk: add 24.07 2024-09-24 15:24 ` [Buildroot] [PATCH v8 1/1] package/dpdk: add 24.07 Vincent Jardin @ 2024-10-02 21:58 ` Julien Olivain 2024-10-15 23:30 ` Vincent Jardin 2024-10-23 19:23 ` Julien Olivain 1 sibling, 1 reply; 31+ messages in thread From: Julien Olivain @ 2024-10-02 21:58 UTC (permalink / raw) To: Vincent Jardin Cc: Arnout Vandecappelle, Yann Morin, Thomas Petazzoni, buildroot Hi Vincent, All, Thanks for this update! To me, this patch can be merged as is. I am able to run successfully a basic runtime test, at: https://gitlab.com/jolivain/buildroot/-/jobs/7979322138 Once merged, I'll propose the runtime test. We will be able to improve dpdk cross compilation support with meson later. On 24/09/2024 17:24, Vincent Jardin wrote: > This commit adds the integration of the Data Plane Development Kit > (DPDK). > > This commit does not enforce the use of UIO or VFIO kernel frameworks, > as DPDK's architecture supports userland memory mappings that do not > require > these technologies. By maintaining this flexibility, DPDK can operate > with > a broader range of hardware and software configurations. > > Only the little endian targets are properly supported by DPDK. Big > endian > was supported, mostly on Power8, but it has not been used for a while > and > IBM is not strongly pushing any tests. Should big endian be supported > again, DPDK community will be welcoming any contributions. > > Notes about license: > > DPDK was released with the BSD-3-Clause license. > > One network driver, the Google Virtual Ethernet (GVE) include files > under the MIT license. See [1] and [2]. > > There used to be GPL-2.0-only licensed kernel modules, but they got > removed in previous versions [K] [KNI], so Buildroot won't be used to > compile > the GPL-2.0-only code. > > There are also 2 files in "lib/eal/windows" under other licenses > (namely BSD-2-Clause, ISC and MIT) but they are parts of the > Environment > Abstraction Library (EAL) for Microsoft Windows OS, it means they are > not used when compiling for the Linux targets of Buildroot. > > The list of DPDK license exceptions is maintained at [2]. > > Add configuration options to enable DPDK examples and tests. > > [1] https://git.dpdk.org/dpdk/tree/doc/guides/nics/gve.rst?h=v24.07 > [2] https://git.dpdk.org/dpdk/tree/license/exceptions.txt?h=v24.07 > [KNI] > https://git.dpdk.org/dpdk/commit/?id=f78c100bc87119c6a94130a6689d773afdaa9d98 > [UIO] > https://git.dpdk.org/dpdk/commit/?id=56bb5841fd0608989101d933f091852a3126b4fe > [K] > https://git.dpdk.org/dpdk-kmods/commit/?id=d16f3b44987be181b6effee139558a084eaf9f8c > > Signed-off-by: Vincent Jardin <vjardin@free.fr> > Suggested-by: Julien Olivain <ju.o@free.fr> Tested-by: Julien Olivain <ju.o@free.fr> > Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> > Reviewed-by: Julien Olivain <ju.o@free.fr> > Reviewed-by: Yann Morin <yann.morin.1998@free.fr> > Reviewed-by: Arnout Vandecappelle <arnout@mind.de> > --- > DEVELOPERS | 3 + > package/Config.in | 1 + > ...-cpu_instruction_set-from-meson-opti.patch | 35 +++++++ > package/dpdk/0010-Fix-aarch64-build.patch | 43 +++++++++ > package/dpdk/Config.in | 54 +++++++++++ > package/dpdk/dpdk.hash | 6 ++ > package/dpdk/dpdk.mk | 95 +++++++++++++++++++ > 7 files changed, 237 insertions(+) > create mode 100644 > package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > create mode 100644 package/dpdk/0010-Fix-aarch64-build.patch > create mode 100644 package/dpdk/Config.in > create mode 100644 package/dpdk/dpdk.hash > create mode 100644 package/dpdk/dpdk.mk > > diff --git a/DEVELOPERS b/DEVELOPERS > index 426590d5c5..7c3d858e40 100644 > --- a/DEVELOPERS > +++ b/DEVELOPERS > @@ -3238,6 +3238,9 @@ F: package/rtl8822cs/ > N: Victor Huesca <victor.huesca@bootlin.com> > F: support/testing/tests/core/test_root_password.py > > +N: Vincent Jardin <vjardin@free.fr> > +F: package/dpdk/ > + > N: Vincent Prince <vincent.prince.fr@gmail.com> > F: package/nss-myhostname/ > F: package/utp_com/ > diff --git a/package/Config.in b/package/Config.in > index 211080345a..90e521330b 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -1988,6 +1988,7 @@ menu "Networking" > source "package/daq3/Config.in" > source "package/davici/Config.in" > source "package/dht/Config.in" > + source "package/dpdk/Config.in" > source "package/enet/Config.in" > source "package/filemq/Config.in" > source "package/fmlib/Config.in" > diff --git > a/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > new file mode 100644 > index 0000000000..c1bfb86448 > --- /dev/null > +++ > b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > @@ -0,0 +1,35 @@ > +From 121e5d019f0bb6dec0ace2b361611edd10fc8ff8 Mon Sep 17 00:00:00 2001 > +From: Lee Chee Yang <chee.yang.lee@intel.com> > +Date: Wed, 6 Dec 2023 16:58:10 +0800 > +Subject: [PATCH] config/meson: get cpu_instruction_set from meson > option > + > +Workaround error: > +| ../git/config/meson.build:178:8: ERROR: Problem encountered: > Compiler > +does not support "x86_64" arch flag. > + > +Upstream-Status: Inappropriate [ yocto specific to set > cpu_instruction_set ] > + > +Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> > +Links: > https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > +Upstream: Not applicable, see Yocto's status, above > +Signed-off-by: Vincent Jardin <vjardin@free.fr> > +--- > + config/meson.build | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/config/meson.build b/config/meson.build > +index a9ccd56deb..f310c7adf6 100644 > +--- a/config/meson.build > ++++ b/config/meson.build > +@@ -105,7 +105,7 @@ platform = get_option('platform') > + > + # set the cpu_instruction_set and cflags for it > + if meson.is_cross_build() > +- cpu_instruction_set = host_machine.cpu() > ++ cpu_instruction_set = get_option('cpu_instruction_set') > + else > + cpu_instruction_set = get_option('cpu_instruction_set') > + machine = get_option('machine') > +-- > +2.37.3 > + > diff --git a/package/dpdk/0010-Fix-aarch64-build.patch > b/package/dpdk/0010-Fix-aarch64-build.patch > new file mode 100644 > index 0000000000..55c31c3647 > --- /dev/null > +++ b/package/dpdk/0010-Fix-aarch64-build.patch > @@ -0,0 +1,43 @@ > +From c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb Mon Sep 17 00:00:00 2001 > +From: Julien Olivain <ju.o@free.fr> > +Date: Sun, 8 Sep 2024 13:20:14 +0200 > +Subject: [PATCH] Fix aarch64 build > + > +The condition on which DPDK meson skip the -march detection for > Aarch64 > +seems incorrect or incomplete. This patch changes the condition in > order > +to better match the comment (that the options are decided in > +config/arm/meson.build). It actually test for the architecture name. > + > +While this patch might need some discussion with DPDK maintainers to > +cover all situations, it can still be useful here in Buildroot, as it > +fixes the Aarch64 cross compilation. > + > +Signed-off-by: Julien Olivain <ju.o@free.fr> > +Signed-off-by: Vincent Jardin <vjardin@free.fr> > +Upstream: to be proposed https://patches.dpdk.org/project/dpdk/list/ > +Links: cherry-picked from > https://github.com/jolivain/dpdk/commit/c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb > +--- > + config/meson.build | 6 +++--- > + 1 file changed, 3 insertions(+), 3 deletions(-) > + > +diff --git a/config/meson.build b/config/meson.build > +index 8c8b019c25..ea48e55ce3 100644 > +--- a/config/meson.build > ++++ b/config/meson.build > +@@ -176,10 +176,10 @@ if not is_ms_compiler > + else > + machine_args += '-march=' + cpu_instruction_set > + # arm manages generic/auto config in config/arm/meson.build > +- if cpu_instruction_set != 'generic' and cpu_instruction_set > != 'auto' > +- compiler_arch_support = cc.has_argument('-march=' + > cpu_instruction_set) > +- else > ++ if host_machine.cpu_family().startswith('aarch') > + compiler_arch_support = true > ++ else > ++ compiler_arch_support = cc.has_argument('-march=' + > cpu_instruction_set) > + endif > + endif > + if not compiler_arch_support > +-- > +2.46.0 > + > diff --git a/package/dpdk/Config.in b/package/dpdk/Config.in > new file mode 100644 > index 0000000000..328129ea65 > --- /dev/null > +++ b/package/dpdk/Config.in > @@ -0,0 +1,54 @@ > +config BR2_PACKAGE_DPDK_ARCH_SUPPORTS > + bool > + # DPDK can be used for the following little endian architecture > + default y if BR2_aarch64 > + # DPDK requires SSE4.2 for x86_64 since v17.08 > + default y if BR2_x86_64 && BR2_X86_CPU_HAS_SSE42 > + > +config BR2_PACKAGE_DPDK > + bool "dpdk" > + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS > + depends on BR2_TOOLCHAIN_HAS_THREADS # DPDK design > + depends on BR2_USE_MMU # pthread() memory mappings > + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h > + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 > + depends on BR2_TOOLCHAIN_USES_GLIBC > + select BR2_PACKAGE_HOST_PYTHON3 # host-python-pyelftools > + help > + DPDK (Data Plane Development Kit) is a set of libraries > + and drivers for fast packet processing. > + > + http://dpdk.org/ > + > + Optional but recommended kernel configurations: > + - CONFIG_VFIO_IOMMU_TYPE1 > + - CONFIG_VFIO_VIRQFD > + - CONFIG_VFIO > + - CONFIG_VFIO_NOIOMMU > + - CONFIG_VFIO_PCI > + - CONFIG_VFIO_PCI_MMAP > + - CONFIG_HUGETLBFS > + - CONFIG_HUGETLB_PAGE > + - CONFIG_PROC_PAGE_MONITOR > + > + For x86 only, the following can also be useful: > + - CONFIG_HPET > + - CONFIG_HPET_MMAP > + > +if BR2_PACKAGE_DPDK > + > +config BR2_PACKAGE_DPDK_EXAMPLES > + bool "Install examples" > + > +config BR2_PACKAGE_DPDK_TESTS > + bool "Install tests" > + > +endif > + > +comment "DPDK needs a toolchain w/ dynamic library, threads, wchar, > kernel headers >= 4.19" > + depends on BR2_USE_MMU # pthread() memory mappings > + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS > + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ > + !BR2_TOOLCHAIN_USES_GLIBC || \ > + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \ > + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 > diff --git a/package/dpdk/dpdk.hash b/package/dpdk/dpdk.hash > new file mode 100644 > index 0000000000..27c06476e7 > --- /dev/null > +++ b/package/dpdk/dpdk.hash > @@ -0,0 +1,6 @@ > +# Locally computed > +sha256 > 9944f7e5f268e7ac9b4193e2cd54ef6d98f6e1d7dddc967c77ae4f6616d6fbbd > dpdk-24.07.tar.xz > +sha256 > 9acc4bc871a4742550158e3696dcb381953172ef808d04ca248184f9f6322712 > license/bsd-3-clause.txt > +sha256 > e19808bccd90c238fac06da2fc3683e094c64f7ba647e9d86f03a98cf5f2ce05 > license/exceptions.txt > +sha256 > 6c54c4d44faf3cba829b3d0c21c6955953e758767018fd7244f809b01d4f4845 > license/mit.txt > +sha256 > cae178052c96959741acb7f00634a09a8294e6cafb5ad53e158d63e3510875ab > license/README > diff --git a/package/dpdk/dpdk.mk b/package/dpdk/dpdk.mk > new file mode 100644 > index 0000000000..b685e12408 > --- /dev/null > +++ b/package/dpdk/dpdk.mk > @@ -0,0 +1,95 @@ > +################################################################################ > +# > +# dpdk > +# > +################################################################################ > + > +DPDK_VERSION = 24.07 > +DPDK_SOURCE = dpdk-$(DPDK_VERSION).tar.xz > +DPDK_SITE = https://fast.dpdk.org/rel > +DPDK_LICENSE = \ > + BSD-3-Clause, \ > + MIT > + > +# Only the Windows target has the 2 following licenses: > +# - license/bsd-2-clause.txt > +# - license/isc.txt > +# which is related to a Windows getopt.[ch] compatibility layer. > +# Since Buildroot is not used for Windows target, it is not listed > +# here. > +# > +# All the userland files of DPDK have dual licences BSD or GPL/LGPL > +# Since the Linux kernel modules had been removed from the DPDK, there > +# is no GPL only code into the DPDK anymore. > +# The usage of DPDK with Buildroot is for userland only, it means > +# that for the dual licenced files, BSD clause is used but not the > +# following ones: > +# - license/gpl-2.0.txt > +# - license/lgpl-2.1.txt > +# See the DPDK's license/README for more details. > +# > +# The legacy and historical license of the DPDK is BSD-3-clause. > +DPDK_LICENSE_FILES = \ > + license/README \ > + license/bsd-3-clause.txt \ > + license/exceptions.txt \ > + license/mit.txt > + > +DPDK_DEPENDENCIES = \ > + host-pkgconf \ > + host-python-pyelftools > + > +ifeq ($(BR2_PACKAGE_DPDK_EXAMPLES),y) > +DPDK_CONF_OPTS += -Dexamples=all > +else > +DPDK_CONF_OPTS += -Dexamples= > +endif > + > +ifeq ($(BR2_PACKAGE_DPDK_TESTS),y) > +DPDK_CONF_OPTS += -Dtests=true > +else > +DPDK_CONF_OPTS += -Dtests=false > +endif > + > +ifeq ($(BR2_PACKAGE_LIBBSD),y) > +DPDK_DEPENDENCIES += libbsd > +endif > + > +ifeq ($(BR2_PACKAGE_JANSSON),y) > +DPDK_DEPENDENCIES += jansson > +endif > + > +ifeq ($(BR2_PACKAGE_LIBPCAP),y) > +DPDK_DEPENDENCIES += libpcap > +endif > + > +ifeq ($(BR2_PACKAGE_ZLIB),y) > +DPDK_DEPENDENCIES += zlib > +endif > + > +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y) > +DPDK_DEPENDENCIES += libexecinfo > +endif > + > +ifeq ($(BR2_PACKAGE_NUMACTL),y) > +DPDK_DEPENDENCIES += numactl > +endif > + > +ifeq ($(BR2_PACKAGE_LIBARCHIVE),y) > +DPDK_DEPENDENCIES += libarchive > +endif > + > +ifeq ($(BR2_PACKAGE_LIBBPF),y) > +DPDK_DEPENDENCIES += libbpf > +endif > + > +ifeq ($(BR2_PACKAGE_RDMA_CORE),y) > +DPDK_DEPENDENCIES += rdma-core > +endif > + > +# DPDK's meson shall need to be clean'd, hack here along the enclosed > patch > +DPDK_CONF_OPTS += -Dcpu_instruction_set=$(BR2_GCC_TARGET_ARCH) > +# Keep the following, even if not mandatory, until the removal of the > patch > +DPDK_MESON_EXTRA_PROPERTIES += platform='generic' > + > +$(eval $(meson-package)) > -- > 2.46.1 Best regards, Julien. _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [Buildroot] [PATCH v8 1/1] package/dpdk: add 24.07 2024-10-02 21:58 ` Julien Olivain @ 2024-10-15 23:30 ` Vincent Jardin 0 siblings, 0 replies; 31+ messages in thread From: Vincent Jardin @ 2024-10-15 23:30 UTC (permalink / raw) To: buildroot Cc: Julien Olivain, Arnout Vandecappelle, Yann Morin, Thomas Petazzoni [-- Attachment #1.1: Type: text/plain, Size: 459 bytes --] Hi, This patch seems to be OK for everyone, I understand that many maintainers can be very busy, but since many reviews are done, what does prevent its merge ? Thanks, Vincent Le 2 octobre 2024 23:58:36 Julien Olivain <ju.o@free.fr> a écrit : > Hi Vincent, All, > > Thanks for this update! > > To me, this patch can be merged as is. I am able to run successfully > a basic runtime test, at: > https://gitlab.com/jolivain/buildroot/-/jobs/7979322138 [-- Attachment #1.2: Type: text/html, Size: 1244 bytes --] [-- Attachment #2: Type: text/plain, Size: 150 bytes --] _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [Buildroot] [PATCH v8 1/1] package/dpdk: add 24.07 2024-09-24 15:24 ` [Buildroot] [PATCH v8 1/1] package/dpdk: add 24.07 Vincent Jardin 2024-10-02 21:58 ` Julien Olivain @ 2024-10-23 19:23 ` Julien Olivain 1 sibling, 0 replies; 31+ messages in thread From: Julien Olivain @ 2024-10-23 19:23 UTC (permalink / raw) To: Vincent Jardin Cc: buildroot, Thomas Petazzoni, Yann Morin, Arnout Vandecappelle Hi Vincent, All, On 24/09/2024 17:24, Vincent Jardin wrote: > This commit adds the integration of the Data Plane Development Kit > (DPDK). > > This commit does not enforce the use of UIO or VFIO kernel frameworks, > as DPDK's architecture supports userland memory mappings that do not > require > these technologies. By maintaining this flexibility, DPDK can operate > with > a broader range of hardware and software configurations. > > Only the little endian targets are properly supported by DPDK. Big > endian > was supported, mostly on Power8, but it has not been used for a while > and > IBM is not strongly pushing any tests. Should big endian be supported > again, DPDK community will be welcoming any contributions. > > Notes about license: > > DPDK was released with the BSD-3-Clause license. > > One network driver, the Google Virtual Ethernet (GVE) include files > under the MIT license. See [1] and [2]. > > There used to be GPL-2.0-only licensed kernel modules, but they got > removed in previous versions [K] [KNI], so Buildroot won't be used to > compile > the GPL-2.0-only code. > > There are also 2 files in "lib/eal/windows" under other licenses > (namely BSD-2-Clause, ISC and MIT) but they are parts of the > Environment > Abstraction Library (EAL) for Microsoft Windows OS, it means they are > not used when compiling for the Linux targets of Buildroot. > > The list of DPDK license exceptions is maintained at [2]. > > Add configuration options to enable DPDK examples and tests. > > [1] https://git.dpdk.org/dpdk/tree/doc/guides/nics/gve.rst?h=v24.07 > [2] https://git.dpdk.org/dpdk/tree/license/exceptions.txt?h=v24.07 > [KNI] > https://git.dpdk.org/dpdk/commit/?id=f78c100bc87119c6a94130a6689d773afdaa9d98 > [UIO] > https://git.dpdk.org/dpdk/commit/?id=56bb5841fd0608989101d933f091852a3126b4fe > [K] > https://git.dpdk.org/dpdk-kmods/commit/?id=d16f3b44987be181b6effee139558a084eaf9f8c > > Signed-off-by: Vincent Jardin <vjardin@free.fr> > Suggested-by: Julien Olivain <ju.o@free.fr> > Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> > Reviewed-by: Julien Olivain <ju.o@free.fr> > Reviewed-by: Yann Morin <yann.morin.1998@free.fr> > Reviewed-by: Arnout Vandecappelle <arnout@mind.de> I applied this patch to master. Thanks for the patch, your patience and perseverance! I'll post a runtime test for that package soon. Best regards, Julien. > --- > DEVELOPERS | 3 + > package/Config.in | 1 + > ...-cpu_instruction_set-from-meson-opti.patch | 35 +++++++ > package/dpdk/0010-Fix-aarch64-build.patch | 43 +++++++++ > package/dpdk/Config.in | 54 +++++++++++ > package/dpdk/dpdk.hash | 6 ++ > package/dpdk/dpdk.mk | 95 +++++++++++++++++++ > 7 files changed, 237 insertions(+) > create mode 100644 > package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > create mode 100644 package/dpdk/0010-Fix-aarch64-build.patch > create mode 100644 package/dpdk/Config.in > create mode 100644 package/dpdk/dpdk.hash > create mode 100644 package/dpdk/dpdk.mk > > diff --git a/DEVELOPERS b/DEVELOPERS > index 426590d5c5..7c3d858e40 100644 > --- a/DEVELOPERS > +++ b/DEVELOPERS > @@ -3238,6 +3238,9 @@ F: package/rtl8822cs/ > N: Victor Huesca <victor.huesca@bootlin.com> > F: support/testing/tests/core/test_root_password.py > > +N: Vincent Jardin <vjardin@free.fr> > +F: package/dpdk/ > + > N: Vincent Prince <vincent.prince.fr@gmail.com> > F: package/nss-myhostname/ > F: package/utp_com/ > diff --git a/package/Config.in b/package/Config.in > index 211080345a..90e521330b 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -1988,6 +1988,7 @@ menu "Networking" > source "package/daq3/Config.in" > source "package/davici/Config.in" > source "package/dht/Config.in" > + source "package/dpdk/Config.in" > source "package/enet/Config.in" > source "package/filemq/Config.in" > source "package/fmlib/Config.in" > diff --git > a/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > new file mode 100644 > index 0000000000..c1bfb86448 > --- /dev/null > +++ > b/package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > @@ -0,0 +1,35 @@ > +From 121e5d019f0bb6dec0ace2b361611edd10fc8ff8 Mon Sep 17 00:00:00 2001 > +From: Lee Chee Yang <chee.yang.lee@intel.com> > +Date: Wed, 6 Dec 2023 16:58:10 +0800 > +Subject: [PATCH] config/meson: get cpu_instruction_set from meson > option > + > +Workaround error: > +| ../git/config/meson.build:178:8: ERROR: Problem encountered: > Compiler > +does not support "x86_64" arch flag. > + > +Upstream-Status: Inappropriate [ yocto specific to set > cpu_instruction_set ] > + > +Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> > +Links: > https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > +Upstream: Not applicable, see Yocto's status, above > +Signed-off-by: Vincent Jardin <vjardin@free.fr> > +--- > + config/meson.build | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/config/meson.build b/config/meson.build > +index a9ccd56deb..f310c7adf6 100644 > +--- a/config/meson.build > ++++ b/config/meson.build > +@@ -105,7 +105,7 @@ platform = get_option('platform') > + > + # set the cpu_instruction_set and cflags for it > + if meson.is_cross_build() > +- cpu_instruction_set = host_machine.cpu() > ++ cpu_instruction_set = get_option('cpu_instruction_set') > + else > + cpu_instruction_set = get_option('cpu_instruction_set') > + machine = get_option('machine') > +-- > +2.37.3 > + > diff --git a/package/dpdk/0010-Fix-aarch64-build.patch > b/package/dpdk/0010-Fix-aarch64-build.patch > new file mode 100644 > index 0000000000..55c31c3647 > --- /dev/null > +++ b/package/dpdk/0010-Fix-aarch64-build.patch > @@ -0,0 +1,43 @@ > +From c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb Mon Sep 17 00:00:00 2001 > +From: Julien Olivain <ju.o@free.fr> > +Date: Sun, 8 Sep 2024 13:20:14 +0200 > +Subject: [PATCH] Fix aarch64 build > + > +The condition on which DPDK meson skip the -march detection for > Aarch64 > +seems incorrect or incomplete. This patch changes the condition in > order > +to better match the comment (that the options are decided in > +config/arm/meson.build). It actually test for the architecture name. > + > +While this patch might need some discussion with DPDK maintainers to > +cover all situations, it can still be useful here in Buildroot, as it > +fixes the Aarch64 cross compilation. > + > +Signed-off-by: Julien Olivain <ju.o@free.fr> > +Signed-off-by: Vincent Jardin <vjardin@free.fr> > +Upstream: to be proposed https://patches.dpdk.org/project/dpdk/list/ > +Links: cherry-picked from > https://github.com/jolivain/dpdk/commit/c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb > +--- > + config/meson.build | 6 +++--- > + 1 file changed, 3 insertions(+), 3 deletions(-) > + > +diff --git a/config/meson.build b/config/meson.build > +index 8c8b019c25..ea48e55ce3 100644 > +--- a/config/meson.build > ++++ b/config/meson.build > +@@ -176,10 +176,10 @@ if not is_ms_compiler > + else > + machine_args += '-march=' + cpu_instruction_set > + # arm manages generic/auto config in config/arm/meson.build > +- if cpu_instruction_set != 'generic' and cpu_instruction_set > != 'auto' > +- compiler_arch_support = cc.has_argument('-march=' + > cpu_instruction_set) > +- else > ++ if host_machine.cpu_family().startswith('aarch') > + compiler_arch_support = true > ++ else > ++ compiler_arch_support = cc.has_argument('-march=' + > cpu_instruction_set) > + endif > + endif > + if not compiler_arch_support > +-- > +2.46.0 > + > diff --git a/package/dpdk/Config.in b/package/dpdk/Config.in > new file mode 100644 > index 0000000000..328129ea65 > --- /dev/null > +++ b/package/dpdk/Config.in > @@ -0,0 +1,54 @@ > +config BR2_PACKAGE_DPDK_ARCH_SUPPORTS > + bool > + # DPDK can be used for the following little endian architecture > + default y if BR2_aarch64 > + # DPDK requires SSE4.2 for x86_64 since v17.08 > + default y if BR2_x86_64 && BR2_X86_CPU_HAS_SSE42 > + > +config BR2_PACKAGE_DPDK > + bool "dpdk" > + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS > + depends on BR2_TOOLCHAIN_HAS_THREADS # DPDK design > + depends on BR2_USE_MMU # pthread() memory mappings > + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h > + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 > + depends on BR2_TOOLCHAIN_USES_GLIBC > + select BR2_PACKAGE_HOST_PYTHON3 # host-python-pyelftools > + help > + DPDK (Data Plane Development Kit) is a set of libraries > + and drivers for fast packet processing. > + > + http://dpdk.org/ > + > + Optional but recommended kernel configurations: > + - CONFIG_VFIO_IOMMU_TYPE1 > + - CONFIG_VFIO_VIRQFD > + - CONFIG_VFIO > + - CONFIG_VFIO_NOIOMMU > + - CONFIG_VFIO_PCI > + - CONFIG_VFIO_PCI_MMAP > + - CONFIG_HUGETLBFS > + - CONFIG_HUGETLB_PAGE > + - CONFIG_PROC_PAGE_MONITOR > + > + For x86 only, the following can also be useful: > + - CONFIG_HPET > + - CONFIG_HPET_MMAP > + > +if BR2_PACKAGE_DPDK > + > +config BR2_PACKAGE_DPDK_EXAMPLES > + bool "Install examples" > + > +config BR2_PACKAGE_DPDK_TESTS > + bool "Install tests" > + > +endif > + > +comment "DPDK needs a toolchain w/ dynamic library, threads, wchar, > kernel headers >= 4.19" > + depends on BR2_USE_MMU # pthread() memory mappings > + depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS > + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ > + !BR2_TOOLCHAIN_USES_GLIBC || \ > + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \ > + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19 > diff --git a/package/dpdk/dpdk.hash b/package/dpdk/dpdk.hash > new file mode 100644 > index 0000000000..27c06476e7 > --- /dev/null > +++ b/package/dpdk/dpdk.hash > @@ -0,0 +1,6 @@ > +# Locally computed > +sha256 > 9944f7e5f268e7ac9b4193e2cd54ef6d98f6e1d7dddc967c77ae4f6616d6fbbd > dpdk-24.07.tar.xz > +sha256 > 9acc4bc871a4742550158e3696dcb381953172ef808d04ca248184f9f6322712 > license/bsd-3-clause.txt > +sha256 > e19808bccd90c238fac06da2fc3683e094c64f7ba647e9d86f03a98cf5f2ce05 > license/exceptions.txt > +sha256 > 6c54c4d44faf3cba829b3d0c21c6955953e758767018fd7244f809b01d4f4845 > license/mit.txt > +sha256 > cae178052c96959741acb7f00634a09a8294e6cafb5ad53e158d63e3510875ab > license/README > diff --git a/package/dpdk/dpdk.mk b/package/dpdk/dpdk.mk > new file mode 100644 > index 0000000000..b685e12408 > --- /dev/null > +++ b/package/dpdk/dpdk.mk > @@ -0,0 +1,95 @@ > +################################################################################ > +# > +# dpdk > +# > +################################################################################ > + > +DPDK_VERSION = 24.07 > +DPDK_SOURCE = dpdk-$(DPDK_VERSION).tar.xz > +DPDK_SITE = https://fast.dpdk.org/rel > +DPDK_LICENSE = \ > + BSD-3-Clause, \ > + MIT > + > +# Only the Windows target has the 2 following licenses: > +# - license/bsd-2-clause.txt > +# - license/isc.txt > +# which is related to a Windows getopt.[ch] compatibility layer. > +# Since Buildroot is not used for Windows target, it is not listed > +# here. > +# > +# All the userland files of DPDK have dual licences BSD or GPL/LGPL > +# Since the Linux kernel modules had been removed from the DPDK, there > +# is no GPL only code into the DPDK anymore. > +# The usage of DPDK with Buildroot is for userland only, it means > +# that for the dual licenced files, BSD clause is used but not the > +# following ones: > +# - license/gpl-2.0.txt > +# - license/lgpl-2.1.txt > +# See the DPDK's license/README for more details. > +# > +# The legacy and historical license of the DPDK is BSD-3-clause. > +DPDK_LICENSE_FILES = \ > + license/README \ > + license/bsd-3-clause.txt \ > + license/exceptions.txt \ > + license/mit.txt > + > +DPDK_DEPENDENCIES = \ > + host-pkgconf \ > + host-python-pyelftools > + > +ifeq ($(BR2_PACKAGE_DPDK_EXAMPLES),y) > +DPDK_CONF_OPTS += -Dexamples=all > +else > +DPDK_CONF_OPTS += -Dexamples= > +endif > + > +ifeq ($(BR2_PACKAGE_DPDK_TESTS),y) > +DPDK_CONF_OPTS += -Dtests=true > +else > +DPDK_CONF_OPTS += -Dtests=false > +endif > + > +ifeq ($(BR2_PACKAGE_LIBBSD),y) > +DPDK_DEPENDENCIES += libbsd > +endif > + > +ifeq ($(BR2_PACKAGE_JANSSON),y) > +DPDK_DEPENDENCIES += jansson > +endif > + > +ifeq ($(BR2_PACKAGE_LIBPCAP),y) > +DPDK_DEPENDENCIES += libpcap > +endif > + > +ifeq ($(BR2_PACKAGE_ZLIB),y) > +DPDK_DEPENDENCIES += zlib > +endif > + > +ifeq ($(BR2_PACKAGE_LIBEXECINFO),y) > +DPDK_DEPENDENCIES += libexecinfo > +endif > + > +ifeq ($(BR2_PACKAGE_NUMACTL),y) > +DPDK_DEPENDENCIES += numactl > +endif > + > +ifeq ($(BR2_PACKAGE_LIBARCHIVE),y) > +DPDK_DEPENDENCIES += libarchive > +endif > + > +ifeq ($(BR2_PACKAGE_LIBBPF),y) > +DPDK_DEPENDENCIES += libbpf > +endif > + > +ifeq ($(BR2_PACKAGE_RDMA_CORE),y) > +DPDK_DEPENDENCIES += rdma-core > +endif > + > +# DPDK's meson shall need to be clean'd, hack here along the enclosed > patch > +DPDK_CONF_OPTS += -Dcpu_instruction_set=$(BR2_GCC_TARGET_ARCH) > +# Keep the following, even if not mandatory, until the removal of the > patch > +DPDK_MESON_EXTRA_PROPERTIES += platform='generic' > + > +$(eval $(meson-package)) > -- > 2.46.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [Buildroot] [PATCH v8 0/1] add DPDK libraries 2024-09-24 15:24 ` [Buildroot] [PATCH v8 0/1] add DPDK libraries Vincent Jardin 2024-09-24 15:24 ` [Buildroot] [PATCH v8 1/1] package/dpdk: add 24.07 Vincent Jardin @ 2024-09-30 13:41 ` Vincent Jardin 1 sibling, 0 replies; 31+ messages in thread From: Vincent Jardin @ 2024-09-30 13:41 UTC (permalink / raw) To: buildroot; +Cc: ju.o, yann.morin.1998, thomas.petazzoni Please, any comments ? On Tue, Sep 24, 2024 at 05:24:29PM UTC, Vincent Jardin wrote: > v7 -> v8 changes: > - focus glibc > - drop any licenses which do not apply to the Buildroot's builds > > v6 -> v7 changes: > - shorter commit log, include comments from Yann Morin > - update mk's LICENSE > > v5 -> v6 changes: > - update comments on DPDK patch to compile aarch64 with Buildroot > > v4 -> v5 changes: > - fix test-pkg dpdk > - fix make legal-info > - add builds for DPDK tests and examples > - support only aarch64/ARM64 and x86_64 > - notes: logs of checks at https://github.com/vjardin/br_dpdk/actions/runs/10767364662/job/29854551507 > - thans to Julien Olivain for many reviews and contributions > > v3 -> v4 changes: > - proof readings (dpdk/DPDK, git.dpdk.org instead of github) > - gcc 4.9 needed > > v2 -> v3 changes: > - include the comments from Julien Olivain > - refine the licenses > - support little endian targets only > - many build dependencies if the packages are selected > > v1 -> v2 changes: > - include the comments from Thomas > - add a meson patch for the DPDK that I forgot to include > This patch has been aligned with Yocto so we can share the same > feedbacks. I'll upstream it on DPDK too. > > Vincent Jardin (1): > package/dpdk: add 24.07 > > DEVELOPERS | 3 + > package/Config.in | 1 + > ...-cpu_instruction_set-from-meson-opti.patch | 35 +++++++ > package/dpdk/0010-Fix-aarch64-build.patch | 43 +++++++++ > package/dpdk/Config.in | 54 +++++++++++ > package/dpdk/dpdk.hash | 6 ++ > package/dpdk/dpdk.mk | 95 +++++++++++++++++++ > 7 files changed, 237 insertions(+) > create mode 100644 package/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch > create mode 100644 package/dpdk/0010-Fix-aarch64-build.patch > create mode 100644 package/dpdk/Config.in > create mode 100644 package/dpdk/dpdk.hash > create mode 100644 package/dpdk/dpdk.mk > > -- > 2.46.1 > _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [Buildroot] [PATCH v4 0/1] add DPDK libraries 2024-08-28 10:21 ` [Buildroot] [PATCH v4 0/1] add DPDK libraries Vincent Jardin 2024-08-28 10:21 ` [Buildroot] [PATCH v4 1/1] package/dpdk: add 24.07 Vincent Jardin @ 2024-09-04 19:44 ` Vincent Jardin 1 sibling, 0 replies; 31+ messages in thread From: Vincent Jardin @ 2024-09-04 19:44 UTC (permalink / raw) To: buildroot; +Cc: Julien Olivain, Thomas Petazzoni [-- Attachment #1.1: Type: text/plain, Size: 253 bytes --] Hi, Le 28 août 2024 12:21:12 Vincent Jardin <vjardin@free.fr> a écrit : > v3 -> v4 changes: > - proof readings (dpdk/DPDK, git.dpdk.org instead of github) > - gcc 4.9 needed > Is this v4 serie ok ? What's next have it merged ? Thanks, Vincent [-- Attachment #1.2: Type: text/html, Size: 1133 bytes --] [-- Attachment #2: Type: text/plain, Size: 150 bytes --] _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/dpdk: add 24.03 2024-08-17 8:29 ` Thomas Petazzoni via buildroot 2024-08-19 22:11 ` [Buildroot] [PATCH v2 0/1] add DPDK libraries Vincent Jardin 2024-08-19 22:11 ` [Buildroot] [PATCH v2 1/1] package/dpdk: add 24.03 Vincent Jardin @ 2024-08-19 22:20 ` Vincent Jardin 2 siblings, 0 replies; 31+ messages in thread From: Vincent Jardin @ 2024-08-19 22:20 UTC (permalink / raw) To: Thomas Petazzoni; +Cc: Eric Le Bihan, buildroot [-- Attachment #1.1: Type: text/plain, Size: 1109 bytes --] Hi Thomas, Le 17 août 2024 10:29:25 Thomas Petazzoni <thomas.petazzoni@bootlin.com> a écrit : > Hello Vincent, > > Thanks for your patch, nice to see a Buildroot patch from you! See some > comments below. You welcome ;) You did help me to bootstrap, now I can follow up with some contributions. > > > On Thu, 15 Aug 2024 23:26:58 +0200 > Vincent Jardin <vjardin@free.fr> wrote: > >> Importantly, this commit does not enforce the use of UIO or VFIO >> kernel frameworks, as DPDK's architecture supports userland memory >> mappings that do not require these technologies. By maintaining this >> flexibility, DPDK can operate with a broader range of hardware and >> software configurations, making it suitable for diverse Buildroot's >> deployment scenarios. > > Do you intend to follow-up with additional patches supporting the other > use-cases? Yes I will but first I'd like to iterate with some early steps. See the v2. Once merge, I'll keep adding more cases. Meanwhile, there is a build CI on github for some early checks: https://github.com/vjardin/br_dpdk/actions Best regards, Vincent [-- Attachment #1.2: Type: text/html, Size: 2621 bytes --] [-- Attachment #2: Type: text/plain, Size: 150 bytes --] _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 31+ messages in thread
end of thread, other threads:[~2024-10-23 19:24 UTC | newest] Thread overview: 31+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-08-15 21:26 [Buildroot] [PATCH 1/1] package/dpdk: add 24.03 Vincent Jardin 2024-08-17 8:29 ` Thomas Petazzoni via buildroot 2024-08-19 22:11 ` [Buildroot] [PATCH v2 0/1] add DPDK libraries Vincent Jardin 2024-08-19 22:11 ` [Buildroot] [PATCH v2 1/1] package/dpdk: add 24.03 Vincent Jardin 2024-08-25 21:00 ` Julien Olivain 2024-08-27 1:12 ` Vincent Jardin 2024-08-27 0:38 ` [Buildroot] [PATCH v3 0/1] add DPDK libraries Vincent Jardin 2024-08-27 0:38 ` [Buildroot] [PATCH v3 1/1] package/dpdk: add 24.07 Vincent Jardin 2024-08-28 10:21 ` [Buildroot] [PATCH v4 0/1] add DPDK libraries Vincent Jardin 2024-08-28 10:21 ` [Buildroot] [PATCH v4 1/1] package/dpdk: add 24.07 Vincent Jardin 2024-09-06 22:33 ` Julien Olivain 2024-09-07 6:44 ` Vincent Jardin 2024-09-09 12:58 ` [Buildroot] [PATCH v5 0/1] add DPDK libraries Vincent Jardin 2024-09-09 12:58 ` [Buildroot] [PATCH v5 1/1] package/dpdk: add 24.07 Vincent Jardin 2024-09-14 19:56 ` Julien Olivain 2024-09-15 14:30 ` [Buildroot] [PATCH v6 0/1] add DPDK libraries Vincent Jardin 2024-09-15 14:30 ` [Buildroot] [PATCH v6 1/1] package/dpdk: add 24.07 Vincent Jardin 2024-09-15 17:51 ` Julien Olivain 2024-09-15 22:30 ` Yann E. MORIN 2024-09-23 17:20 ` [Buildroot] [PATCH v7 0/1] add DPDK libraries Vincent Jardin 2024-09-23 17:20 ` [Buildroot] [PATCH v7 1/1] package/dpdk: add 24.07 Vincent Jardin 2024-09-23 19:10 ` Arnout Vandecappelle via buildroot 2024-09-24 14:53 ` Vincent Jardin 2024-09-24 15:24 ` [Buildroot] [PATCH v8 0/1] add DPDK libraries Vincent Jardin 2024-09-24 15:24 ` [Buildroot] [PATCH v8 1/1] package/dpdk: add 24.07 Vincent Jardin 2024-10-02 21:58 ` Julien Olivain 2024-10-15 23:30 ` Vincent Jardin 2024-10-23 19:23 ` Julien Olivain 2024-09-30 13:41 ` [Buildroot] [PATCH v8 0/1] add DPDK libraries Vincent Jardin 2024-09-04 19:44 ` [Buildroot] [PATCH v4 " Vincent Jardin 2024-08-19 22:20 ` [Buildroot] [PATCH 1/1] package/dpdk: add 24.03 Vincent Jardin
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.