DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] bus/pci/windows: guard against sdk/dpdk guid collision
@ 2021-01-12 22:33 Tyler Retzlaff
  2021-01-12 22:41 ` [dpdk-dev] [PATCH v2] " Tyler Retzlaff
  2021-01-13 17:20 ` [dpdk-dev] [PATCH] bus/pci/windows: guard against sdk/dpdk guid collision Dmitry Kozlyuk
  0 siblings, 2 replies; 9+ messages in thread
From: Tyler Retzlaff @ 2021-01-12 22:33 UTC (permalink / raw)
  To: dev; +Cc: dmitry.kozliuk

DEVCLASS and DEVINTERFACE guids are defined/managed by the windows
platform sdk headers.

* hide dpdk defined GUID_DEVCLASS_NETUIO and GUID_DEVINTERFACE_NETUIO if
  the NTDDI_VERSION >= 0x0A00000A
* include <ndisguid.h> for windows sdk defined GUID_DEVINTERFACE_NETUIO

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 drivers/bus/pci/windows/pci_netuio.c | 2 ++
 drivers/bus/pci/windows/pci_netuio.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/drivers/bus/pci/windows/pci_netuio.c b/drivers/bus/pci/windows/pci_netuio.c
index 670194839..e2bf45724 100644
--- a/drivers/bus/pci/windows/pci_netuio.c
+++ b/drivers/bus/pci/windows/pci_netuio.c
@@ -7,6 +7,8 @@
 #include <rte_log.h>
 #include <rte_eal.h>
 
+#include <ndisguid.h>
+
 #include "private.h"
 #include "pci_netuio.h"
 
diff --git a/drivers/bus/pci/windows/pci_netuio.h b/drivers/bus/pci/windows/pci_netuio.h
index 9a77806b5..2bf5a201a 100644
--- a/drivers/bus/pci/windows/pci_netuio.h
+++ b/drivers/bus/pci/windows/pci_netuio.h
@@ -5,6 +5,7 @@
 #ifndef _PCI_NETUIO_H_
 #define _PCI_NETUIO_H_
 
+#if (! defined(NTDDI_WIN10_FE) || NTDDI_VERSION < NTDDI_WIN10_FE)
 /* GUID definition for device class netUIO */
 DEFINE_GUID(GUID_DEVCLASS_NETUIO, 0x78912bc1, 0xcb8e, 0x4b28,
 	0xa3, 0x29, 0xf3, 0x22, 0xeb, 0xad, 0xbe, 0x0f);
@@ -12,6 +13,7 @@ DEFINE_GUID(GUID_DEVCLASS_NETUIO, 0x78912bc1, 0xcb8e, 0x4b28,
 /* GUID definition for the netuio device interface */
 DEFINE_GUID(GUID_DEVINTERFACE_NETUIO, 0x08336f60, 0x0679, 0x4c6c,
 	0x85, 0xd2, 0xae, 0x7c, 0xed, 0x65, 0xff, 0xf7);
+#endif
 
 /* IOCTL code definitions */
 #define IOCTL_NETUIO_MAP_HW_INTO_USERSPACE \
-- 
2.29.0.vfs.0.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-dev] [PATCH v2] bus/pci/windows: guard against sdk/dpdk guid collision
  2021-01-12 22:33 [dpdk-dev] [PATCH] bus/pci/windows: guard against sdk/dpdk guid collision Tyler Retzlaff
@ 2021-01-12 22:41 ` Tyler Retzlaff
  2021-01-14 21:22   ` [dpdk-dev] [PATCH v3] pci/windows: fix build with SDK >= 10.0.20253 Tyler Retzlaff
  2021-01-13 17:20 ` [dpdk-dev] [PATCH] bus/pci/windows: guard against sdk/dpdk guid collision Dmitry Kozlyuk
  1 sibling, 1 reply; 9+ messages in thread
From: Tyler Retzlaff @ 2021-01-12 22:41 UTC (permalink / raw)
  To: dev; +Cc: dmitry.kozliuk

DEVCLASS and DEVINTERFACE guids are defined/managed by the windows
platform sdk headers.

* hide dpdk defined GUID_DEVCLASS_NETUIO and GUID_DEVINTERFACE_NETUIO if
  the NTDDI_VERSION >= 0x0A00000A
* include <ndisguid.h> for windows sdk defined GUID_DEVINTERFACE_NETUIO

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 drivers/bus/pci/windows/pci_netuio.c | 2 ++
 drivers/bus/pci/windows/pci_netuio.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/drivers/bus/pci/windows/pci_netuio.c b/drivers/bus/pci/windows/pci_netuio.c
index 670194839..e2bf45724 100644
--- a/drivers/bus/pci/windows/pci_netuio.c
+++ b/drivers/bus/pci/windows/pci_netuio.c
@@ -7,6 +7,8 @@
 #include <rte_log.h>
 #include <rte_eal.h>
 
+#include <ndisguid.h>
+
 #include "private.h"
 #include "pci_netuio.h"
 
diff --git a/drivers/bus/pci/windows/pci_netuio.h b/drivers/bus/pci/windows/pci_netuio.h
index 9a77806b5..f72c6cc38 100644
--- a/drivers/bus/pci/windows/pci_netuio.h
+++ b/drivers/bus/pci/windows/pci_netuio.h
@@ -5,6 +5,7 @@
 #ifndef _PCI_NETUIO_H_
 #define _PCI_NETUIO_H_
 
+#if (!defined(NTDDI_WIN10_FE) || NTDDI_VERSION < NTDDI_WIN10_FE)
 /* GUID definition for device class netUIO */
 DEFINE_GUID(GUID_DEVCLASS_NETUIO, 0x78912bc1, 0xcb8e, 0x4b28,
 	0xa3, 0x29, 0xf3, 0x22, 0xeb, 0xad, 0xbe, 0x0f);
@@ -12,6 +13,7 @@ DEFINE_GUID(GUID_DEVCLASS_NETUIO, 0x78912bc1, 0xcb8e, 0x4b28,
 /* GUID definition for the netuio device interface */
 DEFINE_GUID(GUID_DEVINTERFACE_NETUIO, 0x08336f60, 0x0679, 0x4c6c,
 	0x85, 0xd2, 0xae, 0x7c, 0xed, 0x65, 0xff, 0xf7);
+#endif
 
 /* IOCTL code definitions */
 #define IOCTL_NETUIO_MAP_HW_INTO_USERSPACE \
-- 
2.29.0.vfs.0.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH] bus/pci/windows: guard against sdk/dpdk guid collision
  2021-01-12 22:33 [dpdk-dev] [PATCH] bus/pci/windows: guard against sdk/dpdk guid collision Tyler Retzlaff
  2021-01-12 22:41 ` [dpdk-dev] [PATCH v2] " Tyler Retzlaff
@ 2021-01-13 17:20 ` Dmitry Kozlyuk
  2021-01-14  7:59   ` Tyler Retzlaff
  1 sibling, 1 reply; 9+ messages in thread
From: Dmitry Kozlyuk @ 2021-01-13 17:20 UTC (permalink / raw)
  To: Tyler Retzlaff; +Cc: dev

On Tue, 12 Jan 2021 14:33:41 -0800, Tyler Retzlaff wrote:
> DEVCLASS and DEVINTERFACE guids are defined/managed by the windows
> platform sdk headers.

Please write names and acronyms in proper case in all human-readable text
(commit subject except topic, commit message, log messages).

> * hide dpdk defined GUID_DEVCLASS_NETUIO and GUID_DEVINTERFACE_NETUIO if
>   the NTDDI_VERSION >= 0x0A00000A
> * include <ndisguid.h> for windows sdk defined GUID_DEVINTERFACE_NETUIO

