[Bug 1687492] [NEW] DPDK dkms packages build for wrong kernel
Public bug reported: The DPDK build system uses the RTE_KERNELDIR make variable to determine which kernel version to build for. DKMS provides the kernel version to build for in the $kernelver and $kernel_source_dir variables. Because you use a custom MAKE command, this must be used in the MAKE variable of dkms.conf to generate the correct RTE_KERNELDIR for the build, by doing something like this: --- /usr/src/dpdk-rte-kni-16.07.2/dkms.conf 2017-05-01 18:23:13.242496251 -0400 +++ /usr/src/dpdk-rte-kni-16.07.2/dkms.conf.new 2017-05-01 18:23:20.638620058 -0400 @@ -1,7 +1,7 @@ PACKAGE_NAME="dpdk-rte-kni" PACKAGE_VERSION="16.07.2" BUILT_MODULE_NAME[0]="rte_kni" -MAKE="source /usr/share/dpdk/dpdk-sdk-env.sh; make MODULE_CFLAGS='-I/usr/include/dpdk -include /usr/include/dpdk/rte_config.h -I$source_tree/dpdk-rte-kni-16.07.2/ethtool/ixgbe -I$source_tree/dpdk-rte-kni-16.07.2/ethtool/igb'" +MAKE="source /usr/share/dpdk/dpdk-sdk-env.sh; make MODULE_CFLAGS='-I/usr/include/dpdk -include /usr/include/dpdk/rte_config.h -I$source_tree/dpdk-rte-kni-16.07.2/ethtool/ixgbe -I$source_tree/dpdk-rte-kni-16.07.2/ethtool/igb' RTE_KERNELDIR=$kernel_source_dir" CLEAN="source /usr/share/dpdk/dpdk-sdk-env.sh; make clean" DEST_MODULE_LOCATION[0]="/updates/dkms" AUTOINSTALL="YES" Because this is not done, whenever the kernel package is upgraded and DKMS triggers a rebuild, it will trigger a rebuild for the *running* kernel which gets installed into the *newly installed* kernel directory, which is wrong and causes the module to fail to load when the newly installed kernel is booted. ** Affects: dpdk (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1687492 Title: DPDK dkms packages build for wrong kernel To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1687492/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1687492] Re: DPDK dkms packages build for wrong kernel
I tested the updated packages in a VM and it appears to have fixed the issue. Thanks! -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1687492 Title: DPDK dkms packages build for wrong kernel To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1687492/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1653179] Re: dpdk-dev incorrect symlink under $RTE_SDK
(this was found on yakkety) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1653179 Title: dpdk-dev incorrect symlink under $RTE_SDK To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1653179/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1653179] [NEW] dpdk-dev incorrect symlink under $RTE_SDK
Public bug reported: $ ls -l /usr/share/dpdk/x86_64-default-linuxapp-gcc/lib/librte_eal.a ls: cannot access '/usr/share/dpdk/x86_64-default-linuxapp-gcc/lib/librte_eal.a': No such file or directory $ ls -l /usr/share/dpdk/x86_64-default-linuxapp-gcc/lib/x86_64-linux-gnu/librte_eal.a -rw-r--r-- 1 root root 294718 Oct 4 03:27 /usr/share/dpdk/x86_64-default-linuxapp-gcc/lib/x86_64-linux-gnu/librte_eal.a This prevents SPDK from building since it expects the libraries at that location. I think the fix is just removing the symlink that DPDK installs and replacing it with the correct one. ** Affects: dpdk (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1653179 Title: dpdk-dev incorrect symlink under $RTE_SDK To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1653179/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1653179] Re: dpdk-dev incorrect symlink under $RTE_SDK
I apologize that I did not make this more clear. The library files themselves are in the correct location, according to the Ubuntu multiarch spec. The issue is that the symlink does *not* point to the correct location. The reason this works for the DPDK examples themselves (including l2fwd) is because they link using e.g. -lrte_eal, with -L${RTE_SDK}/${RTE_TARGET}/lib *added* to the search path. The linker does not find the library there but *does* find it in the default search path, which includes the system library directory /usr/lib/x86_64-linux- gnu. The SPDK [1] build system includes the following in spdk/lib/env_dpdk/env.mk: ```make DPDK_LIB = $(DPDK_ABS_DIR)/lib/librte_eal.a $(DPDK_ABS_DIR)/lib/librte_mempool.a \ $(DPDK_ABS_DIR)/lib/librte_ring.a ``` where DPDK_ABS_DIR is essentially defined to ${RTE_SDK}/${RTE_TARGET}. This means that SPDK does *not* find these libraries in the system search path, since it isn't using -l to look for them there but is hardcoding the specific absolute path where it expects the libraries to be (I presume they do this so that if there are multiple DPDK installations you are absolutely sure which one you are linking against). Both before and after fixing the symlink, the l2fwd example program builds successfully: ``` $ ls -l /usr/share/dpdk/x86_64-default-linuxapp-gcc/ total 4 drwxr-xr-x 2 root root 4096 Dec 28 14:20 app lrwxrwxrwx 1 root root 21 Oct 4 03:27 include -> ../../../include/dpdk lrwxrwxrwx 1 root root 29 Jan 3 13:28 lib -> ../../../lib/x86_64-linux-gnu $ make -C /usr/share/dpdk/examples/l2fwd O=${PWD} make: Entering directory '/usr/share/dpdk/examples/l2fwd' CC main.o LD l2fwd INSTALL-APP l2fwd INSTALL-MAP l2fwd.map make: Leaving directory '/usr/share/dpdk/examples/l2fwd' ``` [1]: https://github.com/spdk/spdk -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1653179 Title: dpdk-dev incorrect symlink under $RTE_SDK To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1653179/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1687492] Re: DPDK dkms packages build for wrong kernel
dpdk-rte-kni-dkms-16.07.2-0ubuntu0.16.10.2 appears to fix the issue. ** Tags removed: verification-needed ** Tags added: verification-done -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1687492 Title: DPDK dkms packages build for wrong kernel To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1687492/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs