Permalink
Browse files

MFC r256308:

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.

Approved by:	re (gjb)
  • Loading branch information...
1 parent 59c3f5e commit f71dcbc1ce5f213a050bde6b1f041272c9a05596 @bryanv bryanv committed Oct 11, 2013
Showing with 1 addition and 12 deletions.
  1. +1 −1 sys/dev/vmware/vmxnet3/if_vmx.c
  2. +0 −11 sys/dev/vmware/vmxnet3/if_vmxvar.h
@@ -1317,7 +1317,7 @@ vmxnet3_init_shared_data(struct vmxnet3_softc *sc)
/* 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
@@ -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.
*/

0 comments on commit f71dcbc

Please sign in to comment.