From eb67df423ad8d1d78feb4ccd9b0d1147a56140ab Mon Sep 17 00:00:00 2001 From: Derek G Foster Date: Fri, 20 Oct 2023 10:02:09 -0700 Subject: [PATCH 1/6] Append SDE pkgconfig folders to PKG_CONFIG_PATH - Check for `pkgconfig` directories in the SDE and append them to PKG_CONFIG_PATH before using pkg-config to find the DPDK module. Signed-off-by: Derek G Foster --- cmake/FindDpdkDriver.cmake | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/cmake/FindDpdkDriver.cmake b/cmake/FindDpdkDriver.cmake index 10a0040f..52e2010b 100644 --- a/cmake/FindDpdkDriver.cmake +++ b/cmake/FindDpdkDriver.cmake @@ -7,12 +7,6 @@ # This module requires that SDE_INSTALL_DIR be defined. # It needs additional work to make it a proper CMake find-module. -#----------------------------------------------------------------------- -# Use pkg-config to find DPDK module -#----------------------------------------------------------------------- -include(FindPkgConfig) -pkg_check_modules(DPDK REQUIRED libdpdk) - #----------------------------------------------------------------------- # Define SDE_INCLUDE_DIR #----------------------------------------------------------------------- @@ -121,6 +115,34 @@ set_target_properties(sde::target_utils PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${SDE_INCLUDE_DIR} IMPORTED_LINK_INTERFACE_LANGUAGES C) +#----------------------------------------------------------------------- +# Append SDE pkgconfig directories to PKG_CONFIG_PATH +#----------------------------------------------------------------------- +function(_set_pkg_config_path) + file(TO_CMAKE_PATH "$ENV{PKG_CONFIG_PATH}" _sde_pkg_path) + + foreach(_libdir lib lib64 lib/x86_64-linux-gnu) + set(_path ${SDE_INSTALL_DIR}/${_libdir}/pkgconfig) + if(EXISTS ${_path}) + list(APPEND _sde_pkg_path ${_path}) + endif() + endforeach() + + list(JOIN _sde_pkg_path ":" _sde_pkg_path) + + if(NOT _sde_pkg_path STREQUAL "") + set(ENV{PKG_CONFIG_PATH} "${_sde_pkg_path}") + endif() +endfunction() + +_set_pkg_config_path() + +#----------------------------------------------------------------------- +# Use pkg-config to find DPDK module +#----------------------------------------------------------------------- +include(FindPkgConfig) +pkg_check_modules(DPDK REQUIRED libdpdk) + #----------------------------------------------------------------------- # Define SDE_LIBRARY_DIRS #----------------------------------------------------------------------- From b13689865ed8dacdd13c3db406238f8b0478e0ff Mon Sep 17 00:00:00 2001 From: Derek G Foster Date: Fri, 20 Oct 2023 17:01:16 -0700 Subject: [PATCH 2/6] Fix DPDK package issues - Address a CMake module warning by using `DpdkDriver` as the DPDK package name instead of `DPDK`. - Correct error in xxx_LDFLAGS variable name. Signed-off-by: Derek G Foster --- cmake/FindDpdkDriver.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/FindDpdkDriver.cmake b/cmake/FindDpdkDriver.cmake index 52e2010b..ffe106ce 100644 --- a/cmake/FindDpdkDriver.cmake +++ b/cmake/FindDpdkDriver.cmake @@ -141,14 +141,14 @@ _set_pkg_config_path() # Use pkg-config to find DPDK module #----------------------------------------------------------------------- include(FindPkgConfig) -pkg_check_modules(DPDK REQUIRED libdpdk) +pkg_check_modules(DpdkDriver REQUIRED libdpdk) #----------------------------------------------------------------------- # Define SDE_LIBRARY_DIRS #----------------------------------------------------------------------- set(SDE_LIBRARY_DIRS ${SDE_INSTALL_DIR}/lib - ${DPDK_LIBRARY_DIRS} + ${DpdkDriver_LIBRARY_DIRS} ) #----------------------------------------------------------------------- @@ -167,7 +167,7 @@ function(add_dpdk_target_libraries TGT) target_link_directories(${TGT} PUBLIC ${SDE_LIBRARY_DIRS}) target_link_options(${TGT} PUBLIC - ${DPDK_LD_FLAGS} - ${DPDK_LDFLAGS_OTHER} + ${DpdkDriver_LDFLAGS} + ${DpdkDriver_LDFLAGS_OTHER} ) endfunction() From b198e54564aedcb4184180d64cd4db85f259fcba Mon Sep 17 00:00:00 2001 From: Derek G Foster Date: Sat, 21 Oct 2023 04:36:16 -0700 Subject: [PATCH 3/6] Update krnlmon submodule reference Signed-off-by: Derek G Foster --- krnlmon/krnlmon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krnlmon/krnlmon b/krnlmon/krnlmon index cad209bb..ed5db8a9 160000 --- a/krnlmon/krnlmon +++ b/krnlmon/krnlmon @@ -1 +1 @@ -Subproject commit cad209bb103bb24509fe7a5388c1a922deda5f19 +Subproject commit ed5db8a9eb2106874c1072bf1ea16b387803c603 From a4a0d4d10b648829acb62b14c42d422676bdfa12 Mon Sep 17 00:00:00 2001 From: Derek G Foster Date: Sat, 21 Oct 2023 06:57:55 -0700 Subject: [PATCH 4/6] Update krnlmon submodule reference Signed-off-by: Derek G Foster --- krnlmon/krnlmon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krnlmon/krnlmon b/krnlmon/krnlmon index ed5db8a9..83723ecc 160000 --- a/krnlmon/krnlmon +++ b/krnlmon/krnlmon @@ -1 +1 @@ -Subproject commit ed5db8a9eb2106874c1072bf1ea16b387803c603 +Subproject commit 83723ecca99e1e29432cf03deaecfe0fb5e8fb65 From 8f5b1e20557116b80d408d6e9a284135586011d3 Mon Sep 17 00:00:00 2001 From: Derek G Foster Date: Sat, 21 Oct 2023 07:24:47 -0700 Subject: [PATCH 5/6] Update krnlmon submodule reference Signed-off-by: Derek G Foster --- krnlmon/krnlmon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krnlmon/krnlmon b/krnlmon/krnlmon index 83723ecc..3b8ed55a 160000 --- a/krnlmon/krnlmon +++ b/krnlmon/krnlmon @@ -1 +1 @@ -Subproject commit 83723ecca99e1e29432cf03deaecfe0fb5e8fb65 +Subproject commit 3b8ed55ab8ca70c0b0b495c4a15798a81354f156 From 7ada9e6ad9a4462add6c4ed683811692c2e8a7ba Mon Sep 17 00:00:00 2001 From: Derek G Foster Date: Mon, 23 Oct 2023 18:51:19 -0700 Subject: [PATCH 6/6] Update krnlmon submodule reference Signed-off-by: Derek G Foster --- krnlmon/krnlmon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krnlmon/krnlmon b/krnlmon/krnlmon index 3b8ed55a..64897e71 160000 --- a/krnlmon/krnlmon +++ b/krnlmon/krnlmon @@ -1 +1 @@ -Subproject commit 3b8ed55ab8ca70c0b0b495c4a15798a81354f156 +Subproject commit 64897e71cba9bb5526b164f8837e85a0bdf86519