DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tal Shnaiderman <talshn@nvidia.com>
To: Pallavi Kadam <pallavi.kadam@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	NBU-Contact-Thomas Monjalon <thomas@monjalon.net>
Cc: "ranjit.menon@intel.com" <ranjit.menon@intel.com>,
	"dmitry.kozliuk@gmail.com" <dmitry.kozliuk@gmail.com>,
	"Narcisa.Vasile@microsoft.com" <Narcisa.Vasile@microsoft.com>
Subject: Re: [dpdk-dev] [PATCH v2] bus/pci: fix probing for non-netuio bound devices
Date: Thu, 11 Feb 2021 19:30:50 +0000	[thread overview]
Message-ID: <BY5PR12MB39380C3C64A13F6E27039867A48C9@BY5PR12MB3938.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20210210203654.10132-1-pallavi.kadam@intel.com>

> Subject: [PATCH v2] bus/pci: fix probing for non-netuio bound devices
> 
> External email: Use caution opening links or attachments
> 
> 
> Implement rte_pci_map_device() to distinguish between the devices bound
> to netuio and NDIS devices.
> Only return success for the netuio devices.
> 
> v2 changes:
>         - Extended the comment to mention about mapping
>         - replaced the return errno value with -1
> 
> Suggested-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
> Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
> ---
>  drivers/bus/pci/windows/pci.c | 16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
> index f66258452..00e7849b0 100644
> --- a/drivers/bus/pci/windows/pci.c
> +++ b/drivers/bus/pci/windows/pci.c
> @@ -23,20 +23,22 @@
> DEFINE_DEVPROPKEY(DEVPKEY_Device_Numa_Node, 0x540b947e, 0x8b40,
> 0x45bc,
>   * the registry hive for PCI devices.
>   */
> 
> -/* The functions below are not implemented on Windows,
> +/* Some of the functions below are not implemented on Windows,
>   * but need to be defined for compilation purposes
>   */
> 
>  /* Map pci device */
>  int
> -rte_pci_map_device(struct rte_pci_device *dev __rte_unused)
> +rte_pci_map_device(struct rte_pci_device *dev)
>  {
> -       /* This function is not implemented on Windows.
> -        * We really should short-circuit the call to these functions by
> -        * clearing the RTE_PCI_DRV_NEED_MAPPING flag
> -        * in the rte_pci_driver flags.
> +       /* Only return success for devices bound to netuio.
> +        * Devices that are bound to netuio are mapped at
> +        * the bus probing stage.
>          */
> -       return 0;
> +       if (dev->kdrv == RTE_PCI_KDRV_NIC_UIO)
> +               return 0;
> +       else
> +               return -1;
>  }
> 
>  /* Unmap pci device */
> --
> 2.18.0.windows.1

Acked-by: Tal Shnaiderman <talshn@nvidia.com>

  reply	other threads:[~2021-02-11 19:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10  1:40 [dpdk-dev] [PATCH] " Pallavi Kadam
2021-02-10  6:00 ` Tal Shnaiderman
2021-02-10 20:47   ` Kadam, Pallavi
2021-02-10 20:36 ` [dpdk-dev] [PATCH v2] " Pallavi Kadam
2021-02-11 19:30   ` Tal Shnaiderman [this message]
2021-03-16 11:20     ` Thomas Monjalon
2021-03-17 16:41       ` Kadam, Pallavi
2021-03-05  2:04   ` Narcisa Ana Maria Vasile
2021-03-05  2:02 ` [dpdk-dev] [PATCH] " Narcisa Ana Maria Vasile

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=BY5PR12MB39380C3C64A13F6E27039867A48C9@BY5PR12MB3938.namprd12.prod.outlook.com \
    --to=talshn@nvidia.com \
    --cc=Narcisa.Vasile@microsoft.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=pallavi.kadam@intel.com \
    --cc=ranjit.menon@intel.com \
    --cc=thomas@monjalon.net \
    /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).