k13132 / openwrt-dpdk Goto Github PK
View Code? Open in Web Editor NEWData Plane Development Kit (DPDK) integration into OpenWrt
Data Plane Development Kit (DPDK) integration into OpenWrt
Hi,
Has this code been tested on arm?
I'm trying to cross-compile for MT7986(Filogic 830).
The master returns this:
Problem encountered: Arm SoC must be specified in the cross file.
Devel returns this:
toolchain-aarch64_cortex-a53_gcc-13.2.0_musl/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Wcpp] 1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> | ^~~~~~~ shm.c: In function 'attach_shared': shm.c:138:23: error: storage size of 'st' isn't known 138 | struct stat64 st; | ^~ shm.c:149:13: warning: implicit declaration of function 'fstat64'; did you mean 'fstatat'? [-Wimplicit-function-declaration] 149 | if (fstat64(shmfd, &st) < 0) | ^~~~~~~ | fstatat shm.c:156:21: warning: implicit declaration of function 'ftruncate64'; did you mean 'ftruncate'? [-Wimplicit-function-declaration] 156 | if (ftruncate64(shmfd, shmlen + shmoffset) < 0) { | ^~~~~~~~~~~ | ftruncate shm.c:171:18: warning: implicit declaration of function 'mmap64'; did you mean 'mmap'? [-Wimplicit-function-declaration] 171 | shmptr = mmap64(NULL, shmlen, PROT_READ | PROT_WRITE, MAP_SHARED, shmfd, shmoffset); | ^~~~~~ | mmap shm.c:171:16: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 171 | shmptr = mmap64(NULL, shmlen, PROT_READ | PROT_WRITE, MAP_SHARED, shmfd, shmoffset); | ^ shm.c:138:23: warning: unused variable 'st' [-Wunused-variable] 138 | struct stat64 st;
https://doc.dpdk.org/guides/howto/openwrt.html
12.2.2. Kernel configuration
The following configurations should be enabled:
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
error log
../../build_dir/target-aarch64_generic_musl/dpdk-22.03/config/arm/meson.build:484:12: ERROR: Problem encountered: Arm SoC must be specified in the cross file.
need change MESON_CPU value Makefile? my cpu is RK3399, use this value failed, What value shoud I use?
This repository is prepared for DPDK and OpenWrt in x86_64-based environment. I am building OpenWrt for the ARM target on a x86_64 machine using Ubuntu, and I am currently using the build on a ARM-based device but I would like to enable DPDK on it. Do you plan to provide ARM option? If the answer is no, do you have any suggestions about the required modifications to this repository?
touch /home/steven/openwrt/staging_dir/target-x86_64_glibc/root-x86/stamp/.libdpdk_installed
mkdir -p /home/steven/openwrt/bin/targets/x86/64-glibc/packages /home/steven/openwrt/build_dir/target-x86_64_glibc/dpdk-22.07/ipkg-x86_64/libdpdk/CONTROL /home/steven/openwrt/staging_dir/target-x86_64_glibc/pkginfo
install -d -m0755 /home/steven/openwrt/build_dir/target-x86_64_glibc/dpdk-22.07/ipkg-x86_64/libdpdk/usr/lib
install -m0755 /home/steven/openwrt/build_dir/target-x86_64_glibc/dpdk-22.07/ipkg-install/usr/lib/librte_.so. /home/steven/openwrt/build_dir/target-x86_64_glibc/dpdk-22.07/ipkg-x86_64/libdpdk/usr/lib/
find /home/steven/openwrt/build_dir/target-x86_64_glibc/dpdk-22.07/ipkg-x86_64/libdpdk -name 'CVS' -o -name '.svn' -o -name '.#' -o -name '~'| xargs -r rm -rf
Package libdpdk is missing dependencies for the following libraries:
libbsd.so.0
make[2]: *** [Makefile:104: /home/steven/openwrt/bin/packages/x86_64/dpdk_repo/libdpdk_22.07-1_x86_64.ipk] Error 1
Compilation problems on many sites:
vers/libtmp_rte_bus_pci.a.p/bus_pci_linux_pci.c.o drivers/libtmp_rte_bus_pci.a.p/bus_pci_linux_pci_uio.c.o drivers/libtmp_rte_bus_pci.a.p/bus_pci_linux_pci_vfio.c.o -L/home/votavon1/eshaper/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/usr/lib -L/home/votavon1/eshaper/staging_dir/toolchain-x86_64_gcc-12.3.
0_musl/lib -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,librte_bus_pci.so.23 -Wl,--no-as-needed -pthread -lm -ldl -larchive -znow -zrelro '-Wl,-rpath,$ORIGIN/../lib:/home/votavon1/eshaper/staging_dir/target-x86_64_musl/usr/lib' -Wl,-rpath-link,/home/votavon1/eshaper/build
_dir/target-x86_64_musl/dpdk-22.11/openwrt-build/lib -Wl,-rpath-link,/home/votavon1/eshaper/staging_dir/target-x86_64_musl/usr/lib lib/librte_eal.so.23.0 lib/librte_kvargs.so.23.0 lib/librte_telemetry.so.23.0 lib/librte_pci.so.23.0 -Wl,--version-script=/home/votavon1/eshaper/build_dir/target-x86_64_musl/d
pdk-22.11/drivers/bus/pci/version.map /home/votavon1/eshaper/staging_dir/target-x86_64_musl/usr/lib/libbsd.so -Wl,--end-group
/home/votavon1/eshaper/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib/gcc/x86_64-openwrt-linux-musl/12.3.0/../../../../x86_64-openwrt-linux-musl/bin/ld: warning: size of symbol `MD5End@LIBBSD_0.0' changed from 155 in /home/votavon1/eshaper/staging_dir/target-x86_64_musl/usr/lib/libbsd.so.0.11.7 to 6 in
/home/votavon1/eshaper/staging_dir/target-x86_64_musl/usr/lib/libbsd.so.0.11.7
/home/votavon1/eshaper/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib/gcc/x86_64-openwrt-linux-musl/12.3.0/../../../../x86_64-openwrt-linux-musl/bin/ld: warning: size of symbol `MD5FileChunk@LIBBSD_0.0' changed from 340 in /home/votavon1/eshaper/staging_dir/target-x86_64_musl/usr/lib/libbsd.so.0.11.7 to
6 in /home/votavon1/eshaper/staging_dir/target-x86_64_musl/usr/lib/libbsd.so.0.11.7
/home/votavon1/eshaper/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib/gcc/x86_64-openwrt-linux-musl/12.3.0/../../../../x86_64-openwrt-linux-musl/bin/ld: warning: size of symbol `MD5Final@LIBBSD_0.0' changed from 85 in /home/votavon1/eshaper/staging_dir/target-x86_64_musl/usr/lib/libbsd.so.0.11.7 to 6 in
/home/votavon1/eshaper/staging_dir/target-x86_64_musl/usr/lib/libbsd.so.0.11.7
/home/votavon1/eshaper/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib/gcc/x86_64-openwrt-linux-musl/12.3.0/../../../../x86_64-openwrt-linux-musl/bin/ld: /home/votavon1/eshaper/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib/libc.so: warning: The fgetln() function cannot be safely ported, use getline(3)
instead, as it is supported by GNU and POSIX.1-2008.
/home/votavon1/eshaper/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib/gcc/x86_64-openwrt-linux-musl/12.3.0/../../../../x86_64-openwrt-linux-musl/bin/ld: drivers/libtmp_rte_bus_pci.a.p/bus_pci_linux_pci_vfio.c.o: in function `pci_vfio_set_bus_master':
pci_vfio.c:(.text+0x27): undefined reference to `pread64'
/home/votavon1/eshaper/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib/gcc/x86_64-openwrt-linux-musl/12.3.0/../../../../x86_64-openwrt-linux-musl/bin/ld: pci_vfio.c:(.text+0x73): undefined reference to `pwrite64'
/home/votavon1/eshaper/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib/gcc/x86_64-openwrt-linux-musl/12.3.0/../../../../x86_64-openwrt-linux-musl/bin/ld: drivers/libtmp_rte_bus_pci.a.p/bus_pci_linux_pci_vfio.c.o: in function `pci_vfio_map_resource_primary':
pci_vfio.c:(.text+0x7a5): undefined reference to `pread64'
/home/votavon1/eshaper/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib/gcc/x86_64-openwrt-linux-musl/12.3.0/../../../../x86_64-openwrt-linux-musl/bin/ld: pci_vfio.c:(.text+0x7f2): undefined reference to `pread64'
/home/votavon1/eshaper/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib/gcc/x86_64-openwrt-linux-musl/12.3.0/../../../../x86_64-openwrt-linux-musl/bin/ld: pci_vfio.c:(.text+0x82e): undefined reference to `pread64'
/home/votavon1/eshaper/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib/gcc/x86_64-openwrt-linux-musl/12.3.0/../../../../x86_64-openwrt-linux-musl/bin/ld: pci_vfio.c:(.text+0x883): undefined reference to `pread64'
/home/votavon1/eshaper/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib/gcc/x86_64-openwrt-linux-musl/12.3.0/../../../../x86_64-openwrt-linux-musl/bin/ld: pci_vfio.c:(.text+0x8ba): undefined reference to `pread64'
/home/votavon1/eshaper/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib/gcc/x86_64-openwrt-linux-musl/12.3.0/../../../../x86_64-openwrt-linux-musl/bin/ld: drivers/libtmp_rte_bus_pci.a.p/bus_pci_linux_pci_vfio.c.o:pci_vfio.c:(.text+0xa99): more undefined references to `pread64' follow
/home/votavon1/eshaper/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib/gcc/x86_64-openwrt-linux-musl/12.3.0/../../../../x86_64-openwrt-linux-musl/bin/ld: drivers/libtmp_rte_bus_pci.a.p/bus_pci_linux_pci_vfio.c.o: in function `pci_vfio_map_resource_primary':
pci_vfio.c:(.text+0xdeb): undefined reference to `pwrite64'
/home/votavon1/eshaper/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib/gcc/x86_64-openwrt-linux-musl/12.3.0/../../../../x86_64-openwrt-linux-musl/bin/ld: drivers/libtmp_rte_bus_pci.a.p/bus_pci_linux_pci_vfio.c.o: in function `pci_vfio_read_config':
pci_vfio.c:(.text+0x14ff): undefined reference to `pread64'
/home/votavon1/eshaper/staging_dir/toolchain-x86_64_gcc-12.3.0_musl/lib/gcc/x86_64-openwrt-linux-musl/12.3.0/../../../../x86_64-openwrt-linux-musl/bin/ld: drivers/libtmp_rte_bus_pci.a.p/bus_pci_linux_pci_vfio.c.o: in function `pci_vfio_write_config':
Do you have any suggestion @pprindeville ?
请问openwrt 23.05 x86版能用吗?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.