Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__attribute__((constructor, used)) doesn't work if build with static lib of dpdk/odp-dpdk #191

Open
lvsgate opened this issue Jan 5, 2018 · 8 comments
Assignees

Comments

@lvsgate
Copy link

lvsgate commented Jan 5, 2018

RTE_PMD_REGISTER_PCI(net_ixgbe, rte_ixgbe_pmd.pci_drv);
This line doesn't be called if build with static lib of dpdk/odp-dpdk, because this micro use attribute((constructor, used)).
The result is that "odp_packet_dpdk.c:162:setup_pkt_dpdk():No driver found for interface: 0"

@lvsgate lvsgate changed the title __attribute__((constructor, used)) doesn't work if use static lib of dpdk/odp-dpdk __attribute__((constructor, used)) doesn't work if build with static lib of dpdk/odp-dpdk Jan 5, 2018
@lvsgate
Copy link
Author

lvsgate commented Jan 9, 2018

Is There Anybody There????????????????????????

@sovu sovu added this to the Bumblebee 3.0.0 Release milestone Jan 16, 2018
@iufl
Copy link

iufl commented Jan 26, 2018

Hello,

Do you have more information on how you compile the OFP and ODP together? Or on which ODP version this happens?
This may not be an OFP error since it is related to ODP and DPDK. They can be compiled with --whole-archive parameter to get the unused symbols.

I did the following:

  1. Got the latest ODP master branch from Linaro git
  2. use scripts/build-dpdk-pktio script from ODP to compile with DPDK packet io
  3. compile OFP with ODP
  4. add interfaces to DPDK at created hugepages necessary for DPDK
  5. run a test application to get traffic from another target

And it worked. It would be useful to get more information on which version of ODP and DPDK this happens.

@lvsgate
Copy link
Author

lvsgate commented Jan 29, 2018

@iufl I configure odp-dpdk with --enable-shared=no (default is yes)

  1. odp-dpdk version: 1.15.0.0_DPDK_17.02
  2. rm -rf <odp-dpdk installed dir>/lib/*
  3. Add "--enable-shared=no" to scripts/build-dpdk-pktio
 ./bootstrap;
 ./configure  --enable-test-vald  --enable-test-perf --enable-test-cpp \
+             --enable-shared=no \
+             --prefix=<odp-dpdk installed dir> \
             --enable-debug --enable-debug-print \
             --with-dpdk-path=`pwd`/dpdk/${TARGET}
 make
+  make install
  1. Compile OFP with ODP-DPDK
  2. Run any test application and you will get the result

@sovu
Copy link
Contributor

sovu commented Jan 30, 2018

TSC 30.01.18

Iulia to raise an issue for this case to ODP mailing-list with more details about the missing symbol.

@iufl
Copy link

iufl commented Jan 30, 2018

@lvsgate it looks like something related to ODP scripts.
Their github project : https://github.com/Linaro/odp
And their mailing list: https://lists.linaro.org/mailman/listinfo/lng-odp

@lvsgate
Copy link
Author

lvsgate commented Jan 31, 2018

Thank you. Some pull request may fix it.
https://lists.linaro.org/pipermail/lng-odp-dpdk/2018-January/002097.html

@sovu
Copy link
Contributor

sovu commented Feb 6, 2018

TSC meeting 06.02.18

Can someone confirm that this issue has been fixed in newer odp-dpdk versions using that pull request.

@lvsgate
Copy link
Author

lvsgate commented Feb 7, 2018

Refer to OpenDataPlane/odp-dpdk#15 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants