dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: Olivier Matz <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [PATCH 07/11] vdev: allow external registration of virtual device drivers
Date: Thu, 10 Apr 2014 07:55:01 -0700 (PDT)	[thread overview]
Message-ID: <1460632.jOzC6OEr8u@xps13> (raw)
In-Reply-To: <1393608350-4431-8-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

2014-02-28 18:25, Olivier Matz:
> Instead of having a list of virtual device drivers in EAL code, add an
> API to register drivers. Thanks to this change:
> - we don't need to reference pmd_ring, pmd_pcap and pmd_xenvirt in EAL code
> - it is now possible to provide a virtual device driver as a shared
>   library.
> 
> The registration is done in an init function flaged with
> __attribute__((constructor)). The new convention is to name this
> function rte_pmd_xyz_init(). The per-device init function is renamed
> rte_pmd_xyz_devinit().
> 
> By the way the internal PMDs are now also .so/standalone ready. Let's do
> it later on. It will be required to ease maintenance.
> 
> Signed-off-by: Olivier Matz <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

> --- a/lib/librte_eal/linuxapp/eal/eal.c
> +++ b/lib/librte_eal/linuxapp/eal/eal.c
> @@ -1039,10 +1039,8 @@ rte_eal_init(int argc, char **argv)
> 
>  	rte_eal_mcfg_complete();
> 
> -	if (rte_eal_vdev_init() < 0)
> -		rte_panic("Cannot init virtual devices\n");
> -
>  	TAILQ_FOREACH(solib, &solib_list, next) {
> +		RTE_LOG(INFO, EAL, "open shared lib %s\n", solib->name);
>  		solib->lib_handle = dlopen(solib->name, RTLD_NOW);
>  		if ((solib->lib_handle == NULL) && (solib->name[0] != '/')) {
>  			/* relative path: try again with "./" prefix */
> @@ -1054,6 +1052,9 @@ rte_eal_init(int argc, char **argv)
>  			RTE_LOG(WARNING, EAL, "%s\n", dlerror());
>  	}
> 
> +	if (rte_eal_vdev_init() < 0)
> +		rte_panic("Cannot init virtual devices\n");
> +
>  	RTE_LOG(DEBUG, EAL, "Master core %u is ready (tid=%x)\n",
>  		rte_config.master_lcore, (int)thread_id);
> 

Could you explain this move?
It seems allowing vdev as external library.
Maybe it should be in another commit.

> --- a/lib/librte_pmd_pcap/rte_eth_pcap.h
> +++ b/lib/librte_pmd_pcap/rte_eth_pcap.h
> @@ -45,8 +45,6 @@ extern "C" {
>  #undef PCAP_CAN_SEND
>  #endif
> 
> -#define RTE_ETH_PCAP_PARAM_NAME "eth_pcap"
> -
>  /* struct args_dict is declared in rte_eth_pcap_args_parser.h */
>  struct args_dict;
> 
> @@ -64,12 +62,6 @@ int rte_eth_from_pcaps_n_dumpers(pcap_t * const
> rx_queues[], const unsigned numa_node,
>  		struct args_dict *dict);
> 
> -/**
> - * For use by the EAL only. Called as part of EAL init to set up any dummy
> NICs - * configured on command line.
> - */
> -int rte_pmd_pcap_init(const char *name, const char *params);
> -
>  #ifdef __cplusplus
>  }
>  #endif

After having rebased on HEAD, do we still need a header file for pmd_pcap?

Thanks
-- 
Thomas

  parent reply	other threads:[~2014-04-10 14:55 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28 17:25 [PATCH 00/11] eal: allow virtual pmd drivers as shared lib Olivier Matz
     [not found] ` <1393608350-4431-1-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-02-28 17:25   ` [PATCH 01/11] mk: use whole-archive option when creating dpdk binaries Olivier Matz
     [not found]     ` <1393608350-4431-2-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-04-10 13:58       ` Thomas Monjalon
2014-02-28 17:25   ` [PATCH 02/11] devices-args: introduce rte_devargs in eal Olivier Matz
     [not found]     ` <1393608350-4431-3-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-02-28 21:39       ` Stephen Hemminger
     [not found]         ` <20140228133929.03844b24-We1ePj4FEcvRI77zikRAJc56i+j3xesD0e7PPNI6Mm0@public.gmane.org>
2014-03-01 12:02           ` Olivier MATZ
     [not found]             ` <5311CC3E.1010804-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-03-01 12:14               ` [PATCH v2 " Olivier Matz
     [not found]                 ` <1393676055-17655-1-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-04-10 13:59                   ` Thomas Monjalon
2014-02-28 17:25   ` [PATCH 03/11] devices-args: use rte_devargs and remove old whitelist code Olivier Matz
     [not found]     ` <1393608350-4431-4-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-03-01 12:14       ` [PATCH v2 " Olivier Matz
     [not found]         ` <1393676074-17703-1-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-04-10 14:01           ` Thomas Monjalon
2014-02-28 17:25   ` [PATCH 04/11] devices-args: add a dump_devargs command in basic test application Olivier Matz
     [not found]     ` <1393608350-4431-5-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-04-10 14:02       ` Thomas Monjalon
2014-02-28 17:25   ` [PATCH 05/11] pci: rename device_list as pci_device_list Olivier Matz
     [not found]     ` <1393608350-4431-6-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-04-10 14:03       ` Thomas Monjalon
2014-02-28 17:25   ` [PATCH 06/11] vdev: rename eal_common_nonpci_devs.c as eal_common_vdev.c Olivier Matz
     [not found]     ` <1393608350-4431-7-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-04-10 14:39       ` Thomas Monjalon
2014-04-11  7:36         ` [PATCH v2 06/11] vdev: rename nonpci_devs as vdev Olivier Matz
     [not found]           ` <1397201793-26580-1-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-04-11 11:25             ` Thomas Monjalon
2014-04-11 11:45               ` [PATCH v3 " Olivier Matz
     [not found]                 ` <1397216703-30301-1-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-04-11 12:37                   ` Thomas Monjalon
2014-02-28 17:25   ` [PATCH 07/11] vdev: allow external registration of virtual device drivers Olivier Matz
     [not found]     ` <1393608350-4431-8-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-04-10 14:55       ` Thomas Monjalon [this message]
2014-04-11  7:36         ` [PATCH v2 07/11 1/2] vdev: new registration API Olivier Matz
     [not found]           ` <1397201813-26627-1-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-04-11  7:36             ` [PATCH v2 07/11 2/2] vdev: allow external registration of virtual device drivers Olivier Matz
     [not found]               ` <1397201813-26627-2-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-04-11 14:31                 ` Thomas Monjalon
2014-04-11 10:49             ` [PATCH v2 07/11 1/2] vdev: new registration API Neil Horman
     [not found]               ` <20140411104929.GA911-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@public.gmane.org>
2014-04-11 13:11                 ` Thomas Monjalon
2014-04-11 15:50                   ` Neil Horman
     [not found]                     ` <20140411155000.GD911-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@public.gmane.org>
2014-04-11 16:18                       ` Thomas Monjalon
2014-04-11 17:44                         ` Neil Horman
     [not found]                           ` <20140411174454.GE911-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@public.gmane.org>
2014-04-11 20:08                             ` Richardson, Bruce
     [not found]                               ` <59AF69C657FD0841A61C55336867B5B01A9FC02F-kPTMFJFq+rELt2AQoY/u9bfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-04-12  6:05                                 ` Thomas Monjalon
2014-04-12 11:03                                   ` Neil Horman
     [not found]                                     ` <20140412110317.GA30887-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@public.gmane.org>
2014-04-12 11:23                                       ` Richardson, Bruce
     [not found]                                         ` <59AF69C657FD0841A61C55336867B5B01A9FC150-kPTMFJFq+rELt2AQoY/u9bfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-04-12 14:06                                           ` Neil Horman
2014-04-14 13:20                                   ` John W. Linville
     [not found]                                     ` <20140414132053.GA27324-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
2014-04-14 13:45                                       ` Thomas Monjalon
2014-04-14 13:54                                         ` Neil Horman
2014-04-14 14:10                                         ` John W. Linville
     [not found]                                           ` <20140414141030.GB27324-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
2014-04-14 14:39                                             ` Thomas Monjalon
2014-04-11 14:31             ` Thomas Monjalon
2014-02-28 17:25   ` [PATCH 08/11] device-args: use a comma instead of semicolon to separate key/values Olivier Matz
     [not found]     ` <1393608350-4431-9-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-04-10 14:05       ` Thomas Monjalon
2014-02-28 17:25   ` [PATCH 09/11] device-args: replace use-device eal option by pci-whitelist and vdev Olivier Matz
     [not found]     ` <1393608350-4431-10-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-03-01 12:14       ` [PATCH v2 " Olivier Matz
     [not found]         ` <1393676085-17745-1-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-04-10 14:06           ` Thomas Monjalon
2014-03-03 17:14       ` [PATCH " Richardson, Bruce
     [not found]         ` <59AF69C657FD0841A61C55336867B5B01A9A16C7-kPTMFJFq+rELt2AQoY/u9bfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-03-04 13:09           ` Olivier MATZ
     [not found]             ` <5315D081.20506-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-03-04 13:14               ` Richardson, Bruce
     [not found]                 ` <59AF69C657FD0841A61C55336867B5B01A9A1AC3-kPTMFJFq+rELt2AQoY/u9bfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-03-24 22:39                   ` Thomas Monjalon
2014-02-28 17:25   ` [PATCH 10/11] device-args: allow to provide per pci device command line arguments Olivier Matz
     [not found]     ` <1393608350-4431-11-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-03-01 12:14       ` [PATCH v2 " Olivier Matz
     [not found]         ` <1393676094-17787-1-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-04-10 14:06           ` Thomas Monjalon
2014-02-28 17:25   ` [PATCH 11/11] testpmd: add several dump commands, useful for debug Olivier Matz
     [not found]     ` <1393608350-4431-12-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-03-01 12:15       ` [PATCH v2 " Olivier Matz
     [not found]         ` <1393676101-17830-1-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-04-10 14:08           ` Thomas Monjalon

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=1460632.jOzC6OEr8u@xps13 \
    --to=thomas.monjalon-pdr9zngts4eavxtiumwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    --cc=olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.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).