From mboxrd@z Thu Jan 1 00:00:00 1970 From: faust1002 Subject: Re: Loading external PMD Date: Sun, 4 Sep 2016 09:45:09 +0200 Message-ID: <3df8916e-6ebc-a330-821b-57a1c77305ff@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit To: Eli Britstein , "dev@dpdk.org" Return-path: Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com [209.85.215.52]) by dpdk.org (Postfix) with ESMTP id 0D9444CE4 for ; Sun, 4 Sep 2016 09:45:12 +0200 (CEST) Received: by mail-lf0-f52.google.com with SMTP id g62so108635769lfe.3 for ; Sun, 04 Sep 2016 00:45:12 -0700 (PDT) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "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. > ------------------------------------------------------------------------------------------------------------------------------------------------ >