patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ranjit Menon <ranjit.menon@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, dmitry.kozliuk@gmail.com, stable@dpdk.org,
	Tal Shnaiderman <talshn@mellanox.com>,
	Narcisa Vasile <navasile@linux.microsoft.com>,
	John Alexander <john.alexander@datapath.co.uk>,
	Pallavi Kadam <pallavi.kadam@intel.com>,
	matan@nvidia.com, viacheslavo@nvidia.com
Subject: Re: [dpdk-stable] [PATCH] bus/pci: fix Windows kernel driver categories
Date: Thu, 18 Mar 2021 15:00:21 -0700	[thread overview]
Message-ID: <e8a46def-fa3d-2a2f-7205-05a7f1245d3f@intel.com> (raw)
In-Reply-To: <4579147.AC5mi5QAvU@thomas>


On 3/18/2021 12:49 AM, Thomas Monjalon wrote:
> 18/03/2021 00:17, Ranjit Menon:
>> Hi Thomas,
>>
>> On 3/16/2021 4:11 PM, Thomas Monjalon wrote:
>>> In Windows probing, the value RTE_PCI_KDRV_NONE was used
>>> instead of RTE_PCI_KDRV_UNKNOWN (mlx case),
>>> and RTE_PCI_KDRV_NIC_UIO (FreeBSD) was re-used
>>> instead of having a new RTE_PCI_KDRV_NET_UIO for Windows NetUIO.
>> Shouldn't the mlx case actually remain RTE_PCI_KDRV_NONE?
>>
>> mlx does not require a UIO-like kernel driver...No? And NONE implies that no kernel driver is used/required.
>> Not sure what is correct here.
> No this is a bifurcated model, meaning kernel and userland
> work together. The PCI device is bound to the kernel driver,
> but the driver is not listed because no special treatment is required.
>
>>> While adding the new value RTE_PCI_KDRV_NET_UIO,
>>> the enum of kernel driver categories is annotated.
>>>
>>> Fixes: b762221ac24f ("bus/pci: support Windows with bifurcated drivers")
>>> Fixes: c76ec01b4591 ("bus/pci: support netuio on Windows")
>>> Cc: stable@dpdk.org
>>>
>>> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
>>> ---
>>>    drivers/bus/pci/rte_bus_pci.h | 13 +++++++------
>>>    drivers/bus/pci/windows/pci.c | 14 +++++++-------
>>>    2 files changed, 14 insertions(+), 13 deletions(-)
>>>
>>> diff --git a/drivers/bus/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.h
>>> index fdda046515..3d009cc74b 100644
>>> --- a/drivers/bus/pci/rte_bus_pci.h
>>> +++ b/drivers/bus/pci/rte_bus_pci.h
>>> @@ -52,12 +52,13 @@ TAILQ_HEAD(rte_pci_driver_list, rte_pci_driver);
>>>    struct rte_devargs;
>>>    
>>>    enum rte_pci_kernel_driver {
>>> -	RTE_PCI_KDRV_UNKNOWN = 0,
>>> -	RTE_PCI_KDRV_IGB_UIO,
>>> -	RTE_PCI_KDRV_VFIO,
>>> -	RTE_PCI_KDRV_UIO_GENERIC,
>>> -	RTE_PCI_KDRV_NIC_UIO,
>>> -	RTE_PCI_KDRV_NONE,
>>> +	RTE_PCI_KDRV_UNKNOWN = 0,  /* not listed - may be a bifurcated driver */
>>> +	RTE_PCI_KDRV_IGB_UIO,      /* igb_uio for Linux */
>>> +	RTE_PCI_KDRV_VFIO,         /* VFIO for Linux */
>>> +	RTE_PCI_KDRV_UIO_GENERIC,  /* uio_generic for Linux */
>>> +	RTE_PCI_KDRV_NIC_UIO,      /* nic_uio for FreeBSD */
>>> +	RTE_PCI_KDRV_NONE,         /* error */
>>> +	RTE_PCI_KDRV_NET_UIO,      /* NetUIO for Windows */
>>>    };
>>>    
>> Any chance we can re-order the enums, so that _NONE and _UNKNOWN are at
>> the top?
> No, it would break the ABI.
>
>> This will change the value, and break code where this value was
>> hard-coded. But how likely is that...?
> The problem is when loading the new PCI bus driver with an old device driver.
>
>
>
OK. Thanks for the explanation, Thomas.

ranjit m.


  reply	other threads:[~2021-03-18 22:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 23:11 Thomas Monjalon
2021-03-17 22:43 ` Dmitry Kozlyuk
2021-03-18  7:43   ` Thomas Monjalon
2021-03-17 23:17 ` Ranjit Menon
2021-03-18  7:49   ` Thomas Monjalon
2021-03-18 22:00     ` Ranjit Menon [this message]
2021-03-18  8:36 ` [dpdk-stable] [dpdk-dev] " Slava Ovsiienko
2021-03-18 10:45   ` Thomas Monjalon
2021-03-18 10:48 ` [dpdk-stable] [PATCH v2] " Thomas Monjalon
2021-03-18 12:00   ` Tal Shnaiderman
2021-03-18 22:07   ` Ranjit Menon
2021-03-19 15:24     ` [dpdk-stable] [dpdk-dev] " 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=e8a46def-fa3d-2a2f-7205-05a7f1245d3f@intel.com \
    --to=ranjit.menon@intel.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=john.alexander@datapath.co.uk \
    --cc=matan@nvidia.com \
    --cc=navasile@linux.microsoft.com \
    --cc=pallavi.kadam@intel.com \
    --cc=stable@dpdk.org \
    --cc=talshn@mellanox.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    /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).