[dpdk-dev] [PATCH v5] windows/netuio: add Windows NetUIO kernel driver

Ranjit Menon ranjit.menon at intel.com
Fri Oct 2 20:21:54 CEST 2020


On 10/1/2020 3:55 PM, Narcisa Ana Maria Vasile wrote:
> From: Narcisa Vasile <navasile at microsoft.com>
>
> The Windows netuio kernel driver provides the DPDK userspace application
> with direct access to hardware, by mapping the HW registers in userspace
> and allowing read/write operations from/to the device
> configuration space.
>
> Two IOCTLs are defined by the netuio interface:
>    * IOCTL_NETUIO_MAP_HW_INTO_USERSPACE
>        - used for mapping the device registers into userspace
>    * IOCTL_NETUIO_PCI_CONFIG_IO
>        - used to read/write from/into the device configuration space
>
> Note:
> Requests to map the device BARs into userspace need to be processed
> in the thread context of the process that initiated the mapping request.
> Otherwise, the BARs might end up mapped into an arbitrary process
> address space.
> EvtIoInCallerContext is used to ensure the requests are handled
> in the right user thread context. Other requests (PCI config)
> are sent back to the framework and processed by the EvtIoDeviceControl
> callback.
>
> Cc: Harini Ramakrishnan <Harini.Ramakrishnan at microsoft.com>
> Cc: Omar Cardona <ocardona at microsoft.com>
> Cc: Dmitry Malloy <dmitrym at microsoft.com>
> Signed-off-by: Narcisa Vasile <navasile at microsoft.com>
> ---
>
> v5:
> * Changed the name of the IOCTL for clarity
>
>   windows/.gitattributes                |   4 +
>   windows/.gitignore                    |   2 +
>   windows/netuio/README.rst             |  58 +++++
>   windows/netuio/netuio.inf             |  77 ++++++
>   windows/netuio/netuio.sln             |  24 ++
>   windows/netuio/netuio.vcxproj         | 113 +++++++++
>   windows/netuio/netuio.vcxproj.filters |  54 +++++
>   windows/netuio/netuio_dev.c           | 273 +++++++++++++++++++++
>   windows/netuio/netuio_dev.h           |  66 +++++
>   windows/netuio/netuio_drv.c           | 131 ++++++++++
>   windows/netuio/netuio_drv.h           |  30 +++
>   windows/netuio/netuio_interface.h     |  88 +++++++
>   windows/netuio/netuio_queue.c         | 334 ++++++++++++++++++++++++++
>   windows/netuio/netuio_queue.h         |  21 ++
>   14 files changed, 1275 insertions(+)
>   create mode 100644 windows/.gitattributes
>   create mode 100644 windows/.gitignore
>   create mode 100644 windows/netuio/README.rst
>   create mode 100644 windows/netuio/netuio.inf
>   create mode 100644 windows/netuio/netuio.sln
>   create mode 100644 windows/netuio/netuio.vcxproj
>   create mode 100644 windows/netuio/netuio.vcxproj.filters
>   create mode 100644 windows/netuio/netuio_dev.c
>   create mode 100644 windows/netuio/netuio_dev.h
>   create mode 100644 windows/netuio/netuio_drv.c
>   create mode 100644 windows/netuio/netuio_drv.h
>   create mode 100644 windows/netuio/netuio_interface.h
>   create mode 100644 windows/netuio/netuio_queue.c
>   create mode 100644 windows/netuio/netuio_queue.h

We'll need to do a code-style cleanup at some point, but for now:

Reviewed-by: Ranjit Menon <ranjit.menon at intel.com>

Acked-by: Ranjit Menon <ranjit.menon at intel.com>



More information about the dev mailing list