[dpdk-dev] [PATCH v3 4/8] eal: Consolidate rte_eal_pci_probe/close_one_driver() of linuxapp and bsdapp

Bruce Richardson bruce.richardson at intel.com
Mon Jun 29 17:28:37 CEST 2015


On Mon, Jun 29, 2015 at 11:56:46AM +0900, Tetsuya Mukawa wrote:
> From: "Tetsuya.Mukawa" <mukawa at igel.co.jp>
> 
> This patch consolidates below functions, and implements these in common
> eal code.
>  - rte_eal_pci_probe_one_driver()
>  - rte_eal_pci_close_one_driver()
> 
> Because pci_map_device() is only implemented in linuxapp, the patch
> implements it in bsdapp too. This implemented function will be merged to
> linuxapp one with later patch.
> 
> Signed-off-by: Tetsuya Mukawa <mukawa at igel.co.jp>
> ---
>  lib/librte_eal/bsdapp/eal/eal_pci.c    |  74 ++---------------
>  lib/librte_eal/common/eal_common_pci.c | 129 ++++++++++++++++++++++++++++
>  lib/librte_eal/common/eal_private.h    |  21 ++---
>  lib/librte_eal/linuxapp/eal/eal_pci.c  | 148 ++-------------------------------
>  4 files changed, 153 insertions(+), 219 deletions(-)
> 
> diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c
> index c7017eb..2a623e3 100644
> --- a/lib/librte_eal/bsdapp/eal/eal_pci.c
> +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c
> @@ -88,7 +88,7 @@ static struct rte_tailq_elem rte_uio_tailq = {
>  EAL_REGISTER_TAILQ(rte_uio_tailq)
>  
>  /* unbind kernel driver for this device */
> -static int
> +int
>  pci_unbind_kernel_driver(struct rte_pci_device *dev __rte_unused)
>  {
>  	RTE_LOG(ERR, EAL, "RTE_PCI_DRV_FORCE_UNBIND flag is not implemented "
> @@ -430,6 +430,13 @@ skipdev:
>  	return 0;
>  }
>  
> +/* Map pci device */
> +int
> +pci_map_device(struct rte_pci_device *dev)
> +{
> +	return pci_uio_map_resource(dev);
> +}
> +
These lines are added here, but removed again in the next patch in the series.
Though not wrong, per-se, it just seems untidy. Perhaps the patchset order needs
to be changed somewhat?

/Bruce


More information about the dev mailing list