Date: Fri, 11 Oct 2013 06:48:40 +0000 (UTC) From: Bryan Venteicher <bryanv@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256308 - head/sys/dev/vmware/vmxnet3 Message-ID: <201310110648.r9B6meQ2068171@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bryanv Date: Fri Oct 11 06:48:40 2013 New Revision: 256308 URL: http://svnweb.freebsd.org/changeset/base/256308 Log: Do not provide a hint of the guest's OS version The calculation can overflow if __FreeBSD_version is big enough, and it does not appear to be required. Reported by: grehan Approved by: re (gjb) Modified: head/sys/dev/vmware/vmxnet3/if_vmx.c head/sys/dev/vmware/vmxnet3/if_vmxvar.h Modified: head/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- head/sys/dev/vmware/vmxnet3/if_vmx.c Fri Oct 11 05:09:23 2013 (r256307) +++ head/sys/dev/vmware/vmxnet3/if_vmx.c Fri Oct 11 06:48:40 2013 (r256308) @@ -1317,7 +1317,7 @@ vmxnet3_init_shared_data(struct vmxnet3_ /* DriverInfo */ ds->version = VMXNET3_DRIVER_VERSION; - ds->guest = VMXNET3_GOS_FREEBSD | VMXNET3_GUEST_OS_VERSION | + ds->guest = VMXNET3_GOS_FREEBSD | #ifdef __LP64__ VMXNET3_GOS_64BIT; #else Modified: head/sys/dev/vmware/vmxnet3/if_vmxvar.h ============================================================================== --- head/sys/dev/vmware/vmxnet3/if_vmxvar.h Fri Oct 11 05:09:23 2013 (r256307) +++ head/sys/dev/vmware/vmxnet3/if_vmxvar.h Fri Oct 11 06:48:40 2013 (r256308) @@ -248,17 +248,6 @@ struct vmxnet3_softc { #define VMXNET3_DRIVER_VERSION 0x00010000 /* - * Convert the FreeBSD version in to something the hypervisor - * understands. This is apparently what VMware's driver reports - * so mimic it even though it probably is not required. - */ -#define VMXNET3_GUEST_OS_VERSION \ - (((__FreeBSD_version / 100000) << 14) | \ - (((__FreeBSD_version / 1000) % 100) << 6 ) | \ - (((__FreeBSD_version / 100) % 10) << 30) | \ - ((__FreeBSD_version % 100) << 22)) - -/* * Max descriptors per Tx packet. We must limit the size of the * any TSO packets based on the number of segments. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310110648.r9B6meQ2068171>