DPDK usage discussions
 help / color / mirror / Atom feed
From: "Gaëtan Rivet" <gaetan.rivet@6wind.com>
To: Gadre Nayan <gadrenayan@gmail.com>
Cc: users@dpdk.org
Subject: Re: [dpdk-users] RTE_REGISTER_BUS
Date: Mon, 25 Nov 2019 16:25:31 +0100	[thread overview]
Message-ID: <20191125152531.GK28445@bidouze.6wind.com> (raw)
In-Reply-To: <CAKJ7aR43gMJmiHMtQ_ZnZmazszfcr1mgB29YT1PwXCr4R7zZzA@mail.gmail.com>

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

  reply	other threads:[~2019-11-25 15:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-25 14:43 Gadre Nayan
2019-11-25 15:25 ` Gaëtan Rivet [this message]
2019-11-26  3:45   ` Gadre Nayan
2019-11-26  9:40     ` Gaëtan Rivet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191125152531.GK28445@bidouze.6wind.com \
    --to=gaetan.rivet@6wind.com \
    --cc=gadrenayan@gmail.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).