Skip to contentSkip to conversation

Hyper-V Netvsc PMD

PATCH Superseded Stephen Hemminger 3 participants 15 messages Apr 17, 2018 – Apr 19, 2018

Subsystems (2)

v3 of 12 Superseded Latest is v12 →

lore
Share & tools
lore
#0 lore raw

v3 cover Hyper-V Netvsc PMD

This is a revised version of the Hyper-V native bus (VMBus) and network device (netvsc) drivers. This virtual device is used in Microsoft Hyper-V in Windows 10, Windows Server 2016 and Azure. Most of this code was extracted from FreeBSD and some of this is from earlier code donated by Brocade.

Only Linux is supported at present, but the code is split to allow future FreeBSD and Windows support.

This version works with upstream kernel (4.16) but in that mode only a single queue is supported. With additional patches that are pending for 5.0 kernel, multi-queue support works as well.

Device binding is best done via driverctl; this required some additional fixes to kernel and driverctl to work correctly. Linux kernel vmbus support needed to support sysfs driver_override and driverctl needed to handle non-PCI bus from udev.
https://gitlab.com/driverctl/driverctl/merge_requests/3
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-April/118889.html

v3
- fix documentation to format correctly and include more info about binding
- fix build on 32 bit
- minor white space and indentation fixes

Stephen Hemminger (4):
bus/vmbus: add hyper-v virtual bus support net/netvsc: add hyper-v netvsc network device net/netvsc: add documentation
bus/vmbus and net/netvsc: add meson build support

 MAINTAINERS                                   |   10 +
 config/common_base                            |   13 +
 config/common_linuxapp                        |    4 +
 config/meson.build                            |    7 +
 doc/guides/nics/index.rst                     |    1 +
 doc/guides/nics/netvsc.rst                    |   97 ++
 doc/guides/rel_notes/release_18_05.rst        |    6 +
 drivers/bus/Makefile                          |    1 +
 drivers/bus/meson.build                       |    2 +-
 drivers/bus/vmbus/Makefile                    |   36 +
 drivers/bus/vmbus/linux/Makefile              |    3 +
 drivers/bus/vmbus/linux/vmbus_bus.c           |  355 +++++
 drivers/bus/vmbus/linux/vmbus_uio.c           |  381 +++++
 drivers/bus/vmbus/meson.build                 |   17 +
 drivers/bus/vmbus/private.h                   |  132 ++
 drivers/bus/vmbus/rte_bus_vmbus.h             |  400 ++++++
 drivers/bus/vmbus/rte_bus_vmbus_version.map   |   28 +
 drivers/bus/vmbus/rte_vmbus_reg.h             |  344 +++++
 drivers/bus/vmbus/vmbus_bufring.c             |  241 ++++
 drivers/bus/vmbus/vmbus_channel.c             |  405 ++++++
 drivers/bus/vmbus/vmbus_common.c              |  286 ++++
 drivers/bus/vmbus/vmbus_common_uio.c          |  232 ++++
 drivers/net/Makefile                          |    1 +
 drivers/net/meson.build                       |    2 +-
 drivers/net/netvsc/Makefile                   |   23 +
 drivers/net/netvsc/hn_ethdev.c                |  760 ++++++++++
 drivers/net/netvsc/hn_logs.h                  |   35 +
 drivers/net/netvsc/hn_nvs.c                   |  533 +++++++
 drivers/net/netvsc/hn_nvs.h                   |  243 ++++
 drivers/net/netvsc/hn_rndis.c                 | 1101 +++++++++++++++
 drivers/net/netvsc/hn_rndis.h                 |   26 +
 drivers/net/netvsc/hn_rxtx.c                  | 1221 +++++++++++++++++
 drivers/net/netvsc/hn_var.h                   |  140 ++
 drivers/net/netvsc/meson.build                |   13 +
 drivers/net/netvsc/ndis.h                     |  378 +++++
 drivers/net/netvsc/rndis.h                    |  414 ++++++
 drivers/net/netvsc/rte_pmd_netvsc_version.map |    5 +
 mk/rte.app.mk                                 |    2 +
 38 files changed, 7896 insertions(+), 2 deletions(-)
 create mode 100644 doc/guides/nics/netvsc.rst
 create mode 100644 drivers/bus/vmbus/Makefile
 create mode 100644 drivers/bus/vmbus/linux/Makefile
 create mode 100644 drivers/bus/vmbus/linux/vmbus_bus.c
 create mode 100644 drivers/bus/vmbus/linux/vmbus_uio.c
 create mode 100644 drivers/bus/vmbus/meson.build
 create mode 100644 drivers/bus/vmbus/private.h
 create mode 100644 drivers/bus/vmbus/rte_bus_vmbus.h
 create mode 100644 drivers/bus/vmbus/rte_bus_vmbus_version.map
 create mode 100644 drivers/bus/vmbus/rte_vmbus_reg.h
 create mode 100644 drivers/bus/vmbus/vmbus_bufring.c
 create mode 100644 drivers/bus/vmbus/vmbus_channel.c
 create mode 100644 drivers/bus/vmbus/vmbus_common.c
 create mode 100644 drivers/bus/vmbus/vmbus_common_uio.c
 create mode 100644 drivers/net/netvsc/Makefile
 create mode 100644 drivers/net/netvsc/hn_ethdev.c
 create mode 100644 drivers/net/netvsc/hn_logs.h
 create mode 100644 drivers/net/netvsc/hn_nvs.c
 create mode 100644 drivers/net/netvsc/hn_nvs.h
 create mode 100644 drivers/net/netvsc/hn_rndis.c
 create mode 100644 drivers/net/netvsc/hn_rndis.h
 create mode 100644 drivers/net/netvsc/hn_rxtx.c
 create mode 100644 drivers/net/netvsc/hn_var.h
 create mode 100644 drivers/net/netvsc/meson.build
 create mode 100644 drivers/net/netvsc/ndis.h
 create mode 100644 drivers/net/netvsc/rndis.h
 create mode 100644 drivers/net/netvsc/rte_pmd_netvsc_version.map
Signature · 1 line
2.17.0
#1 lore raw

PATCH v3 1/4 bus/vmbus: add hyper-v virtual bus support

From: Stephen Hemminger <[email protected]>

This patch adds support for an additional bus type Virtual Machine BUS (VMBUS) on Microsoft Hyper-V in Windows 10, Windows Server 2016 and Azure. Most of this code was extracted from FreeBSD and some of this is from earlier code donated by Brocade.

Only Linux is supported at present, but the code is split to allow future FreeBSD and Windows support.

The bus support relies on the uio_hv_generic driver from Linux kernel 4.16. Multiple queue support requires additional sysfs interfaces which is in kernel 5.0 (a.k.a 4.17).

---
 MAINTAINERS                                 |   3 +
 config/common_base                          |   5 +
 config/common_linuxapp                      |   4 +
 drivers/bus/Makefile                        |   1 +
 drivers/bus/vmbus/Makefile                  |  36 ++
 drivers/bus/vmbus/linux/Makefile            |   3 +
 drivers/bus/vmbus/linux/vmbus_bus.c         | 355 +++++++++++++++++
 drivers/bus/vmbus/linux/vmbus_uio.c         | 381 ++++++++++++++++++
 drivers/bus/vmbus/private.h                 | 132 +++++++
 drivers/bus/vmbus/rte_bus_vmbus.h           | 400 +++++++++++++++++++
 drivers/bus/vmbus/rte_bus_vmbus_version.map |  28 ++
 drivers/bus/vmbus/rte_vmbus_reg.h           | 344 +++++++++++++++++
 drivers/bus/vmbus/vmbus_bufring.c           | 241 ++++++++++++
 drivers/bus/vmbus/vmbus_channel.c           | 405 ++++++++++++++++++++
 drivers/bus/vmbus/vmbus_common.c            | 286 ++++++++++++++
 drivers/bus/vmbus/vmbus_common_uio.c        | 232 +++++++++++
 mk/rte.app.mk                               |   1 +
 17 files changed, 2857 insertions(+)
 create mode 100644 drivers/bus/vmbus/Makefile
 create mode 100644 drivers/bus/vmbus/linux/Makefile
 create mode 100644 drivers/bus/vmbus/linux/vmbus_bus.c
 create mode 100644 drivers/bus/vmbus/linux/vmbus_uio.c
 create mode 100644 drivers/bus/vmbus/private.h
 create mode 100644 drivers/bus/vmbus/rte_bus_vmbus.h
 create mode 100644 drivers/bus/vmbus/rte_bus_vmbus_version.map
 create mode 100644 drivers/bus/vmbus/rte_vmbus_reg.h
 create mode 100644 drivers/bus/vmbus/vmbus_bufring.c
 create mode 100644 drivers/bus/vmbus/vmbus_channel.c
 create mode 100644 drivers/bus/vmbus/vmbus_common.c
 create mode 100644 drivers/bus/vmbus/vmbus_common_uio.c
MAINTAINERS +3 -0
index f43e3fec4221..09d7f0e04618 100644
@@ -381,6 +381,9 @@ VDEV bus driver
 M: Jianfeng Tan <[email protected]>
 F: drivers/bus/vdev/
 
+VMBUS bus driver
+M: Stephen Hemminger <[email protected]>
+F: drivers/bus/vmbus/
 
 Networking Drivers
 ------------------
config/common_base +5 -0
index c2b0d91e0a4c..695034db661b 100644
@@ -397,6 +397,11 @@ CONFIG_RTE_LIBRTE_PMD_FAILSAFE=y
 CONFIG_RTE_LIBRTE_MVPP2_PMD=n
 
 #
+# Compile support for VMBus library
+#
+CONFIG_RTE_LIBRTE_VMBUS=n
+
+
 # Compile virtual device driver for NetVSC on Hyper-V/Azure
 #
 CONFIG_RTE_LIBRTE_VDEV_NETVSC_PMD=n
config/common_linuxapp +4 -0
index d0437e5d6aeb..30f24d0362c5 100644
@@ -37,3 +37,7 @@ CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL=y
 CONFIG_RTE_LIBRTE_DPAA2_PMD=y
 CONFIG_RTE_LIBRTE_PMD_DPAA2_EVENTDEV=y
 CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC=y
+
+# Hyper-V Virtual Machine bus and drivers
+CONFIG_RTE_LIBRTE_VMBUS=y
+
drivers/bus/Makefile +1 -0
index c251b65ad368..6fe35139fa0b 100644
@@ -9,5 +9,6 @@ DIRS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += fslmc
 endif
 DIRS-$(CONFIG_RTE_LIBRTE_PCI_BUS) += pci
 DIRS-$(CONFIG_RTE_LIBRTE_VDEV_BUS) += vdev
+DIRS-$(CONFIG_RTE_LIBRTE_VMBUS) += vmbus
 
 include $(RTE_SDK)/mk/rte.subdir.mk
drivers/bus/vmbus/Makefile new file +36 -0
new file mode 100644
index 000000000000..c4ca1129c7ea
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: BSD-3-Clause
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+LIB = librte_bus_vmbus.a
+LIBABIVER := 1
+EXPORT_MAP := rte_bus_vmbus_version.map
+
+CFLAGS += -I$(SRCDIR)
+CFLAGS += -O3 $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
+ifneq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),)
+SYSTEM := linux
+endif
+ifneq ($(CONFIG_RTE_EXEC_ENV_BSDAPP),)
+$(error "VMBUS not implemented for BSD yet")
+endif
+
+CFLAGS += -I$(RTE_SDK)/drivers/bus/vmbus/$(SYSTEM)
+CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common
+CFLAGS += -I$(RTE_SDK)/lib/librte_eal/$(SYSTEM)app/eal
+
+LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
+LDLIBS += -lrte_ethdev -lrte_vmbus -luuid
+
+include $(RTE_SDK)/drivers/bus/vmbus/$(SYSTEM)/Makefile
+SRCS-$(CONFIG_RTE_LIBRTE_VMBUS) := $(addprefix $(SYSTEM)/,$(SRCS))
+SRCS-$(CONFIG_RTE_LIBRTE_VMBUS) += vmbus_common.c
+SRCS-$(CONFIG_RTE_LIBRTE_VMBUS) += vmbus_channel.c vmbus_bufring.c
+SRCS-$(CONFIG_RTE_LIBRTE_VMBUS) += vmbus_common_uio.c
+
+SYMLINK-$(CONFIG_RTE_LIBRTE_VMBUS)-include += rte_bus_vmbus.h
+SYMLINK-$(CONFIG_RTE_LIBRTE_VMBUS)-include += rte_vmbus_reg.h
+
+include $(RTE_SDK)/mk/rte.lib.mk
drivers/bus/vmbus/linux/Makefile new file +3 -0
new file mode 100644
index 000000000000..ef0d30b2d3aa
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: BSD-3-Clause
+
+SRCS += vmbus_bus.c vmbus_uio.c
drivers/bus/vmbus/linux/vmbus_bus.c new file +355 -0

355 lines not on this page · raw message

drivers/bus/vmbus/linux/vmbus_uio.c new file +381 -0

381 lines not on this page · raw message

drivers/bus/vmbus/private.h new file +132 -0

132 lines not on this page · raw message

drivers/bus/vmbus/rte_bus_vmbus.h new file +400 -0

400 lines not on this page · raw message

