Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ports/dpdk/0001-enable-either-static-or-shared-build.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/config/meson.build b/config/meson.build
index b6b3558e11..34b85f10b5 100644
index 9ba7b9a..bbdad71 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -95,7 +95,9 @@ eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
Expand All @@ -14,7 +14,7 @@ index b6b3558e11..34b85f10b5 100644
if pmd_subdir_opt != '' and pmd_subdir_opt != '.'
meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
diff --git a/drivers/meson.build b/drivers/meson.build
index 495e21b54a..ff7b5983cb 100644
index 6ae102e..9a593b7 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -322,7 +322,7 @@ foreach subpath:subdirs
Expand Down Expand Up @@ -51,10 +51,10 @@ index 495e21b54a..ff7b5983cb 100644

set_variable('shared_@0@'.format(lib_name), shared_dep)
diff --git a/lib/meson.build b/lib/meson.build
index ce92cb5537..40880bbf02 100644
index 8f5cfd2..907a46a 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -274,7 +274,7 @@ foreach l:libraries
@@ -270,7 +270,7 @@ foreach l:libraries
c_args: cflags,
dependencies: static_deps,
include_directories: includes,
Expand All @@ -63,15 +63,15 @@ index ce92cb5537..40880bbf02 100644
static_dep = declare_dependency(
include_directories: includes,
dependencies: static_deps)
@@ -324,6 +324,7 @@ foreach l:libraries
@@ -320,6 +320,7 @@ foreach l:libraries
cflags += '-DRTE_BUILD_SHARED_LIB'
endif

+ if get_option('default_library') == 'shared'
shared_lib = shared_library(libname,
sources,
objects: objs,
@@ -341,6 +342,9 @@ foreach l:libraries
@@ -336,6 +337,9 @@ foreach l:libraries
dependencies: shared_deps)

dpdk_libraries = [shared_lib] + dpdk_libraries
Expand Down
50 changes: 45 additions & 5 deletions ports/dpdk/0002-fix-dependencies.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/config/meson.build b/config/meson.build
index 34b85f10b5..5ed4625d9e 100644
index bbdad71..a9c63b5 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -238,12 +238,10 @@ if meson.is_cross_build() and not meson.get_external_property('numa', true)
@@ -238,17 +238,15 @@ if meson.is_cross_build() and not meson.get_external_property('numa', true)
find_libnuma = false
endif
if find_libnuma
Expand All @@ -17,19 +17,59 @@ index 34b85f10b5..5ed4625d9e 100644
endif
endif

has_libfdt = false
-fdt_dep = cc.find_library('fdt', required: false)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about some of these but they're dependencies not in vcpkg.json.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT, libfdt is required to build the IFPGA Rawdev Driver, and the IPN3KE Poll Mode Driver. These drivers may well be important to a user of DPDK, depending on their use-case, and the devices they are looking to interact with.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT, libfdt is required to build the IFPGA Rawdev Driver, and the IPN3KE Poll Mode Driver. These drivers may well be important to a user of DPDK, depending on their use-case, and the devices they are looking to interact with.

Then the port needs to be fixed to arrange for those dependencies to be present.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIU the patch arranges for the package to not offer this capability. This is fine. No installation order dependency.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine from vcpkg's perspective but I'm not sure it's fine from dpdk users' perspective. For some of these vcpkg already has the dependency available and I could resolve it the other way (always turn the dependency on).

+fdt_dep = disabler()
if fdt_dep.found() and cc.has_header('fdt.h') and cc.links(min_c_code, dependencies: fdt_dep)
dpdk_conf.set10('RTE_HAS_LIBFDT', true)
has_libfdt = true
@@ -269,28 +267,28 @@ if libarchive.found()
endif

# check for libbsd
-libbsd = dependency('libbsd', required: false, method: 'pkg-config')
+libbsd = disabler()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT, removing the dependency on libbsd won't disable any functionality.

if libbsd.found()
dpdk_conf.set('RTE_USE_LIBBSD', 1)
endif

-jansson_dep = dependency('jansson', required: false, method: 'pkg-config')
+jansson_dep = disabler()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jansson appears to be used to support telemetry, and enables optional functionality in a number of drivers.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that as currently set up it makes things path dependent. That is,

vcpkg install jansson
vcpkg install dpdk

gives a totally different result than

vcpkg install dpdk
vcpkg install jansson

which is why the most recent dpdk update PR landed fine but we have not seen a clean world rebuild since, because jansson happened to get installed first and trigger incompatibilities with MSVC.

The question for purposes of this PR to restore nightly runs is not "would someone like when these optional dependencies are used", but "is the port completely broken for all purposes and we need to try to get vcpkg to provide them instead".

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIU the patch arranges for the package to not offer this capability. This is fine. No installation order dependency.

if jansson_dep.found()
dpdk_conf.set('RTE_HAS_JANSSON', 1)
endif

# check for OpenSSL
-openssl_dep = dependency('openssl', required: false, method: 'pkg-config')
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The correct change may be to add openssl as a dependency instead?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT, openssl is used by the OpenSSL Crypto Poll Mode Driver, and within examples.

+openssl_dep = disabler()
if openssl_dep.found()
dpdk_conf.set('RTE_HAS_OPENSSL', 1)
endif

# check for pcap
-pcap_dep = dependency('libpcap', required: false, method: 'pkg-config')
+pcap_dep = disabler()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT, libpcap is required by the Pcap Poll Mode Driver, and to enable several other pieces of optional functionality