This translates the code almost verbatim, not needed. Instead you could state
which SDK versions are affected. Suggested wording:

	pci/windows: fix build with SDK 10.0.xxxxx

	NetUIO device class and interface GUIDs are defined in system
	headers starting from platform SDK v10.0.xxxxx. Inspect SDK version
	to avoid redefinition.

	Fixes: hhhhhhhhhhhh ("...")
	Cc: stable@dpdk.org

	Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>

I can't find which "xxxxx" corresponds to NTDDI_WIN10_FE.

"hhhhhhhhhhhh" are 12 chars of the hash of the commit which introduced the
code you fixed. "..." is said commit subject. This info is needed to backport
your fix to stable branch, so that it can also be built with newer SDK. May
not be very important until Windows port gets its users, I mostly tell it to
illustrate the process.

> +#if (! defined(NTDDI_WIN10_FE) || NTDDI_VERSION < NTDDI_WIN10_FE)

Braces are redundant here and DPDK style is to avoid them (see rte_common.h).

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH] bus/pci/windows: guard against sdk/dpdk guid collision
  2021-01-13 17:20 ` [dpdk-dev] [PATCH] bus/pci/windows: guard against sdk/dpdk guid collision Dmitry Kozlyuk
@ 2021-01-14  7:59   ` Tyler Retzlaff
  0 siblings, 0 replies; 9+ messages in thread
From: Tyler Retzlaff @ 2021-01-14  7:59 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: dev

On Wed, Jan 13, 2021 at 08:20:34PM +0300, Dmitry Kozlyuk wrote:
> 	pci/windows: fix build with SDK 10.0.xxxxx
> 
> 	NetUIO device class and interface GUIDs are defined in system
> 	headers starting from platform SDK v10.0.xxxxx. Inspect SDK version
> 	to avoid redefinition.
> 
> 	Fixes: hhhhhhhhhhhh ("...")
> 	Cc: stable@dpdk.org
> 
> 	Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> 
> I can't find which "xxxxx" corresponds to NTDDI_WIN10_FE.

there won't be a specific sdk/kit that corresponds. the best i can offer
is to include in the message the latest sdk/kit version for that platform
version.

also be aware since there is no 1:1 alignment between NTDDI_VERSION and
the sdk/kit build where the conflicting GUID definitions were introduced
there will still be a subset of eal/pre-release kits if installed that will
lead to compilation failure of dpdk even with this change. i'll also add
a note in the commit message about this limitation.

windows doesn't promise api compatibility for pre-release kits and there is
no approved mechanism / versioning to provide such compatibility.

> "hhhhhhhhhhhh" are 12 chars of the hash of the commit which introduced the
> code you fixed. "..." is said commit subject. This info is needed to backport
> your fix to stable branch, so that it can also be built with newer SDK. May
> not be very important until Windows port gets its users, I mostly tell it to
> illustrate the process.

yes, understood this one is definitely appropriate for backport

> > +#if (! defined(NTDDI_WIN10_FE) || NTDDI_VERSION < NTDDI_WIN10_FE)
> 
> Braces are redundant here and DPDK style is to avoid them (see rte_common.h).