drivers/bus/vmbus/rte_bus_vmbus_version.map new file +28 -0
new file mode 100644
index 000000000000..ff89fa009649
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+EXPERIMENTAL {
+	global:
+
+	rte_vmbus_chan_close;
+	rte_vmbus_chan_open;
+	rte_vmbus_chan_recv;
+	rte_vmbus_chan_recv_raw;
+	rte_vmbus_chan_rx_empty;
+	rte_vmbus_chan_send;
+	rte_vmbus_chan_send_sglist;
+	rte_vmbus_chan_signal_tx;
+	rte_vmbus_irq_mask;
+	rte_vmbus_irq_read;
+	rte_vmbus_irq_unmask;
+	rte_vmbus_map_device;
+	rte_vmbus_max_channels;
+	rte_vmbus_probe;
+	rte_vmbus_probe_one;
+	rte_vmbus_register;
+	rte_vmbus_scan;
+	rte_vmbus_sub_channel_index;
+	rte_vmbus_subchan_open;
+	rte_vmbus_unmap_device;
+	rte_vmbus_unregister;
+
+	local: *;
+};
drivers/bus/vmbus/rte_vmbus_reg.h new file +344 -0

344 lines not on this page · raw message

drivers/bus/vmbus/vmbus_bufring.c new file +241 -0

241 lines not on this page · raw message

drivers/bus/vmbus/vmbus_channel.c new file +405 -0

405 lines not on this page · raw message

drivers/bus/vmbus/vmbus_common.c new file +286 -0

286 lines not on this page · raw message

drivers/bus/vmbus/vmbus_common_uio.c new file +232 -0

232 lines not on this page · raw message

mk/rte.app.mk +1 -0
index 8bab901fcf4c..153687d42b5f 100644
@@ -188,6 +188,7 @@ ifeq ($(CONFIG_RTE_LIBRTE_VHOST),y)
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_VHOST)      += -lrte_pmd_vhost
 endif # $(CONFIG_RTE_LIBRTE_VHOST)
 _LDLIBS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD)    += -lrte_pmd_vmxnet3_uio
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VMBUS)	    += -lrte_bus_vmbus -luuid
 
 ifeq ($(CONFIG_RTE_LIBRTE_BBDEV),y)
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_NULL)     += -lrte_pmd_bbdev_null
Signature · 1 line
2.17.0
#8 lore raw

PATCH v3 3/4 net/netvsc: add documentation

In reply to Stephen Hemminger

Matching documentation for new netvsc device.

---
 doc/guides/nics/index.rst              |  1 +
 doc/guides/nics/netvsc.rst             | 97 ++++++++++++++++++++++++++
 doc/guides/rel_notes/release_18_05.rst |  6 ++
 3 files changed, 104 insertions(+)
 create mode 100644 doc/guides/nics/netvsc.rst
doc/guides/nics/index.rst +1 -0
index ea9110c81159..c5d19476bf68 100644
@@ -32,6 +32,7 @@ Network Interface Controller Drivers
     mlx4
     mlx5
     mvpp2
+    netvsc
     nfp
     octeontx
     qede
doc/guides/nics/netvsc.rst new file +97 -0

97 lines not on this page · raw message

doc/guides/rel_notes/release_18_05.rst +6 -0
index bc9cdda6af7a..0a7b65d49293 100644
@@ -115,6 +115,12 @@ New Features
 
   Linux uevent is supported as backend of this device event notification framework.
 
+* **Added experimental support for Hyper-V netvsc PMD.**
+
+  The new experimntal ``netvsc`` poll mode driver provides native support for
+  networking on Hyper-V. See the :doc:`../nics/netvsc` nic driver guide
+  for more details on this   new driver.
+
 
 API Changes
 -----------
Signature · 1 line
2.17.0
#13 lore raw

PATCH v3 4/4 bus/vmbus and net/netvsc: add meson build support

In reply to Stephen Hemminger

Update meson build files for new netvsc and vmbus drivers.

---
 config/meson.build             |  7 +++++++
 drivers/bus/meson.build        |  2 +-
 drivers/bus/vmbus/meson.build  | 17 +++++++++++++++++
 drivers/net/meson.build        |  2 +-
 drivers/net/netvsc/meson.build | 13 +++++++++++++
 5 files changed, 39 insertions(+), 2 deletions(-)
 create mode 100644 drivers/bus/vmbus/meson.build
 create mode 100644 drivers/net/netvsc/meson.build
config/meson.build +7 -0
index 77af5d897da2..a14213b86818 100644
@@ -45,6 +45,13 @@ if host_machine.system() == 'linux' and cc.find_library('bsd', required: false).
 	dpdk_extra_ldflags += '-lbsd'
 endif
 
+# vmbus depends on lib uuid
+uuid_dep = cc.find_library('uuid', required: false)
+if uuid_dep.found() and cc.has_header('uuid/uuid.h')
+	add_project_link_arguments('-luuid', language: 'c')
+	dpdk_extra_ldflags += '-luuid'
+endif
+
 # add -include rte_config to cflags
 add_project_arguments('-include', 'rte_config.h', language: 'c')
 
drivers/bus/meson.build +1 -1
index 58dfbe2b24dd..720eecef0577 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-drivers = ['dpaa', 'fslmc', 'pci', 'vdev']
+drivers = ['dpaa', 'fslmc', 'pci', 'vdev', 'vmbus']
 std_deps = ['eal']
 config_flag_fmt = 'RTE_LIBRTE_@0@_BUS'
 driver_name_fmt = 'rte_bus_@0@'
drivers/bus/vmbus/meson.build new file +17 -0
new file mode 100644
index 000000000000..05700254fc34
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: BSD-3-Clause
+
+install_headers('rte_bus_vmbus.h','rte_vmbus_reg.h')
+
+allow_experimental_apis = true
+sources = files('vmbus_common.c',
+		'vmbus_channel.c',
+		'vmbus_bufring.c',
+		'vmbus_common_uio.c')
+
+if host_machine.system() == 'linux'
+	sources += files('linux/vmbus_bus.c',
+			'linux/vmbus_uio.c')
+	includes += include_directories('linux')
+else
+	build = false
+endif
drivers/net/meson.build +1 -1
index b7cac4a4a1f5..513c9d9e55c6 100644
@@ -3,7 +3,7 @@
 
 drivers = ['af_packet', 'axgbe', 'bonding', 'dpaa', 'dpaa2',
 	'e1000', 'enic', 'fm10k', 'i40e', 'ixgbe',
-	'null', 'octeontx', 'pcap', 'ring',
+	'netvsc', 'null', 'octeontx', 'pcap', 'ring',
 	'sfc', 'thunderx', 'virtio']
 std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc
 std_deps += ['bus_pci']         # very many PMDs depend on PCI, so make std
drivers/net/netvsc/meson.build new file +13 -0
new file mode 100644
index 000000000000..44926b20e973
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Microsoft Corporation
+
+version = 2
+
+allow_experimental_apis = true
+
+sources = files('hn_ethdev.c',
+		'hn_rxtx.c',
+		'hn_rndis.c',
+		'hn_nvs.c')
+
+deps += ['bus_vmbus' ]
Signature · 1 line
2.17.0
#4 lore raw

PATCH v3 2/4 net/netvsc: add hyper-v netvsc network device

In reply to Stephen Hemminger

From: Stephen Hemminger <[email protected]>

The driver supports Hyper-V networking directly like virtio for KVM or vmxnet3 for VMware.

This code is based off of the FreeBSD driver. The file and variable names are kept the same to help with understanding (with most of the BSD style warts removed).

---
 MAINTAINERS                                   |    7 +
 config/common_base                            |    8 +
 config/common_linuxapp                        |    2 +-
 drivers/net/Makefile                          |    1 +
 drivers/net/netvsc/Makefile                   |   23 +
 drivers/net/netvsc/hn_ethdev.c                |  760 ++++++++++
 drivers/net/netvsc/hn_logs.h                  |   35 +
 drivers/net/netvsc/hn_nvs.c                   |  533 +++++++
 drivers/net/netvsc/hn_nvs.h                   |  243 ++++
 drivers/net/netvsc/hn_rndis.c                 | 1101 +++++++++++++++
 drivers/net/netvsc/hn_rndis.h                 |   26 +
 drivers/net/netvsc/hn_rxtx.c                  | 1221 +++++++++++++++++
 drivers/net/netvsc/hn_var.h                   |  140 ++
 drivers/net/netvsc/ndis.h                     |  378 +++++
 drivers/net/netvsc/rndis.h                    |  414 ++++++
 drivers/net/netvsc/rte_pmd_netvsc_version.map |    5 +
 mk/rte.app.mk                                 |    1 +
 17 files changed, 4897 insertions(+), 1 deletion(-)
 create mode 100644 drivers/net/netvsc/Makefile
 create mode 100644 drivers/net/netvsc/hn_ethdev.c
 create mode 100644 drivers/net/netvsc/hn_logs.h
 create mode 100644 drivers/net/netvsc/hn_nvs.c
 create mode 100644 drivers/net/netvsc/hn_nvs.h
 create mode 100644 drivers/net/netvsc/hn_rndis.c
 create mode 100644 drivers/net/netvsc/hn_rndis.h
 create mode 100644 drivers/net/netvsc/hn_rxtx.c
 create mode 100644 drivers/net/netvsc/hn_var.h
 create mode 100644 drivers/net/netvsc/ndis.h
 create mode 100644 drivers/net/netvsc/rndis.h
 create mode 100644 drivers/net/netvsc/rte_pmd_netvsc_version.map
MAINTAINERS +7 -0
index 09d7f0e04618..086f38d73f07 100644
@@ -479,6 +479,13 @@ F: drivers/net/enic/
 F: doc/guides/nics/enic.rst
 F: doc/guides/nics/features/enic.ini
 
+Hyper-V netvsc
+M: Stephen Hemminger <[email protected]>
+M: K. Y. Srinivasan" <[email protected]>
+M: Haiyang Zhang <[email protected]>
+F: drivers/net/hyperv/
+F: doc/guides/nics/hyperv.rst
+
 Intel e1000
 M: Wenzhuo Lu <[email protected]>
 T: git://dpdk.org/next/dpdk-next-net-intel
config/common_base +8 -0
index 695034db661b..4a6a3cf61a12 100644
@@ -401,7 +401,15 @@ CONFIG_RTE_LIBRTE_MVPP2_PMD=n
 #
 CONFIG_RTE_LIBRTE_VMBUS=n
 
+#
+# Compile native PMD for Hyper-V/Azure
+#
+CONFIG_RTE_LIBRTE_NETVSC_PMD=n
+CONFIG_RTE_LIBRTE_NETVSC_DEBUG_RX=n
+CONFIG_RTE_LIBRTE_NETVSC_DEBUG_TX=n
+CONFIG_RTE_LIBRTE_NETVSC_DEBUG_DUMP=n
 
+#
 # Compile virtual device driver for NetVSC on Hyper-V/Azure
 #
 CONFIG_RTE_LIBRTE_VDEV_NETVSC_PMD=n
config/common_linuxapp +1 -1
index 30f24d0362c5..83577c75a161 100644
@@ -40,4 +40,4 @@ CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC=y
 
 # Hyper-V Virtual Machine bus and drivers
 CONFIG_RTE_LIBRTE_VMBUS=y
-
+CONFIG_RTE_LIBRTE_NETVSC_PMD=y
drivers/net/Makefile +1 -0
index dc5047e0491d..2cc58b6044b2 100644
@@ -33,6 +33,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_LIO_PMD) += liquidio
 DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += mlx4
 DIRS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5
 DIRS-$(CONFIG_RTE_LIBRTE_MVPP2_PMD) += mvpp2
+DIRS-$(CONFIG_RTE_LIBRTE_NETVSC_PMD) += netvsc
 DIRS-$(CONFIG_RTE_LIBRTE_NFP_PMD) += nfp
 DIRS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += null
drivers/net/netvsc/Makefile new file +23 -0
new file mode 100644
index 000000000000..3c713af3c8fc
@@ -0,0 +1,23 @@
+# SPDX-License-Identifier: BSD-3-Clause
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+LIB = librte_pmd_netvsc.a
+
+CFLAGS += -O3 $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
+EXPORT_MAP := rte_pmd_netvsc_version.map
+
+LIBABIVER := 1
+
+SRCS-$(CONFIG_RTE_LIBRTE_NETVSC_PMD) += hn_ethdev.c
+SRCS-$(CONFIG_RTE_LIBRTE_NETVSC_PMD) += hn_rxtx.c
+SRCS-$(CONFIG_RTE_LIBRTE_NETVSC_PMD) += hn_rndis.c
+SRCS-$(CONFIG_RTE_LIBRTE_NETVSC_PMD) += hn_nvs.c
+
+LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
+LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
+LDLIBS += -lrte_bus_vmbus
+
+include $(RTE_SDK)/mk/rte.lib.mk
drivers/net/netvsc/hn_ethdev.c new file +760 -0

760 lines not on this page · raw message

