Commit Graph

8 Commits

Author SHA1 Message Date
Stephen Hemminger
9d071e5ce7 bus/vmbus: add host latency tuning function
Add vmbus API to allow tuning the scan interval on the host side.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-08-28 15:27:39 +02:00
Stephen Hemminger
cd3e20a687 bus/vmbus: handle EOF on IRQ read
This function is not used by netvsc driver yet.
Still the code should handle case where device driver returns
zero (due to rescind).

Coverity issue: 302871
Fixes: 831dba47bd ("bus/vmbus: add Hyper-V virtual bus support")

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-08-07 14:41:51 +02:00
Stephen Hemminger
5ef90536d7 bus/vmbus: make sure path is null terminated
Use strlcpy rather than strncpy to avoid any issues about
null termination.

Coverity issue 302859
Fixes: 831dba47bd ("bus/vmbus: add Hyper-V virtual bus support")

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-08-07 14:41:47 +02:00
Stephen Hemminger
bca88be88a bus/vmbus: close directory in error path
Fix bug reported by Coverity where directory being scanned was
not closed in error path (leaking file descriptor).

Coverity issue: 302848
Fixes: 831dba47bd ("bus/vmbus: add Hyper-V virtual bus support")

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-08-07 14:41:40 +02:00
Stephen Hemminger
530af95a78 bus/vmbus: avoid signalling host on read
Don't signal host that receive ring has been read until all events
have been processed. This reduces the number of guest exits and
therefore improves performance.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-08-05 11:03:18 +02:00
Thomas Monjalon
c5e4612e72 bus/vmbus: fix build without libuuid
The dependency on libuuid is useless because the required code
is embedded in EAL, see commit 6bc67c497a ("eal: add uuid API").

Fixes: 831dba47bd ("bus/vmbus: add Hyper-V virtual bus support")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-07-15 23:41:58 +02:00
Stephen Hemminger
4e9c73e96e net/netvsc: add Hyper-V network device
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).

This version supports the latest NetVSP 6.1 version and
older versions.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-07-13 23:48:07 +02:00
Stephen Hemminger
831dba47bd bus/vmbus: add Hyper-V virtual bus support
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).

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2018-07-13 23:48:07 +02:00