yes, sorry will fix. best part is i don't like redundant braces i just added
them because i encounter so many people who do. (can't win really)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-dev] [PATCH v3] pci/windows: fix build with SDK >= 10.0.20253
  2021-01-12 22:41 ` [dpdk-dev] [PATCH v2] " Tyler Retzlaff
@ 2021-01-14 21:22   ` Tyler Retzlaff
  2021-01-14 22:06     ` Dmitry Kozlyuk
  2021-01-14 22:59     ` Ranjit Menon
  0 siblings, 2 replies; 9+ messages in thread
From: Tyler Retzlaff @ 2021-01-14 21:22 UTC (permalink / raw)
  To: dev; +Cc: stable, dmitry.kozliuk

NetUIO device class and interface GUIDs are defined in system
headers starting from platform SDK v10.0.20253. Inspect SDK
version to avoid redefinition.

Pre-release SDKs do not promise compatibility and a narrow
subset of SDKs may still be subject to redefinition.

Fixes: c76ec01b4591 (bus/pci: support netuio on Windows)
Cc: stable@dpdk.org

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 drivers/bus/pci/windows/pci_netuio.c | 6 ++++++
 drivers/bus/pci/windows/pci_netuio.h | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/drivers/bus/pci/windows/pci_netuio.c b/drivers/bus/pci/windows/pci_netuio.c
index 670194839..1bf9133f7 100644
--- a/drivers/bus/pci/windows/pci_netuio.c
+++ b/drivers/bus/pci/windows/pci_netuio.c
@@ -7,6 +7,12 @@
 #include <rte_log.h>
 #include <rte_eal.h>
 
+#ifdef __MINGW32__
+#include <ddk/ndisguid.h>
+#else
+#include <ndisguid.h>
+#endif
+
 #include "private.h"
 #include "pci_netuio.h"
 
diff --git a/drivers/bus/pci/windows/pci_netuio.h b/drivers/bus/pci/windows/pci_netuio.h
index 9a77806b5..2f6c97ea7 100644
--- a/drivers/bus/pci/windows/pci_netuio.h
+++ b/drivers/bus/pci/windows/pci_netuio.h
@@ -5,6 +5,7 @@
 #ifndef _PCI_NETUIO_H_
 #define _PCI_NETUIO_H_
 
+#if !defined(NTDDI_WIN10_FE) || NTDDI_VERSION < NTDDI_WIN10_FE
 /* GUID definition for device class netUIO */
 DEFINE_GUID(GUID_DEVCLASS_NETUIO, 0x78912bc1, 0xcb8e, 0x4b28,
 	0xa3, 0x29, 0xf3, 0x22, 0xeb, 0xad, 0xbe, 0x0f);
@@ -12,6 +13,7 @@ DEFINE_GUID(GUID_DEVCLASS_NETUIO, 0x78912bc1, 0xcb8e, 0x4b28,
 /* GUID definition for the netuio device interface */
 DEFINE_GUID(GUID_DEVINTERFACE_NETUIO, 0x08336f60, 0x0679, 0x4c6c,
 	0x85, 0xd2, 0xae, 0x7c, 0xed, 0x65, 0xff, 0xf7);
+#endif
 
 /* IOCTL code definitions */
 #define IOCTL_NETUIO_MAP_HW_INTO_USERSPACE \
-- 
2.29.0.vfs.0.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v3] pci/windows: fix build with SDK >= 10.0.20253
  2021-01-14 21:22   ` [dpdk-dev] [PATCH v3] pci/windows: fix build with SDK >= 10.0.20253 Tyler Retzlaff
@ 2021-01-14 22:06     ` Dmitry Kozlyuk
  2021-01-15 13:50       ` Thomas Monjalon
  2021-01-14 22:59     ` Ranjit Menon
  1 sibling, 1 reply; 9+ messages in thread
From: Dmitry Kozlyuk @ 2021-01-14 22:06 UTC (permalink / raw)
  To: Tyler Retzlaff; +Cc: dev, stable

On Thu, 14 Jan 2021 13:22:35 -0800, Tyler Retzlaff wrote:
> NetUIO device class and interface GUIDs are defined in system
> headers starting from platform SDK v10.0.20253. Inspect SDK
> version to avoid redefinition.
> 
> Pre-release SDKs do not promise compatibility and a narrow
> subset of SDKs may still be subject to redefinition.
> 
> Fixes: c76ec01b4591 (bus/pci: support netuio on Windows)
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>

Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v3] pci/windows: fix build with SDK >= 10.0.20253
  2021-01-14 21:22   ` [dpdk-dev] [PATCH v3] pci/windows: fix build with SDK >= 10.0.20253 Tyler Retzlaff
  2021-01-14 22:06     ` Dmitry Kozlyuk
