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 odp-dpdk #15

Closed
lvsgate opened this issue Jan 31, 2018 · 5 comments

Comments

@lvsgate
Copy link

lvsgate commented Jan 31, 2018

odp-dpdk version: 1.15.0.0_DPDK_17.02

  1. configure --disable-shared for odp-dpdk and build
  2. build ofp with odp-dpdk
  3. run any example app of ofp and got the result
    "odp_packet_dpdk.c:162:setup_pkt_dpdk():No driver found for interface: 0"
  4. It seems that RTE_PMD_REGISTER_PCI(net_ixgbe, rte_ixgbe_pmd.pci_drv) only be called in shared library
@MatiasElo
Copy link
Contributor

MatiasElo commented Feb 6, 2018

This happens also with odp-linux when using DPDK pktio andit is likely caused by OFP not properly importing flags from libodp-linux.pc/libodp-dpdk.pc. I'm in the middle of porting patches from odp-linux to bring odp-dpdk up to date, but setting "PKG_CONFIG="pkg-config --static"" environment variable fixed driver linking with odp-linux.

@lumag
Copy link
Contributor

lumag commented Feb 27, 2018

pkg-config --static should only be necessary if one is building static app. It is needed to satisfy linking.
@MatiasElo Could you please provide minimal example that we can use to verify static linking with ODP/DPDK (in odp-linux case).

@lumag
Copy link
Contributor

lumag commented Feb 27, 2018

Regarding odp-dpdk. I remember doing several iterations with odp-linux/dpdk till I was able to fix possible app.odp/dpdk linking cases.

@MatiasElo
Copy link
Contributor

@lumag I assumed OFP was built is static as ODP was build with '--disable-shared'.

I've used OFP's fpm_burstmode example to verify driver linking. E.g.
./fpm_burstmode -i 0,1 -c 1

@MatiasElo
Copy link
Contributor

Fixed by #79.

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