pcap_lib = is_windows ? 'wpcap' : 'pcap'
if not pcap_dep.found()
# pcap got a pkg-config file only in 1.9.0
- pcap_dep = cc.find_library(pcap_lib, required: false)
+ pcap_dep = disabler()
Comment on lines +66 to +70
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would make the patch longer so I do not want to do that.

endif
if (pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep)
and cc.links(min_c_code, dependencies: pcap_dep))
diff --git a/lib/eal/linux/meson.build b/lib/eal/linux/meson.build
index e99ebed256..672c70547b 100644
index 29ba313..5a173c4 100644
--- a/lib/eal/linux/meson.build
+++ b/lib/eal/linux/meson.build
@@ -21,5 +21,6 @@ sources += files(
@@ -25,5 +25,6 @@ endif

deps += ['kvargs', 'telemetry']
if has_libnuma
+ ext_deps += numa_dep
dpdk_conf.set10('RTE_EAL_NUMA_AWARE_HUGEPAGES', true)
endif
diff --git a/lib/vhost/meson.build b/lib/vhost/meson.build
index 51bcf17244..1099a0232f 100644
index 6a24981..5283e79 100644
--- a/lib/vhost/meson.build
+++ b/lib/vhost/meson.build
@@ -6,6 +6,7 @@ if not is_linux
Expand Down
4 changes: 2 additions & 2 deletions ports/dpdk/0003-remove-examples-src-from-datadir.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/meson.build b/meson.build
index 8436d1dff8..5e704e37d5 100644
index b01010f..ea800ee 100644
--- a/meson.build
+++ b/meson.build
@@ -89,13 +89,6 @@ subdir('app')
@@ -99,13 +99,6 @@ subdir('app')
# build docs
subdir('doc')

Expand Down
4 changes: 2 additions & 2 deletions ports/dpdk/0004-stop-building-apps.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/app/meson.build b/app/meson.build
index e2db888ae1..5e28824780 100644
index 1798db3..4efbafc 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -52,7 +52,7 @@ endif
@@ -48,7 +48,7 @@ endif

foreach app:apps
name = app
Expand Down
4 changes: 2 additions & 2 deletions ports/dpdk/0005-no-absolute-driver-path.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/config/meson.build b/config/meson.build
index 5ed4625d9e..3f89fd0768 100644
index a9c63b5..eacbbac 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -461,7 +461,7 @@ Please install libnuma, or set 'max_numa_nodes' option to '1' to build without N
@@ -473,7 +473,7 @@ Please install libnuma, or set 'max_numa_nodes' option to '1' to build without N
endif

# set the install path for the drivers
Expand Down
6 changes: 3 additions & 3 deletions ports/dpdk/0006-rename-sched.h.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/lib/eal/common/eal_common_thread.c b/lib/eal/common/eal_common_thread.c
index a53bc63..087ec80 100644
index dcd81f9..4daa244 100644
--- a/lib/eal/common/eal_common_thread.c
+++ b/lib/eal/common/eal_common_thread.c
@@ -6,7 +6,11 @@
Expand Down Expand Up @@ -39,10 +39,10 @@ index e1c3101..f28b37d 100644
/**
* This file is required to support the common code in eal_common_proc.c,
diff --git a/lib/eal/windows/include/rte_os.h b/lib/eal/windows/include/rte_os.h
index 9d69467..4df82dd 100644
index 2a43cb1..440fa30 100644
--- a/lib/eal/windows/include/rte_os.h
+++ b/lib/eal/windows/include/rte_os.h
@@ -14,7 +14,7 @@
@@ -15,7 +15,7 @@
#include <string.h>
#include <malloc.h>

Expand Down
3 changes: 2 additions & 1 deletion ports/dpdk/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ if(VCPKG_TARGET_IS_LINUX AND VCPKG_HOST_IS_LINUX)
endif()

# Add a leading zero to the minor version if it consists of only one digit, otherwise the regex does nothing
string(REGEX REPLACE "^([0-9]+)\\.([0-9])(\\..*)$" "\\1.0\\2\\3" VERSION_REF "${VERSION}")
# Match both `X.Y` and `X.Y.Z...` forms (optional remainder).
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That this was wrong and nobody noticed suggests that people don't actually care about this port :(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this transformation even desirable? Would it not be preferable to store the canonical version, as defined by the dpdk project, within dpdk.json?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only added the regex in the last update, and during the last adjustment, I must have forgotten to make the group optional after I hadn't forced the period in the group at first ;-). So this issue is in this repo only since 5 days ;-)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this transformation even desirable? Would it not be preferable to store the canonical version, as defined by the dpdk project, within dpdk.json?

Desirable, yes. However, there is no suitable version scheme in vcpkg which allows 26.04 without loosing comparing for <.

string(REGEX REPLACE "^([0-9]+)\\.([0-9])(\\..*)?$" "\\1.0\\2\\3" VERSION_REF "${VERSION}")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO DPDK/dpdk
Expand Down
1 change: 1 addition & 0 deletions ports/dpdk/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "dpdk",
"version": "26.3",
"port-version": 1,
"description": "A set of libraries and drivers for fast packet processing",
"homepage": "https://www.dpdk.org/",
"documentation": "https://doc.dpdk.org/guides/",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2594,7 +2594,7 @@
},
"dpdk": {
"baseline": "26.3",
"port-version": 0
"port-version": 1
},
"dpp": {
"baseline": "10.1.4",
Expand Down
5 changes: 5 additions & 0 deletions versions/d-/dpdk.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e76da4e89a5563a0ae4773d265cdfcb8fa53b25f",
"version": "26.3",
"port-version": 1
},
{
"git-tree": "2f0e7f0a8441cfd2b7c64c76f70d599d657df8c1",
"version": "26.3",
Expand Down
Loading