@ 2021-01-14 22:59     ` Ranjit Menon
  2021-01-15  5:34       ` Tyler Retzlaff
  1 sibling, 1 reply; 9+ messages in thread
From: Ranjit Menon @ 2021-01-14 22:59 UTC (permalink / raw)
  To: Tyler Retzlaff, dev; +Cc: stable, dmitry.kozliuk


On 1/14/2021 1:22 PM, Tyler Retzlaff wrote:
> NetUIO device class and interface GUIDs are defined in system
> headers starting from platform SDK v10.0.20253. Inspect SDK
> version to avoid redefinition.
>
> Pre-release SDKs do not promise compatibility and a narrow
> subset of SDKs may still be subject to redefinition.
>
> Fixes: c76ec01b4591 (bus/pci: support netuio on Windows)
> Cc: stable@dpdk.org
>
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> ---
>   drivers/bus/pci/windows/pci_netuio.c | 6 ++++++
>   drivers/bus/pci/windows/pci_netuio.h | 2 ++
>   2 files changed, 8 insertions(+)
>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>


Quick q: Do you know when this new SDK will be available publicly?

ranjit m.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v3] pci/windows: fix build with SDK >= 10.0.20253
  2021-01-14 22:59     ` Ranjit Menon
@ 2021-01-15  5:34       ` Tyler Retzlaff
  0 siblings, 0 replies; 9+ messages in thread
From: Tyler Retzlaff @ 2021-01-15  5:34 UTC (permalink / raw)
  To: Ranjit Menon; +Cc: dev

On Thu, Jan 14, 2021 at 02:59:44PM -0800, Ranjit Menon wrote:

> Quick q: Do you know when this new SDK will be available publicly?

there are periodic release of the sdk [2] that match the versions of windows
available through the windows insider program [1].

i can see the latest available appears to be 20279 (so later) than the
kit i referenced in the change. so to answer your question a newer kit
is available now. just remember preview kits do not provide a compatibility
guarantee i.e. api and abi may change

[1] https://insider.windows.com/en-us/
[2] https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewSDK


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v3] pci/windows: fix build with SDK >= 10.0.20253
  2021-01-14 22:06     ` Dmitry Kozlyuk
@ 2021-01-15 13:50       ` Thomas Monjalon
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Monjalon @ 2021-01-15 13:50 UTC (permalink / raw)
  To: Tyler Retzlaff; +Cc: dev, stable, Dmitry Kozlyuk

14/01/2021 23:06, Dmitry Kozlyuk:
> On Thu, 14 Jan 2021 13:22:35 -0800, Tyler Retzlaff wrote:
> > NetUIO device class and interface GUIDs are defined in system
> > headers starting from platform SDK v10.0.20253. Inspect SDK
> > version to avoid redefinition.
> > 
> > Pre-release SDKs do not promise compatibility and a narrow
> > subset of SDKs may still be subject to redefinition.
> > 
> > Fixes: c76ec01b4591 (bus/pci: support netuio on Windows)
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> 
> Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

Applied, thanks



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-01-15 13:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 22:33 [dpdk-dev] [PATCH] bus/pci/windows: guard against sdk/dpdk guid collision Tyler Retzlaff
2021-01-12 22:41 ` [dpdk-dev] [PATCH v2] " Tyler Retzlaff
2021-01-14 21:22   ` [dpdk-dev] [PATCH v3] pci/windows: fix build with SDK >= 10.0.20253 Tyler Retzlaff
2021-01-14 22:06     ` Dmitry Kozlyuk
2021-01-15 13:50       ` Thomas Monjalon
2021-01-14 22:59     ` Ranjit Menon
2021-01-15  5:34       ` Tyler Retzlaff
2021-01-13 17:20 ` [dpdk-dev] [PATCH] bus/pci/windows: guard against sdk/dpdk guid collision Dmitry Kozlyuk
2021-01-14  7:59   ` Tyler Retzlaff

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).