odp-dpdk
odp-dpdk copied to clipboard
dynamic linking ODP to DPDK 20.11 external depenancies
Hi,
This is related to "dynamic linking ODP to DPDK 20.11 (#117)".
When using a Mellanox card it has external dynamic dependencies that ODP needs to link against. For the mlx5 driver its "-lmlx5 -libverbs -lmnl". I'm not sure this code from odp_dpdk.m4 is being handled correctly / working with pkgconfig:
for filename in "$1"/librte_pmd_*.a; do
cur_driver=basename "$filename" .a | sed -e 's/^lib//'
Match pattern is filled to 'filename' once if no matches are found
AS_IF([test "x$cur_driver" = "xrte_pmd_*"], [break])
AS_CASE([$cur_driver], [rte_pmd_nfp], [AS_VAR_APPEND([DPDK_LIBS], [" -lm"])], [rte_pmd_mlx4], [AS_VAR_APPEND([DPDK_LIBS], [" -lmlx4 -libverbs"])], [rte_pmd_mlx5], [AS_VAR_APPEND([DPDK_LIBS], [" -lmlx5 -libverbs -lmnl"])], [rte_pmd_pcap], [AS_VAR_APPEND([DPDK_LIBS], [" -lpcap"])], [rte_pmd_aesni_gcm], [AS_VAR_APPEND([DPDK_LIBS], [" -lIPSec_MB"])], [rte_pmd_aesni_mb], [AS_VAR_APPEND([DPDK_LIBS], [" -lIPSec_MB"])], [rte_pmd_kasumi], [AS_VAR_APPEND([DPDK_LIBS], [" -lsso_kasumi"])], [rte_pmd_snow3g], [AS_VAR_APPEND([DPDK_LIBS], [" -lsso_snow3g"])], [rte_pmd_zuc], [AS_VAR_APPEND([DPDK_LIBS], [" -lsso_zuc"])], [rte_pmd_qat], [AS_VAR_APPEND([DPDK_LIBS], [" -lcrypto"])], [rte_pmd_openssl], [AS_VAR_APPEND([DPDK_LIBS], [" -lcrypto"])]) done
Hi @Carisbrooke,
I assume you are using pkg-config to find DPDK dependencies?
I this case configure should print:
checking for DPDK... yes
configure: Using static DPDK lib via pkg-config
or (--enable-dpdk-shared
)
checking for DPDK... yes
configure: Using shared DPDK lib via pkg-config
DPDK pkg-config file should provide all the necessary dependencies.
The per driver dependencies in odp_dpdk.m4
are only used with "legacy" DPDK linkage (no pkg-config).
Yes, used --enable-dpdk-shared, from what you are saying this sounds like DPDK issue. Let me do some more investigation and report back.
Yes, used --enable-dpdk-shared, from what you are saying this sounds like DPDK issue. Let me do some more investigation and report back.
I'd agree with that. Please report back on your findings.