Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Add VMware VMXNET3 ethernet driver from OpenBSD, vmx(4).
details: https://anonhg.NetBSD.org/src/rev/b9db6896ddfa
branches: trunk
changeset: 329796:b9db6896ddfa
user: hikaru <hikaru%NetBSD.org@localhost>
date: Tue Jun 10 01:42:38 2014 +0000
description:
Add VMware VMXNET3 ethernet driver from OpenBSD, vmx(4).
diffstat:
distrib/sets/lists/man/mi | 5 +-
share/man/man4/man4.x86/Makefile | 4 +-
share/man/man4/man4.x86/vmx.4 | 113 +++
sys/arch/amd64/conf/ALL | 5 +-
sys/arch/amd64/conf/GENERIC | 5 +-
sys/arch/i386/conf/ALL | 5 +-
sys/arch/i386/conf/GENERIC | 5 +-
sys/arch/x86/pci/files.pci | 7 +-
sys/arch/x86/pci/if_vmx.c | 1246 ++++++++++++++++++++++++++++++++++++++
sys/arch/x86/pci/if_vmxreg.h | 328 ++++++++++
10 files changed, 1711 insertions(+), 12 deletions(-)
diffs (truncated from 1868 to 300 lines):
diff -r 9033a8206f3e -r b9db6896ddfa distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Mon Jun 09 18:22:05 2014 +0000
+++ b/distrib/sets/lists/man/mi Tue Jun 10 01:42:38 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1474 2014/05/18 18:24:16 jakllsch Exp $
+# $NetBSD: mi,v 1.1475 2014/06/10 01:42:38 hikaru Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -1970,6 +1970,7 @@
./usr/share/man/cat4/x86/tprof_amdpmi.0 man-sys-catman .cat
./usr/share/man/cat4/x86/tprof_pmi.0 man-sys-catman .cat
./usr/share/man/cat4/x86/vmt.0 man-sys-catman .cat
+./usr/share/man/cat4/x86/vmx.0 man-sys-catman .cat
./usr/share/man/cat4/xbd.0 man-sys-catman .cat
./usr/share/man/cat4/xbdback.0 man-sys-catman .cat
./usr/share/man/cat4/xbox.0 man-sys-catman .cat
@@ -4929,6 +4930,7 @@
./usr/share/man/html4/x86/tprof_amdpmi.html man-sys-htmlman html
./usr/share/man/html4/x86/tprof_pmi.html man-sys-htmlman html
./usr/share/man/html4/x86/vmt.html man-sys-htmlman html
+./usr/share/man/html4/x86/vmx.html man-sys-htmlman html
./usr/share/man/html4/xbd.html man-sys-htmlman html
./usr/share/man/html4/xbdback.html man-sys-htmlman html
./usr/share/man/html4/xbox.html man-sys-htmlman html
@@ -7818,6 +7820,7 @@
./usr/share/man/man4/x86/tprof_amdpmi.4 man-sys-man .man
./usr/share/man/man4/x86/tprof_pmi.4 man-sys-man .man
./usr/share/man/man4/x86/vmt.4 man-sys-man .man
+./usr/share/man/man4/x86/vmx.4 man-sys-man .man
./usr/share/man/man4/xbd.4 man-sys-man .man
./usr/share/man/man4/xbdback.4 man-sys-man .man
./usr/share/man/man4/xbox.4 man-sys-man .man
diff -r 9033a8206f3e -r b9db6896ddfa share/man/man4/man4.x86/Makefile
--- a/share/man/man4/man4.x86/Makefile Mon Jun 09 18:22:05 2014 +0000
+++ b/share/man/man4/man4.x86/Makefile Tue Jun 10 01:42:38 2014 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.14 2013/06/10 07:14:01 kardel Exp $
+# $NetBSD: Makefile,v 1.15 2014/06/10 01:42:39 hikaru Exp $
MAN= amdpcib.4 apic.4 balloon.4 coretemp.4 est.4 fdc.4 \
fwhrng.4 hpet.4 ichlpcib.4 lpt.4 mem.4 odcm.4 powernow.4 \
- soekrisgpio.4 tprof_amdpmi.4 tprof_pmi.4 vmt.4
+ soekrisgpio.4 tprof_amdpmi.4 tprof_pmi.4 vmt.4 vmx.4
MLINKS+=apic.4 ioapic.4 \
apic.4 lapic.4
diff -r 9033a8206f3e -r b9db6896ddfa share/man/man4/man4.x86/vmx.4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man4/man4.x86/vmx.4 Tue Jun 10 01:42:38 2014 +0000
@@ -0,0 +1,113 @@
+.\" $NetBSD: vmx.4,v 1.1 2014/06/10 01:42:39 hikaru Exp $
+.\" $OpenBSD: vmx.4,v 1.1 2013/05/31 20:18:44 reyk Exp $
+.\"
+.\" Copyright (c) 2006,2013 Reyk Floeter <reyk%openbsd.org@localhost>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd June 7, 2014
+.Dt VMX 4
+.Os
+.Sh NAME
+.Nm vmx
+.Nd VMware VMXNET3 Virtual Interface Controller device
+.Sh SYNOPSIS
+.Cd "vmx* at pci? dev ? function ?"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the VMXNET3 virtual NIC available in virtual
+machines by VMware.
+It appears as a simple Ethernet device but is actually a virtual network
+interface to the underlying host operating system.
+.Pp
+This driver supports the
+.Ic VMXNET3
+driver protocol, as an alternative to the emulated
+.Xr pcn 4 ,
+.Xr wm 4
+interfaces also available in the VMware environment.
+The
+.Nm vmx
+driver is optimized for the virtual machine, it can provide advanced
+capabilities depending on the underlying host operating system and
+the physical network interface controller of the host.
+In comparison to the earlier VMXNET versions,
+VMXNET3 supports additional features like multiqueue support, IPv6
+checksum offloading, MSI/MSI-X support and hardware VLAN tagging in
+VMware's VLAN Guest Tagging (VGT) mode.
+.Pp
+The
+.Nm
+driver supports VMXNET3 VMware virtual NICs provided by the virtual
+machine hardware version 7 or newer, as provided by the following
+products:
+.Pp
+.Bl -bullet -compact -offset indent
+.It
+VMware ESX/ESXi 4.0 and newer
+.It
+VMware Server 2.0 and newer
+.It
+VMware Workstation 6.5 and newer
+.It
+VMware Fusion 2.0 and newer
+.El
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width autoselect
+.It autoselect
+Enable autoselection of the media type and options.
+The driver always uses the fastest available speed and the media
+options provided by the underlying host of the virtual machine.
+.It 10GbaseT mediaopt full-duplex
+Set 10Gbps operation.
+.It 1000baseT mediaopt full-duplex
+Set 1000Mbps operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh EXAMPLES
+The following entry must be added to the VMware configuration file
+to provide the
+.Nm
+device:
+.Bd -literal -offset indent
+ethernet0.virtualDev = "vmxnet3"
+.Ed
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr wm 4 ,
+.Xr ifmedia 4 ,
+.Xr intro 4 ,
+.Xr netintro 4 ,
+.Xr pci 4 ,
+.Xr pcn 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Ox 5.5 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was originally written by
+.An Tsubai Masanari .
+.Nx porting was done by
+.An Hikaru ABE
+.Aq Mt hikaru%NetBSD.org@localhost .
diff -r 9033a8206f3e -r b9db6896ddfa sys/arch/amd64/conf/ALL
--- a/sys/arch/amd64/conf/ALL Mon Jun 09 18:22:05 2014 +0000
+++ b/sys/arch/amd64/conf/ALL Tue Jun 10 01:42:38 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.8 2014/06/02 02:11:51 dholland Exp $
+# $NetBSD: ALL,v 1.9 2014/06/10 01:42:39 hikaru Exp $
# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
#
# ALL machine description file
@@ -17,7 +17,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "ALL-$Revision: 1.8 $"
+#ident "ALL-$Revision: 1.9 $"
maxusers 64 # estimated number of users
@@ -928,6 +928,7 @@
tlp* at pci? dev ? function ? # DECchip 21x4x and clones
txp* at pci? dev ? function ? # 3com 3cr990
vge* at pci? dev ? function ? # VIATech VT612X Gigabit Ethernet
+vmx* at pci? dev ? function ? # VMware VMXNET3
vr* at pci? dev ? function ? # VIA Rhine Fast Ethernet
vte* at pci? dev ? function ? # Vortex86 RDC R6040 Fast Ethernet
wi* at pci? dev ? function ? # Intersil Prism Mini-PCI (802.11b)
diff -r 9033a8206f3e -r b9db6896ddfa sys/arch/amd64/conf/GENERIC
--- a/sys/arch/amd64/conf/GENERIC Mon Jun 09 18:22:05 2014 +0000
+++ b/sys/arch/amd64/conf/GENERIC Tue Jun 10 01:42:38 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.387 2014/05/29 14:49:35 christos Exp $
+# $NetBSD: GENERIC,v 1.388 2014/06/10 01:42:39 hikaru Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.387 $"
+#ident "GENERIC-$Revision: 1.388 $"
maxusers 64 # estimated number of users
@@ -740,6 +740,7 @@
tlp* at pci? dev ? function ? # DECchip 21x4x and clones
txp* at pci? dev ? function ? # 3com 3cr990
vge* at pci? dev ? function ? # VIATech VT612X Gigabit Ethernet
+vmx* at pci? dev ? function ? # VMware VMXNET3
vr* at pci? dev ? function ? # VIA Rhine Fast Ethernet
wi* at pci? dev ? function ? # Intersil Prism Mini-PCI (802.11b)
wm* at pci? dev ? function ? # Intel 82543/82544 gigabit
diff -r 9033a8206f3e -r b9db6896ddfa sys/arch/i386/conf/ALL
--- a/sys/arch/i386/conf/ALL Mon Jun 09 18:22:05 2014 +0000
+++ b/sys/arch/i386/conf/ALL Tue Jun 10 01:42:38 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.375 2014/06/02 02:11:52 dholland Exp $
+# $NetBSD: ALL,v 1.376 2014/06/10 01:42:39 hikaru Exp $
# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
#
# ALL machine description file
@@ -17,7 +17,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "ALL-$Revision: 1.375 $"
+#ident "ALL-$Revision: 1.376 $"
maxusers 64 # estimated number of users
@@ -1052,6 +1052,7 @@
tlp* at pci? dev ? function ? # DECchip 21x4x and clones
txp* at pci? dev ? function ? # 3com 3cr990
vge* at pci? dev ? function ? # VIATech VT612X Gigabit Ethernet
+vmx* at pci? dev ? function ? # VMware VMXNET3
vr* at pci? dev ? function ? # VIA Rhine Fast Ethernet
vte* at pci? dev ? function ? # Vortex86 RDC R6040 Fast Ethernet
wi* at pci? dev ? function ? # Intersil Prism Mini-PCI (802.11b)
diff -r 9033a8206f3e -r b9db6896ddfa sys/arch/i386/conf/GENERIC
--- a/sys/arch/i386/conf/GENERIC Mon Jun 09 18:22:05 2014 +0000
+++ b/sys/arch/i386/conf/GENERIC Tue Jun 10 01:42:38 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1104 2014/05/29 14:48:40 christos Exp $
+# $NetBSD: GENERIC,v 1.1105 2014/06/10 01:42:39 hikaru Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.1104 $"
+#ident "GENERIC-$Revision: 1.1105 $"
maxusers 64 # estimated number of users
@@ -992,6 +992,7 @@
txp* at pci? dev ? function ? # 3com 3cr990
vte* at pci? dev ? function ? # RDC R6040 10/100 Ethernet
vge* at pci? dev ? function ? # VIATech VT612X Gigabit Ethernet
+vmx* at pci? dev ? function ? # VMware VMXNET3
vr* at pci? dev ? function ? # VIA Rhine Fast Ethernet
wi* at pci? dev ? function ? # Intersil Prism Mini-PCI (802.11b)
wm* at pci? dev ? function ? # Intel 8254x gigabit
diff -r 9033a8206f3e -r b9db6896ddfa sys/arch/x86/pci/files.pci
--- a/sys/arch/x86/pci/files.pci Mon Jun 09 18:22:05 2014 +0000
+++ b/sys/arch/x86/pci/files.pci Tue Jun 10 01:42:38 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.pci,v 1.15 2012/12/05 16:19:46 christos Exp $
+# $NetBSD: files.pci,v 1.16 2014/06/10 01:42:39 hikaru Exp $
device aapic
attach aapic at pci
@@ -59,3 +59,8 @@
device fwhrng
attach fwhrng at fwhichbus
file arch/x86/pci/fwhrng.c fwhrng needs-flag
+
+# VMware VMXNET3 virtual interface
+device vmx: ether, ifnet, arp
+attach vmx at pci
+file arch/x86/pci/if_vmx.c vmx
diff -r 9033a8206f3e -r b9db6896ddfa sys/arch/x86/pci/if_vmx.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/x86/pci/if_vmx.c Tue Jun 10 01:42:38 2014 +0000
@@ -0,0 +1,1246 @@
+/* $NetBSD: if_vmx.c,v 1.1 2014/06/10 01:42:39 hikaru Exp $ */
+/* $OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $ */
+
+/*
+ * Copyright (c) 2013 Tsubai Masanari
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
Home |
Main Index |
Thread Index |
Old Index