VMXNET3 paravirtual NIC device implementation
PATCH 1/1 VMXNET3 paravirtual NIC device implementation
From: Dmitry Fleytman <[email protected]>
Implementation of VMWare VMXNET3 paravirtual NIC device. Supports of all the device features including offload capabilties, VLANs and etc.
The device is tested on different OSes:
Fedora 15
Ubuntu 10.4
Centos 6.2
Windows 2008R2
Windows 2008 64bit
Windows 2008 32bit
Windows 2003 64bit
Windows 2003 32bit
Currently live migration is not supported.
--- qemu/Makefile.objs | 1 + qemu/default-configs/pci.mak | 1 + qemu/hw/pci.c | 2 + qemu/hw/pci.h | 1 + qemu/hw/virtio-net.h | 13 +- qemu/hw/vmware_utils.h | 146 +++ qemu/hw/vmxnet3.c | 2574 ++++++++++++++++++++++++++++++++++++++++++ qemu/hw/vmxnet3.h | 767 +++++++++++++ qemu/hw/vmxnet3_debug.h | 119 ++ qemu/hw/vmxnet_utils.c | 187 +++ qemu/hw/vmxnet_utils.h | 257 +++++ qemu/net.c | 2 +- qemu/net/checksum.h | 7 + 13 files changed, 4070 insertions(+), 7 deletions(-) create mode 100644 qemu/hw/vmware_utils.h create mode 100644 qemu/hw/vmxnet3.c create mode 100644 qemu/hw/vmxnet3.h create mode 100644 qemu/hw/vmxnet3_debug.h create mode 100644 qemu/hw/vmxnet_utils.c create mode 100644 qemu/hw/vmxnet_utils.h
qemu/Makefile.objs +1 -0
@@ -264,6 +264,7 @@ hw-obj-$(CONFIG_PCNET_PCI) += pcnet-pci.o hw-obj-$(CONFIG_PCNET_COMMON) += pcnet.o hw-obj-$(CONFIG_E1000_PCI) += e1000.o hw-obj-$(CONFIG_RTL8139_PCI) += rtl8139.o +hw-obj-$(CONFIG_VMXNET3_PCI) += vmxnet3.o vmxnet_utils.o hw-obj-$(CONFIG_SMC91C111) += smc91c111.o hw-obj-$(CONFIG_LAN9118) += lan9118.o
qemu/default-configs/pci.mak +1 -0
@@ -13,6 +13,7 @@ CONFIG_PCNET_COMMON=y CONFIG_LSI_SCSI_PCI=y CONFIG_RTL8139_PCI=y CONFIG_E1000_PCI=y +CONFIG_VMXNET3_PCI=y CONFIG_IDE_CORE=y CONFIG_IDE_QDEV=y CONFIG_IDE_PCI=y
qemu/hw/pci.c +2 -0
@@ -1350,6 +1350,7 @@ static const char * const pci_nic_models[] = {"e1000" ,"pcnet" ,"virtio" , +"vmxnet3" , NULL };
@@ -1362,6 +1363,7 @@ static const char * const pci_nic_names[] = {"e1000" ,"pcnet" ,"virtio-net-pci" , +"vmxnet3" , NULL };
qemu/hw/pci.h +1 -0
@@ -60,6 +60,7 @@#define PCI_DEVICE_ID_VMWARE_NET 0x0720#define PCI_DEVICE_ID_VMWARE_SCSI 0x0730#define PCI_DEVICE_ID_VMWARE_IDE 0x1729 +#define PCI_DEVICE_ID_VMWARE_VMXNET3 0x07B0/* Intel (0x8086) */ #define PCI_DEVICE_ID_INTEL_82551IT 0x1209
qemu/hw/virtio-net.h +7 -6
@@ -78,13 +78,14 @@ struct virtio_net_config* specify GSO or CSUM features, you can simply ignore the header. */ struct virtio_net_hdr { -#define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 // Use csum_start, csum_offset +#define VIRTIO_NET_HDR_F_NEEDS_CSUM 1/* Use csum_start, csum_offset */ +#define VIRTIO_NET_HDR_F_DATA_VALID 2/* Csum is valid */ uint8_t flags; -#define VIRTIO_NET_HDR_GSO_NONE 0 // Not a GSO frame -#define VIRTIO_NET_HDR_GSO_TCPV4 1 // GSO frame, IPv4 TCP (TSO) -#define VIRTIO_NET_HDR_GSO_UDP 3 // GSO frame, IPv4 UDP (UFO) -#define VIRTIO_NET_HDR_GSO_TCPV6 4 // GSO frame, IPv6 TCP -#define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set +#define VIRTIO_NET_HDR_GSO_NONE 0/* Not a GSO frame */ +#define VIRTIO_NET_HDR_GSO_TCPV4 1/* GSO frame, IPv4 TCP (TSO) */ +#define VIRTIO_NET_HDR_GSO_UDP 3/* GSO frame, IPv4 UDP (UFO) */ +#define VIRTIO_NET_HDR_GSO_TCPV6 4/* GSO frame, IPv6 TCP */ +#define VIRTIO_NET_HDR_GSO_ECN 0x80/* TCP has ECN set */ uint8_t gso_type;uint16_t hdr_len;uint16_t gso_size;
qemu/hw/vmware_utils.h new file +146 -0
146 lines not on this page · raw message
qemu/hw/vmxnet3.c new file +2574 -0
2,574 lines not on this page · raw message
qemu/hw/vmxnet3.h new file +767 -0
225 lines not on this page · raw message
qemu/hw/vmxnet3_debug.h new file +119 -0
119 lines not on this page · raw message
qemu/hw/vmxnet_utils.c new file +187 -0
187 lines not on this page · raw message
qemu/hw/vmxnet_utils.h new file +257 -0
257 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.7.6
Part of the diff is not shown here. View the raw message.
Quoted 6 lines · Yan Vugenfirer
From: Dmitry Fleytman <[email protected]>
Implementation of VMWare VMXNET3 paravirtual NIC device. Supports of all the device features including offload capabilties, VLANs and etc.
The device is tested on different OSes:
[..snip..]
qemu/hw/vmware_utils.h line 5
Quoted 6 lines
qemu/hw/vmware_utils.h new file +5
-0@@ -0,0 +1,146 @@ +/* +* QEMU VMWARE paravirtual devices - auxiliary code +* +* Copyright (c) 2012 Ravello Systems LTD (http://ravellosystems.com) +* All Rights Reserved
Not quite sure, i'm follwing this, here it says that all rights are reserved.
Quoted 15 lines
qemu/hw/vmware_utils.h new file +15
-0+* +* Developed by Daynix Computing LTD (http://www.daynix.com) +* +* Authors: +* Dmitry Fleytman <[email protected]> +* Yan Vugenfirer <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; version 2 of the License and no later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or +* NON INFRINGEMENT. See the GNU General Public License for more
qemu/hw/vmware_utils.h line 30
Quoted 10 lines
qemu/hw/vmware_utils.h new file +10
-0+* details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +* +* The full GNU General Public License is included in this distribution in +* the file called "COPYING". +* +*/
And here that most of them are really not.
Not a lawyer though.
[..snip..]
Signature · 1 line
mailto:[email protected]
Adding Izik from Ravello.
Best regards,
Yan.
Quoted 54 lines · malc
Quoted 6 lines · Yan Vugenfirer
From: Dmitry Fleytman <[email protected]>
Implementation of VMWare VMXNET3 paravirtual NIC device. Supports of all the device features including offload capabilties, VLANs and etc.
The device is tested on different OSes:[..snip..]
qemu/hw/vmware_utils.h line 5
Quoted 6 lines
qemu/hw/vmware_utils.h new file +5
-0@@ -0,0 +1,146 @@ +/* +* QEMU VMWARE paravirtual devices - auxiliary code +* +* Copyright (c) 2012 Ravello Systems LTD (http://ravellosystems.com) +* All Rights Reserved Not quite sure, i'm follwing this, here it says that all rights are reserved.
Quoted 15 lines
qemu/hw/vmware_utils.h new file +15
-0+* +* Developed by Daynix Computing LTD (http://www.daynix.com) +* +* Authors: +* Dmitry Fleytman <[email protected]> +* Yan Vugenfirer <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; version 2 of the License and no later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or +* NON INFRINGEMENT. See the GNU General Public License for more qemu/hw/vmware_utils.h line 30
Quoted 10 lines
qemu/hw/vmware_utils.h new file +10
-0+* details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +* +* The full GNU General Public License is included in this distribution in +* the file called "COPYING". +* +*/ And here that most of them are really not.
Not a lawyer though.
[..snip..]
--
mailto:[email protected]
Quoted 25 lines · Yan Vugenfirer
Adding Izik from Ravello.
Best regards,
Yan.Quoted 19 lines · malc
Quoted 6 lines · Yan Vugenfirer
From: Dmitry Fleytman <[email protected]>
Implementation of VMWare VMXNET3 paravirtual NIC device. Supports of all the device features including offload capabilties, VLANs and etc.
The device is tested on different OSes:[..snip..]
qemu/hw/vmware_utils.h line 5
Quoted 6 lines
qemu/hw/vmware_utils.h new file +5
-0@@ -0,0 +1,146 @@ +/* +* QEMU VMWARE paravirtual devices - auxiliary code +* +* Copyright (c) 2012 Ravello Systems LTD (http://ravellosystems.com) +* All Rights Reserved Not quite sure, i'm follwing this, here it says that all rights are reserved.
Hey,
isn`t this is the common GPL2 licence format?
for example from the very same qemu:
/*
* qemu/kvm integration
*
* Copyright (C) 2006-2008 Qumranet Technologies
*
* Licensed under the terms of the GNU GPL version 2 or higher. */
Do we miss anything? because our meaning is to publish it as a fully GPL2 licensed code...
Thanks.
Quoted 35 lines
Quoted 35 lines
Quoted 16 lines
qemu/hw/vmware_utils.h new file +15
-0+* +* Developed by Daynix Computing LTD (http://www.daynix.com) +* +* Authors: +* Dmitry Fleytman <[email protected]> +* Yan Vugenfirer <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; version 2 of the License and no later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or +* NON INFRINGEMENT. See the GNU General Public License for more qemu/hw/vmware_utils.h line 30
Quoted 10 lines
qemu/hw/vmware_utils.h new file +10
-0+* details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +* +* The full GNU General Public License is included in this distribution in +* the file called "COPYING". +* +*/ And here that most of them are really not.
Not a lawyer though.
[..snip..]
--
mailto:[email protected]
Quoted 40 lines · Izik Eidus
Quoted 25 lines · Yan Vugenfirer
Adding Izik from Ravello.
Best regards,
Yan.Quoted 19 lines · malc
Quoted 6 lines · Yan Vugenfirer
From: Dmitry Fleytman <[email protected]>
Implementation of VMWare VMXNET3 paravirtual NIC device. Supports of all the device features including offload capabilties, VLANs and etc.
The device is tested on different OSes:[..snip..]
qemu/hw/vmware_utils.h line 5
Quoted 6 lines
qemu/hw/vmware_utils.h new file +5
-0@@ -0,0 +1,146 @@ +/* +* QEMU VMWARE paravirtual devices - auxiliary code +* +* Copyright (c) 2012 Ravello Systems LTD (http://ravellosystems.com) +* All Rights Reserved Not quite sure, i'm follwing this, here it says that all rights are reserved.
Hey,
isn`t this is the common GPL2 licence format?
for example from the very same qemu:
/*
* qemu/kvm integration
*
* Copyright (C) 2006-2008 Qumranet Technologies
*
* Licensed under the terms of the GNU GPL version 2 or higher. */
Quoted 2 lines
Do we miss anything? because our meaning is to publish it as a fully GPL2 licensed code...
Your "Copyright" line is fine, but you should really remove the 'All rights reserved' line which contradicts your GPL intention below
Quoted 27 lines
Quoted 27 lines
Quoted 27 lines
Quoted 26 lines
qemu/hw/vmware_utils.h new file +25
-0+* +* Developed by Daynix Computing LTD (http://www.daynix.com) +* +* Authors: +* Dmitry Fleytman <[email protected]> +* Yan Vugenfirer <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; version 2 of the License and no later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or +* NON INFRINGEMENT. See the GNU General Public License for more +* details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +* +* The full GNU General Public License is included in this distribution in +* the file called "COPYING". +* +*/
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
And here that most of them are really not.
Not a lawyer though.
[..snip..]
--
mailto:[email protected]
Regards,
Daniel
Signature · 4 lines
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
Quoted 39 lines · Daniel P. Berrange
Quoted 38 lines · Izik Eidus
Quoted 24 lines · Yan Vugenfirer
Adding Izik from Ravello.
Best regards,
Yan.Quoted 18 lines · malc
Quoted 6 lines · Yan Vugenfirer
From: Dmitry Fleytman<[email protected]>
Implementation of VMWare VMXNET3 paravirtual NIC device. Supports of all the device features including offload capabilties, VLANs and etc.
The device is tested on different OSes:[..snip..]
qemu/hw/vmware_utils.h line 5
Quoted 6 lines
qemu/hw/vmware_utils.h new file +5
-0@@ -0,0 +1,146 @@ +/* +* QEMU VMWARE paravirtual devices - auxiliary code +* +* Copyright (c) 2012 Ravello Systems LTD (http://ravellosystems.com) +* All Rights Reserved Not quite sure, i'm follwing this, here it says that all rights are reserved.
Hey,
isn`t this is the common GPL2 licence format?
for example from the very same qemu:
/*
* qemu/kvm integration
*
* Copyright (C) 2006-2008 Qumranet Technologies
*
* Licensed under the terms of the GNU GPL version 2 or higher. */
Quoted 5 lines
Quoted 2 lines
Do we miss anything? because our meaning is to publish it as a fully GPL2 licensed code...
Your "Copyright" line is fine, but you should really remove the 'All rights reserved' line which contradicts your GPL intention below
Ok, got it, we will resend it without 'All rights reserved' Thanks.
Quoted 36 lines
Quoted 26 lines
Quoted 26 lines
Quoted 26 lines
Quoted 26 lines
qemu/hw/vmware_utils.h new file +25
-0+* +* Developed by Daynix Computing LTD (http://www.daynix.com) +* +* Authors: +* Dmitry Fleytman<[email protected]> +* Yan Vugenfirer<[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; version 2 of the License and no later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or +* NON INFRINGEMENT. See the GNU General Public License for more +* details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +* +* The full GNU General Public License is included in this distribution in +* the file called "COPYING". +* +*/ Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
And here that most of them are really not.
Not a lawyer though.
[..snip..]
--
mailto:[email protected]Regards,
Daniel
Quoted 41 lines · Daniel P. Berrange
Quoted 40 lines · Izik Eidus
Quoted 25 lines · Yan Vugenfirer
Adding Izik from Ravello.
Best regards,
Yan.Quoted 19 lines · malc
Quoted 6 lines · Yan Vugenfirer
From: Dmitry Fleytman <[email protected]>
Implementation of VMWare VMXNET3 paravirtual NIC device. Supports of all the device features including offload capabilties, VLANs and etc.
The device is tested on different OSes:[..snip..]
qemu/hw/vmware_utils.h line 5
Quoted 6 lines
qemu/hw/vmware_utils.h new file +5
-0@@ -0,0 +1,146 @@ +/* +* QEMU VMWARE paravirtual devices - auxiliary code +* +* Copyright (c) 2012 Ravello Systems LTD (http://ravellosystems.com) +* All Rights Reserved Not quite sure, i'm follwing this, here it says that all rights are reserved.
Hey,
isn`t this is the common GPL2 licence format?
for example from the very same qemu:
/*
* qemu/kvm integration
*
* Copyright (C) 2006-2008 Qumranet Technologies
*
* Licensed under the terms of the GNU GPL version 2 or higher. */
Quoted 6 lines
Quoted 2 lines
Do we miss anything? because our meaning is to publish it as a fully GPL2 licensed code...
Your "Copyright" line is fine, but you should really remove the 'All rights reserved' line which contradicts your GPL intention below
(I am sending my answer again, my clock was not configured so the email had wrong time)
We will send the patch again, this time without this line.
Thanks.
Quoted 45 lines
Quoted 28 lines
Quoted 28 lines
Quoted 28 lines
Quoted 27 lines
qemu/hw/vmware_utils.h new file +25
-0+* +* Developed by Daynix Computing LTD (http://www.daynix.com) +* +* Authors: +* Dmitry Fleytman <[email protected]> +* Yan Vugenfirer <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; version 2 of the License and no later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or +* NON INFRINGEMENT. See the GNU General Public License for more +* details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +* +* The full GNU General Public License is included in this distribution in +* the file called "COPYING". +* +*/ Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
And here that most of them are really not.
Not a lawyer though.
[..snip..]
--
mailto:[email protected]Regards,
Daniel
--|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
Hello,
Am 28.02.2012 20:57, schrieb Izik Eidus:
Quoted 23 lines · Yan Vugenfirer
Quoted 11 lines · malc
Quoted 10 lines · Yan Vugenfirer
qemu/hw/vmware_utils.h line 5
Quoted 6 lines
qemu/hw/vmware_utils.h new file +5
-0@@ -0,0 +1,146 @@ +/* +* QEMU VMWARE paravirtual devices - auxiliary code +* +* Copyright (c) 2012 Ravello Systems LTD (http://ravellosystems.com) +* All Rights Reserved Not quite sure, i'm follwing this, here it says that all rights are reserved.
isn`t this is the common GPL2 licence format?
for example from the very same qemu:
/*
* qemu/kvm integration
*
* Copyright (C) 2006-2008 Qumranet Technologies
*
* Licensed under the terms of the GNU GPL version 2 or higher. */
Quoted 13 lines
Do we miss anything? because our meaning is to publish it as a fully GPL2 licensed code...
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
qemu/hw/vmware_utils.h new file +10
-0+* +* Developed by Daynix Computing LTD (http://www.daynix.com) +* +* Authors: +* Dmitry Fleytman <[email protected]> +* Yan Vugenfirer <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; version 2 of the License and no later version.
This is not the common GPLv2 license format: You say "and no later" rather than "or (at your option) any later version". Is there any particular reason for this, or was that just an oversight? Please compare http://wiki.qemu.org/Relicensing on our efforts to make code GPLv2+.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
qemu/hw/vmware_utils.h line 25
Quoted 10 lines
qemu/hw/vmware_utils.h new file +10
-0+* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or +* NON INFRINGEMENT. See the GNU General Public License for more +* details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
To avoid dealing with the constantly changing FSF postal address, please use a link to their licenses page or to the specific (versioned) license as outlined on gnu.org.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
qemu/hw/vmware_utils.h line 30
Quoted 5 lines
qemu/hw/vmware_utils.h new file +5
-0+* +* The full GNU General Public License is included in this distribution in +* the file called "COPYING". +* +*/
Thanks,
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg