[dpdk-users] RTE_REGISTER_BUS
Gaëtan Rivet
gaetan.rivet at 6wind.com
Mon Nov 25 16:25:31 CET 2019
On Mon, Nov 25, 2019 at 08:13:00PM +0530, Gadre Nayan wrote:
> Hi,
>
> I am trying to understand RTE_REGISTER_BUS for PCI Bus.
>
> 1. Load uio, igb_uio, bind the NIC with igb_uio.
> 2. load the application.
>
> Step 1, is mostly about registering Drivers with the PCI bus.
> I am looking at when does RTE_REGISTER_BUS get called in this process.
>
> Thanks
> Nayan
Hello,
RTE_REGISTER_ functions all uses RTE_INIT_PRIO(n) macro.
This macro will only add the GCC attribute __attribute__((constructor(n), used))
to the symbole defined with RTE_INIT_PRIO() (attribute supported by all
major compiler).
This attribute adds the related function to the .init section of the
generated ELF. This section is executed before the main() of the
program.
This allows libraries to define init and cleanup code that is executed
automatically when linking against the lib.
--
Gaëtan Rivet
6WIND
More information about the users
mailing list