All of lore.kernel.org
 help / color / mirror / Atom feed
* Loading external PMD
@ 2016-09-03 10:21 faust1002
  2016-09-04  7:15 ` Eli Britstein
  0 siblings, 1 reply; 3+ messages in thread
From: faust1002 @ 2016-09-03 10:21 UTC (permalink / raw)
  To: dev

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Loading external PMD
  2016-09-03 10:21 Loading external PMD faust1002
@ 2016-09-04  7:15 ` Eli Britstein
  2016-09-04  7:45   ` faust1002
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Britstein @ 2016-09-04  7:15 UTC (permalink / raw)
  To: faust1002, dev

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.
------------------------------------------------------------------------------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Loading external PMD
  2016-09-04  7:15 ` Eli Britstein
@ 2016-09-04  7:45   ` faust1002
  0 siblings, 0 replies; 3+ messages in thread
From: faust1002 @ 2016-09-04  7:45 UTC (permalink / raw)
  To: Eli Britstein, dev

Hello,
Well, I see another problem here. I do not use rte_eth_driver_register 
function at all, because my device is pure virtual. When I was writting 
my own PMD, I used pcap PMD and null PMD as a starting point.
Best regards

On 04.09.2016 09:15, Eli Britstein wrote:
> 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.
> ------------------------------------------------------------------------------------------------------------------------------------------------
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-04  7:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-03 10:21 Loading external PMD faust1002
2016-09-04  7:15 ` Eli Britstein
2016-09-04  7:45   ` faust1002

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.