DPDK patches and discussions
 help / color / mirror / Atom feed
From: Eli Britstein <eli.britstein@toganetworks.com>
To: faust1002 <faust1002@gmail.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Loading external PMD
Date: Sun, 4 Sep 2016 07:15:31 +0000	[thread overview]
Message-ID: <VI1PR0201MB23199F851F56D113B9E6AA8283E70@VI1PR0201MB2319.eurprd02.prod.outlook.com> (raw)
In-Reply-To: <b6c20219-8dab-3a48-f0c9-a0484b290c53@gmail.com>

Hi

In your PMD, you should mark your init function as constructor, in which you should register your PMD as a DPDK driver.
You can look at Intel's "memnic" example (though not maintained, and not being compiled with recent versions, you can take it as a reference).

The function I mean from it:

/* shared object initializer */
void __attribute__((constructor))
rte_memnic_pmd_init(void)
{
        rte_eth_driver_register(&rte_memnic_pmd);
}

Eli

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of faust1002
> Sent: Saturday, 03 September, 2016 1:21 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] Loading external PMD
>
> Hello,
> I want to write my own PMD for testing and debugging purposes. I compiled
> it as shared library and I was going to load it using "-d"
> option. Unfortunately, it didn't work.
> I walked through DPDK source code I found out that "-d" options does hardly
> anything (please correct me if I am wrong). Could you explain me what was
> initial purpose of "-d" option?
> If the option is obsolete / not implemented / whatever, this information
> should be placed in documentation. Current description is IHMO misleading.
> I wonder if there is any other way of using my own PMD expect linking binary
> with it.
> Best regards
-------------------------------------------------------------------------------------------------------------------------------------------------
This email and any files transmitted and/or attachments with it are confidential and proprietary information of
Toga Networks Ltd., and intended solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager. This message contains confidential
information of Toga Networks Ltd., and is intended only for the individual named. If you are not the named
addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately
by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not
the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on
the contents of this information is strictly prohibited.
------------------------------------------------------------------------------------------------------------------------------------------------


  reply	other threads:[~2016-09-04  7:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-03 10:21 faust1002
2016-09-04  7:15 ` Eli Britstein [this message]
2016-09-04  7:45   ` faust1002

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=VI1PR0201MB23199F851F56D113B9E6AA8283E70@VI1PR0201MB2319.eurprd02.prod.outlook.com \
    --to=eli.britstein@toganetworks.com \
    --cc=dev@dpdk.org \
    --cc=faust1002@gmail.com \
    /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).