drivers/net/netvsc/hn_logs.h new file +35 -0
new file mode 100644
index 000000000000..f821655b83a6
@@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+
+#ifndef _HN_LOGS_H_
+#define _HN_LOGS_H_
+
+#include <rte_log.h>
+
+extern int hn_logtype_init;
+
+#define PMD_INIT_LOG(level, fmt, args...) \
+	rte_log(RTE_LOG_ ## level, hn_logtype_init, "%s(): " fmt "\n",\
+		__func__, ## args)
+#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
+
+#ifdef RTE_LIBRTE_NETVSC_DEBUG_RX
+#define PMD_RX_LOG(level, fmt, args...) \
+	RTE_LOG(level, PMD, "%s() rx: " fmt "\n", __func__, ## args)
+#else
+#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
+#endif
+
+#ifdef RTE_LIBRTE_NETVSC_DEBUG_TX
+#define PMD_TX_LOG(level, fmt, args...) \
+	RTE_LOG(level, PMD, "%s() tx: " fmt "\n", __func__, ## args)
+#else
+#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
+#endif
+
+
+extern int hn_logtype_driver;
+#define PMD_DRV_LOG(level, fmt, args...) \
+	rte_log(RTE_LOG_ ## level, hn_logtype_driver, "%s(): " fmt "\n", \
+		__func__, ## args)
+
+#endif /* _HN_LOGS_H_ */
drivers/net/netvsc/hn_nvs.c new file +533 -0

533 lines not on this page · raw message

drivers/net/netvsc/hn_nvs.h new file +243 -0

243 lines not on this page · raw message

drivers/net/netvsc/hn_rndis.c new file +1101 -0

1,101 lines not on this page · raw message

drivers/net/netvsc/hn_rndis.h new file +26 -0
new file mode 100644
index 000000000000..46049b2e0776
@@ -0,0 +1,26 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+
+#include "rndis.h"
+
+struct hn_data;
+
+void hn_rndis_receive_response(struct hn_data *hv,
+			      const void *data, uint32_t len);
+void	hn_rndis_link_status(struct hn_data *hv, const void *data);
+int	hn_rndis_attach(struct hn_data *hv);
+void	hn_rndis_detach(struct hn_data *hv);
+int	hn_rndis_get_eaddr(struct hn_data *hv, uint8_t *eaddr);
+int	hn_rndis_get_linkstatus(struct hn_data *hv);
+int	hn_rndis_get_linkspeed(struct hn_data *hv);
+int	hn_rndis_set_rxfilter(struct hn_data *hv, uint32_t filter);
+void	hn_rndis_rx_ctrl(struct hn_data *hv, const void *data,
+			 int dlen);
+int	hn_rndis_get_offload(struct hn_data *hv,
+			     struct rte_eth_dev_info *dev_info);
+int	hn_rndis_conf_offload(struct hn_data *hv,
+			      uint64_t tx_offloads,
+			      uint64_t rx_offloads);
+int	hn_rndis_query_rsscaps(struct hn_data *hv,
+			       unsigned int *rxr_cnt0);
+int hn_rndis_conf_rss(struct hn_data *hv,
+		      const struct rte_eth_rss_conf *rss_conf);
drivers/net/netvsc/hn_rxtx.c new file +1221 -0

239 lines not on this page · raw message

drivers/net/netvsc/hn_var.h new file +140 -0

140 lines not on this page · raw message

drivers/net/netvsc/ndis.h new file +378 -0

378 lines not on this page · raw message

drivers/net/netvsc/rndis.h new file +414 -0

414 lines not on this page · raw message

drivers/net/netvsc/rte_pmd_netvsc_version.map new file +5 -0
new file mode 100644
index 000000000000..5e5f5c7d5ccc

Lines of this file are not shown. View the raw message.

mk/rte.app.mk +1 -0
index 153687d42b5f..78f422a534fe 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.17.0

Part of the diff is not shown here. View the raw message.

#2 lore raw

Re: [PATCH v3 1/4] bus/vmbus: add hyper-v virtual bus support

In reply to Stephen Hemminger
Quoted 33 lines · Stephen Hemminger

From: Stephen Hemminger <[email protected]>

This patch adds support for an additional bus type Virtual Machine BUS (VMBUS) on Microsoft Hyper-V in Windows 10, Windows Server 2016 and Azure. Most of this code was extracted from FreeBSD and some of this is from earlier code donated by Brocade.

Only Linux is supported at present, but the code is split to allow future FreeBSD and Windows support.

The bus support relies on the uio_hv_generic driver from Linux kernel 4.16. Multiple queue support requires additional sysfs interfaces which is in kernel 5.0 (a.k.a 4.17).

---
 MAINTAINERS                                 |   3 +
 config/common_base                          |   5 +
 config/common_linuxapp                      |   4 +
 drivers/bus/Makefile                        |   1 +
 drivers/bus/vmbus/Makefile                  |  36 ++
 drivers/bus/vmbus/linux/Makefile            |   3 +
 drivers/bus/vmbus/linux/vmbus_bus.c         | 355 +++++++++++++++++
 drivers/bus/vmbus/linux/vmbus_uio.c         | 381 ++++++++++++++++++
 drivers/bus/vmbus/private.h                 | 132 +++++++
 drivers/bus/vmbus/rte_bus_vmbus.h           | 400 +++++++++++++++++++
 drivers/bus/vmbus/rte_bus_vmbus_version.map |  28 ++
 drivers/bus/vmbus/rte_vmbus_reg.h           | 344 +++++++++++++++++
 drivers/bus/vmbus/vmbus_bufring.c           | 241 ++++++++++++
 drivers/bus/vmbus/vmbus_channel.c           | 405 ++++++++++++++++++++
 drivers/bus/vmbus/vmbus_common.c            | 286 ++++++++++++++
 drivers/bus/vmbus/vmbus_common_uio.c        | 232 +++++++++++
 mk/rte.app.mk                               |   1 +

<...>

MAINTAINERS VDEV bus driver · line 386

Quoted 7 lines
MAINTAINERS +3 -0
@@ -381,6 +381,9 @@ VDEV bus driver
 M: Jianfeng Tan <[email protected]>
 F: drivers/bus/vdev/
 
+VMBUS bus driver
+M: Stephen Hemminger <[email protected]>
+F: drivers/bus/vmbus/

We have methods to mark APIs as experimental but not for drivers, we have put "- EXPERIMENTAL" suffix in MAINTAINER file before, same thing can be done here.

<...>

config/common_linuxapp CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL=y · line 42

Quoted 7 lines
config/common_linuxapp +3 -0
@@ -37,3 +37,7 @@ CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL=y
 CONFIG_RTE_LIBRTE_DPAA2_PMD=y
 CONFIG_RTE_LIBRTE_PMD_DPAA2_EVENTDEV=y
 CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC=y
+
+# Hyper-V Virtual Machine bus and drivers
+CONFIG_RTE_LIBRTE_VMBUS=y

We tend to disable the component that has external dependency, because of uuid library dependency I believe vmbus should be disabled by default.

<...>

drivers/bus/vmbus/Makefile line 25

Quoted 2 lines
drivers/bus/vmbus/Makefile new file +2 -0
+LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
+LDLIBS += -lrte_ethdev -lrte_vmbus -luuid

-lrte_vmbus is causing build error for shared build, there is no library like that, looks like can be dropped.

<...>

Quoted 19 lines
drivers/bus/vmbus/rte_bus_vmbus_version.map new file +18 -0
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+EXPERIMENTAL {
+	global:
+
+	rte_vmbus_chan_close;
+	rte_vmbus_chan_open;
+	rte_vmbus_chan_recv;
+	rte_vmbus_chan_recv_raw;
+	rte_vmbus_chan_rx_empty;
+	rte_vmbus_chan_send;
+	rte_vmbus_chan_send_sglist;
+	rte_vmbus_chan_signal_tx;
+	rte_vmbus_irq_mask;
+	rte_vmbus_irq_read;
+	rte_vmbus_irq_unmask;
+	rte_vmbus_map_device;
+	rte_vmbus_max_channels;
+	rte_vmbus_probe;

drivers/bus/vmbus/rte_bus_vmbus_version.map line 28

Quoted 10 lines
drivers/bus/vmbus/rte_bus_vmbus_version.map new file +10 -0
+	rte_vmbus_probe_one;
+	rte_vmbus_register;
+	rte_vmbus_scan;
+	rte_vmbus_sub_channel_index;
+	rte_vmbus_subchan_open;
+	rte_vmbus_unmap_device;
+	rte_vmbus_unregister;
+
+	local: *;
+};

Just to confirm, these APIs are for bus drivers, not for applications, right? If so we already don't guarantee comptiblity in this level, perhaps adding __experimental flag to these APIs is overkill but no harm.

<...>

#5 lore raw

Re: [PATCH v3 2/4] net/netvsc: add hyper-v netvsc network device

In reply to Stephen Hemminger
Quoted 20 lines · Stephen Hemminger

From: Stephen Hemminger <[email protected]>

The driver supports Hyper-V networking directly like virtio for KVM or vmxnet3 for VMware.

This code is based off of the FreeBSD driver. The file and variable names are kept the same to help with understanding (with most of the BSD style warts removed).

---
 MAINTAINERS                                   |    7 +
 config/common_base                            |    8 +
 config/common_linuxapp                        |    2 +-
 drivers/net/Makefile                          |    1 +
 drivers/net/netvsc/Makefile                   |   23 +
 drivers/net/netvsc/hn_ethdev.c                |  760 ++++++++++
 drivers/net/netvsc/hn_logs.h                  |   35 +
 drivers/net/netvsc/hn_nvs.c                   |  533 +++++++
 drivers/net/netvsc/hn_nvs.h                   |  243 ++++
Quoted 8 lines
 drivers/net/netvsc/hn_rndis.c                 | 1101 +++++++++++++++
 drivers/net/netvsc/hn_rndis.h                 |   26 +
 drivers/net/netvsc/hn_rxtx.c                  | 1221 +++++++++++++++++
 drivers/net/netvsc/hn_var.h                   |  140 ++
 drivers/net/netvsc/ndis.h                     |  378 +++++
 drivers/net/netvsc/rndis.h                    |  414 ++++++
 drivers/net/netvsc/rte_pmd_netvsc_version.map |    5 +
 mk/rte.app.mk                                 |    1 +

Can you please add .ini file (doc/guides/nics/features/*.ini) to document PMD features?

<...>

MAINTAINERS F: drivers/net/enic/ · line 484

Quoted 7 lines
MAINTAINERS +3 -0
@@ -479,6 +479,13 @@ F: drivers/net/enic/
 F: doc/guides/nics/enic.rst
 F: doc/guides/nics/features/enic.ini
 
+Hyper-V netvsc
+M: Stephen Hemminger <[email protected]>
+M: K. Y. Srinivasan" <[email protected]>

Is " a typo?

<...>

drivers/net/netvsc/hn_ethdev.c line 133

Quoted 5 lines
drivers/net/netvsc/hn_ethdev.c new file +5 -0
+/* XXX Why is this not generic in RTE? */
+static int
+hn_dev_atomic_write_link_status(struct rte_eth_dev *dev,
+		struct rte_eth_link *link)
+{

It is indeed generic now thanks to you :)
Can you switch to your generic functions?

<...>

drivers/net/netvsc/hn_ethdev.c line 504

Quoted 9 lines
drivers/net/netvsc/hn_ethdev.c new file +9 -0
+/* enables testpmd to collect per queue stats. */
+static int
+hn_queue_stats_mapping_set(__rte_unused struct rte_eth_dev *eth_dev,
+			       __rte_unused uint16_t queue_id,
+			       __rte_unused uint8_t stat_idx,
+			       __rte_unused uint8_t is_rx)
+{
+	return 0;
+}

IS this dev_ops needed at all?

<...>

drivers/net/netvsc/rte_pmd_netvsc_version.map line 3

Quoted 4 lines
drivers/net/netvsc/rte_pmd_netvsc_version.map new file +3 -0
@@ -0,0 +1,5 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+
+DPDK_18.02 {

v18.05

#9 lore raw

Re: [PATCH v3 3/4] net/netvsc: add documentation

In reply to Stephen Hemminger
Quoted 9 lines · Stephen Hemminger

Matching documentation for new netvsc device.

---
 doc/guides/nics/index.rst              |  1 +
 doc/guides/nics/netvsc.rst             | 97 ++++++++++++++++++++++++++
 doc/guides/rel_notes/release_18_05.rst |  6 ++
 3 files changed, 104 insertions(+)
 create mode 100644 doc/guides/nics/netvsc.rst

Documentation added for network driver but not for bus driver, does it make sense to add vmbus doc too?

<...>

Quoted 5 lines
doc/guides/rel_notes/release_18_05.rst +0 -0
index bc9cdda6af7a..0a7b65d49293 100644

doc/guides/rel_notes/release_18_05.rst New Features · line 123

Quoted 9 lines
doc/guides/rel_notes/release_18_05.rst +6 -0
@@ -115,6 +115,12 @@ New Features
 
   Linux uevent is supported as backend of this device event notification framework.
 
+* **Added experimental support for Hyper-V netvsc PMD.**
+
+  The new experimntal ``netvsc`` poll mode driver provides native support for
+  networking on Hyper-V. See the :doc:`../nics/netvsc` nic driver guide
+  for more details on this   new driver.
+

Also there is a "Shared Library Versions" section of the release notes, the libraries with public API should be listed here with version information. I can see some bus libraries are there.

If any of the libraries added has public API, should be added into that list.

#14 lore raw
In reply to Stephen Hemminger
Quoted 27 lines · Stephen Hemminger

This is a revised version of the Hyper-V native bus (VMBus) and network device (netvsc) drivers. This virtual device is used in Microsoft Hyper-V in Windows 10, Windows Server 2016 and Azure. Most of this code was extracted from FreeBSD and some of this is from earlier code donated by Brocade.

Only Linux is supported at present, but the code is split to allow future FreeBSD and Windows support.

This version works with upstream kernel (4.16) but in that mode only a single queue is supported. With additional patches that are pending for 5.0 kernel, multi-queue support works as well.

Device binding is best done via driverctl; this required some additional fixes to kernel and driverctl to work correctly. Linux kernel vmbus support needed to support sysfs driver_override and driverctl needed to handle non-PCI bus from udev.
https://gitlab.com/driverctl/driverctl/merge_requests/3
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-April/118889.html

v3
- fix documentation to format correctly and include more info about binding
- fix build on 32 bit
- minor white space and indentation fixes

Quoted 5 lines

Stephen Hemminger (4):
bus/vmbus: add hyper-v virtual bus support net/netvsc: add hyper-v netvsc network device net/netvsc: add documentation
bus/vmbus and net/netvsc: add meson build support

Overall this is a bus driver implementation and a net driver implementation, it is not API that effect other part of the DPDK or end user.
As long as it is not breaking anything and documented I am for getting the patch as experimental for this release.

There are few minor comments on patches.

#3 lore raw

Re: [PATCH v3 1/4] bus/vmbus: add hyper-v virtual bus support

In reply to Ferruh Yigit
Quoted 41 lines · On Wed, 18 Apr 2018 14:16:56 +0100 Ferruh Yigit <[email protected]> wrote:
Quoted 33 lines · Stephen Hemminger

From: Stephen Hemminger <[email protected]>

This patch adds support for an additional bus type Virtual Machine BUS (VMBUS) on Microsoft Hyper-V in Windows 10, Windows Server 2016 and Azure. Most of this code was extracted from FreeBSD and some of this is from earlier code donated by Brocade.

Only Linux is supported at present, but the code is split to allow future FreeBSD and Windows support.

The bus support relies on the uio_hv_generic driver from Linux kernel 4.16. Multiple queue support requires additional sysfs interfaces which is in kernel 5.0 (a.k.a 4.17).

---
 MAINTAINERS                                 |   3 +
 config/common_base                          |   5 +
 config/common_linuxapp                      |   4 +
 drivers/bus/Makefile                        |   1 +
 drivers/bus/vmbus/Makefile                  |  36 ++
 drivers/bus/vmbus/linux/Makefile            |   3 +
 drivers/bus/vmbus/linux/vmbus_bus.c         | 355 +++++++++++++++++
 drivers/bus/vmbus/linux/vmbus_uio.c         | 381 ++++++++++++++++++
 drivers/bus/vmbus/private.h                 | 132 +++++++
 drivers/bus/vmbus/rte_bus_vmbus.h           | 400 +++++++++++++++++++
 drivers/bus/vmbus/rte_bus_vmbus_version.map |  28 ++
 drivers/bus/vmbus/rte_vmbus_reg.h           | 344 +++++++++++++++++
 drivers/bus/vmbus/vmbus_bufring.c           | 241 ++++++++++++
 drivers/bus/vmbus/vmbus_channel.c           | 405 ++++++++++++++++++++
 drivers/bus/vmbus/vmbus_common.c            | 286 ++++++++++++++
 drivers/bus/vmbus/vmbus_common_uio.c        | 232 +++++++++++
 mk/rte.app.mk                               |   1 +  

<...>

Quoted 4 lines
MAINTAINERS +0 -0
@@ -381,6 +381,9 @@ VDEV bus driver
 M: Jianfeng Tan <[email protected]>
 F: drivers/bus/vdev/
 
Quoted 6 lines

MAINTAINERS VDEV bus driver · line 386

Quoted 3 lines
MAINTAINERS +3 -0
+VMBUS bus driver
+M: Stephen Hemminger <[email protected]>
+F: drivers/bus/vmbus/  

We have methods to mark APIs as experimental but not for drivers, we have put "- EXPERIMENTAL" suffix in MAINTAINER file before, same thing can be done here.

Ok, will add this to v4

Quoted 11 lines

config/common_linuxapp CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL=y · line 42

Quoted 8 lines
config/common_linuxapp +3 -0
@@ -37,3 +37,7 @@ CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL=y
 CONFIG_RTE_LIBRTE_DPAA2_PMD=y
 CONFIG_RTE_LIBRTE_PMD_DPAA2_EVENTDEV=y
 CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC=y
+
+# Hyper-V Virtual Machine bus and drivers
+CONFIG_RTE_LIBRTE_VMBUS=y  

We tend to disable the component that has external dependency, because of uuid library dependency I believe vmbus should be disabled by default.

Ok. But libuuid is really trivial.

Quoted 5 lines

drivers/bus/vmbus/Makefile line 25

Quoted 2 lines
drivers/bus/vmbus/Makefile new file +2 -0
+LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
+LDLIBS += -lrte_ethdev -lrte_vmbus -luuid  

-lrte_vmbus is causing build error for shared build, there is no library like that, looks like can be dropped.

Will check, haven't modified that in a while.

Quoted 25 lines
Quoted 25 lines
drivers/bus/vmbus/rte_bus_vmbus_version.map new file +24 -0
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+EXPERIMENTAL {
+	global:
+
+	rte_vmbus_chan_close;
+	rte_vmbus_chan_open;
+	rte_vmbus_chan_recv;
+	rte_vmbus_chan_recv_raw;
+	rte_vmbus_chan_rx_empty;
+	rte_vmbus_chan_send;
+	rte_vmbus_chan_send_sglist;
+	rte_vmbus_chan_signal_tx;
+	rte_vmbus_irq_mask;
+	rte_vmbus_irq_read;
+	rte_vmbus_irq_unmask;
+	rte_vmbus_map_device;
+	rte_vmbus_max_channels;
+	rte_vmbus_probe;
+	rte_vmbus_probe_one;
+	rte_vmbus_register;
+	rte_vmbus_scan;
+	rte_vmbus_sub_channel_index;
+	rte_vmbus_subchan_open;
+	rte_vmbus_unmap_device;
Quoted 8 lines

drivers/bus/vmbus/rte_bus_vmbus_version.map line 28

Quoted 4 lines
drivers/bus/vmbus/rte_bus_vmbus_version.map new file +4 -0
+	rte_vmbus_unregister;
+
+	local: *;
+};  

Just to confirm, these APIs are for bus drivers, not for applications, right? If so we already don't guarantee comptiblity in this level, perhaps adding __experimental flag to these APIs is overkill but no harm.

Yes, these are internal bus api's. I will take off experimental from
the bus part. It makes life simpler to have it gone.

#10 lore raw

Re: [PATCH v3 3/4] net/netvsc: add documentation

In reply to Ferruh Yigit
Quoted 11 lines · On Wed, 18 Apr 2018 14:25:22 +0100 Ferruh Yigit <[email protected]> wrote:
Quoted 9 lines · Stephen Hemminger

Matching documentation for new netvsc device.

---
 doc/guides/nics/index.rst              |  1 +
 doc/guides/nics/netvsc.rst             | 97 ++++++++++++++++++++++++++
 doc/guides/rel_notes/release_18_05.rst |  6 ++
 3 files changed, 104 insertions(+)
 create mode 100644 doc/guides/nics/netvsc.rst  
Quoted 2 lines

Documentation added for network driver but not for bus driver, does it make sense to add vmbus doc too?

Not really, vmbus is only useful for one network device. What did Dpaa2 do?

Quoted 19 lines
Quoted 5 lines
doc/guides/rel_notes/release_18_05.rst +0 -0
index bc9cdda6af7a..0a7b65d49293 100644

doc/guides/rel_notes/release_18_05.rst New Features · line 123

Quoted 9 lines
doc/guides/rel_notes/release_18_05.rst +6 -0
@@ -115,6 +115,12 @@ New Features
 
   Linux uevent is supported as backend of this device event notification framework.
 
+* **Added experimental support for Hyper-V netvsc PMD.**
+
+  The new experimntal ``netvsc`` poll mode driver provides native support for
+  networking on Hyper-V. See the :doc:`../nics/netvsc` nic driver guide
+  for more details on this   new driver.
+  

Also there is a "Shared Library Versions" section of the release notes, the libraries with public API should be listed here with version information. I can see some bus libraries are there.

Quoted 1 line

If any of the libraries added has public API, should be added into that list.

The vmbus is internal.

#6 lore raw

Re: [PATCH v3 2/4] net/netvsc: add hyper-v netvsc network device

In reply to Ferruh Yigit
Quoted 9 lines

drivers/net/netvsc/hn_ethdev.c line 133

Quoted 6 lines
drivers/net/netvsc/hn_ethdev.c new file +5 -0
+/* XXX Why is this not generic in RTE? */
+static int
+hn_dev_atomic_write_link_status(struct rte_eth_dev *dev,
+		struct rte_eth_link *link)
+{  

It is indeed generic now thanks to you :)
Can you switch to your generic functions?

Will change in v4. This driver has been developed on older source predating this.

#11 lore raw

Re: [PATCH v3 3/4] net/netvsc: add documentation

In reply to Stephen Hemminger
Quoted 14 lines · Stephen Hemminger
Quoted 11 lines · On Wed, 18 Apr 2018 14:25:22 +0100 Ferruh Yigit <[email protected]> wrote:
Quoted 9 lines · Stephen Hemminger

Matching documentation for new netvsc device.

---
 doc/guides/nics/index.rst              |  1 +
 doc/guides/nics/netvsc.rst             | 97 ++++++++++++++++++++++++++
 doc/guides/rel_notes/release_18_05.rst |  6 ++
 3 files changed, 104 insertions(+)
 create mode 100644 doc/guides/nics/netvsc.rst  
Quoted 5 lines
Quoted 2 lines

Documentation added for network driver but not for bus driver, does it make sense to add vmbus doc too?

Not really, vmbus is only useful for one network device. What did Dpaa2 do?

It seems they also only documented the drivers (net, crypto, event).

There is no bus level documentation for any bus, if I am not missing them, not sure if this is a gap?

Quoted 24 lines
Quoted 20 lines
Quoted 6 lines
doc/guides/rel_notes/release_18_05.rst +0 -0
index bc9cdda6af7a..0a7b65d49293 100644

doc/guides/rel_notes/release_18_05.rst New Features · line 123

Quoted 9 lines
doc/guides/rel_notes/release_18_05.rst +6 -0
@@ -115,6 +115,12 @@ New Features
 
   Linux uevent is supported as backend of this device event notification framework.
 
+* **Added experimental support for Hyper-V netvsc PMD.**
+
+  The new experimntal ``netvsc`` poll mode driver provides native support for
+  networking on Hyper-V. See the :doc:`../nics/netvsc` nic driver guide
+  for more details on this   new driver.
+  

Also there is a "Shared Library Versions" section of the release notes, the libraries with public API should be listed here with version information. I can see some bus libraries are there.

Quoted 1 line

If any of the libraries added has public API, should be added into that list.

The vmbus is internal.

#7 lore raw

Re: [PATCH v3 2/4] net/netvsc: add hyper-v netvsc network device

In reply to Ferruh Yigit
Quoted 11 lines · On Wed, 18 Apr 2018 14:19:52 +0100 Ferruh Yigit <[email protected]> wrote:

drivers/net/netvsc/hn_ethdev.c line 504

Quoted 9 lines
drivers/net/netvsc/hn_ethdev.c new file +9 -0
+/* enables testpmd to collect per queue stats. */
+static int
+hn_queue_stats_mapping_set(__rte_unused struct rte_eth_dev *eth_dev,
+			       __rte_unused uint16_t queue_id,
+			       __rte_unused uint8_t stat_idx,
+			       __rte_unused uint8_t is_rx)
+{
+	return 0;
+}  

IS this dev_ops needed at all?

This is leftover. It is clone of original from virtio. Not sure why (or if) it is needed. Will drop and see.

#12 lore raw

Re: [PATCH v3 3/4] net/netvsc: add documentation

In reply to Ferruh Yigit

Hi Ferruh,

Quoted 18 lines · Stephen Hemminger
Quoted 17 lines
Quoted 13 lines · On Wed, 18 Apr 2018 14:25:22 +0100 Ferruh Yigit <[email protected]> wrote:
Quoted 9 lines · Stephen Hemminger

Matching documentation for new netvsc device.

---
 doc/guides/nics/index.rst              |  1 +
 doc/guides/nics/netvsc.rst             | 97 ++++++++++++++++++++++++++
 doc/guides/rel_notes/release_18_05.rst |  6 ++
 3 files changed, 104 insertions(+)
 create mode 100644 doc/guides/nics/netvsc.rst

Documentation added for network driver but not for bus driver, does it make sense to add vmbus doc too?

Quoted 8 lines
Quoted 2 lines

Not really, vmbus is only useful for one network device. What did Dpaa2 do?

It seems they also only documented the drivers (net, crypto, event).

There is no bus level documentation for any bus, if I am not missing them, not sure if this is a gap?

[Hemant] dpaa2 bus documentation is embedded within the net/dpaa2 drivers.

Regards,
Hemant