From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 47044A0562 for ; Thu, 18 Mar 2021 08:49:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3FDA9140EA2; Thu, 18 Mar 2021 08:49:14 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id 6ECD840698; Thu, 18 Mar 2021 08:49:11 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 1C84B5C0116; Thu, 18 Mar 2021 03:49:10 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 18 Mar 2021 03:49:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm3; bh= wM6I/YSWojqf/9IB7XS3gxRRpm9wRNIsTJBiqg/Ia2s=; b=cz+2N6+MWsbxQrUj 2kxlISskeI/HODs9RM6NXF2vXHcZ+QP9q4wsFSBAKdR/jzotGIbVNvMhwF8uB2w1 sT8gj+z2Pbdj+UMiMIwyF+6qvPjdapW6KRZJQ/LTrXCbueH2Ra8UWRoY7fCK6QmF 3+XpYr3BtN2aEFav74Uwaz9GEW16km/wsFvlrz+z+M52UTwTxpM6dKyLzEf6hnYa cG+t9ut22NF59utGg0lbrw7VulY0X94LIY0GOuupTjQh+dtq6QY/5tiIY3cW+ijr cDhr9FRsH9eRfQJ53Ze5bDigoCs/5109yK2zVR0bYfqvIZmmccrHC7e2HHze6afx OgtreA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=wM6I/YSWojqf/9IB7XS3gxRRpm9wRNIsTJBiqg/Ia 2s=; b=iOtPRUoASWdxJVYFHiUzZWXljlki+XI6SQ1B/61c9QvMwGy0Ch9Os68DK SGUEVSFhksrW23TAYdgpp30URbPIPvw+Q0LBhDfC8neverAzwlCW8tEhvHAzmIeN ebCIV4paRQpWR6RbVmx6J5WXR/IOL50Lx5siEJ4O1Nj0zPlmmXtMgRvn76HPL4yp gxIbeR6Ty3SLRcKxwn8yYnMlRvv1axpP31LaG0i5Dc6dza9hU5OvcNMPjV4J4cCk zaLv11vicawlTMEhHC5iZZcYswnHtF34pj92yp12t/EYgglINOtuaj2zmmfGd3WQ D3N2XRdARSfoxRe9ixr6uLDBULdog== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudefhedgudduudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej ueeiiedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr lhhonhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 9C75424005B; Thu, 18 Mar 2021 03:49:08 -0400 (EDT) From: Thomas Monjalon To: Ranjit Menon Cc: dev@dpdk.org, dmitry.kozliuk@gmail.com, stable@dpdk.org, Tal Shnaiderman , Narcisa Vasile , John Alexander , Pallavi Kadam , matan@nvidia.com, viacheslavo@nvidia.com Date: Thu, 18 Mar 2021 08:49:07 +0100 Message-ID: <4579147.AC5mi5QAvU@thomas> In-Reply-To: <4cf26015-a332-5a5e-bd20-bea7658aab11@intel.com> References: <20210316231153.724029-1-thomas@monjalon.net> <4cf26015-a332-5a5e-bd20-bea7658aab11@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-stable] [PATCH] bus/pci: fix Windows kernel driver categories X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 > > --- > > 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.