Skip to content

Commit

Permalink
bus/pci: fix build with Windows SDK >= 10.0.20253
Browse files Browse the repository at this point in the history
[ upstream commit 6605c7f ]

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: c76ec01 (bus/pci: support netuio on Windows)

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
  • Loading branch information
Tyler Retzlaff authored and bluca committed Feb 4, 2021
1 parent 0143818 commit 508b619
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/bus/pci/windows/pci_netuio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 2 additions & 0 deletions drivers/bus/pci/windows/pci_netuio.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
#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);

/* 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 \
Expand Down

0 comments on commit 508b619

Please sign in to comment.