Update to version 11.0.1

The biggest change is the removal of vmxnet from this package.  This means you
*must* be using the vmx driver included in FreeBSD or your networking will fail
after this update.  This is a danger for people who are running unsupported versions
of FreeBSD but could also affect people who are running custom kernels that have
removed vmx from them.

This update reduces our patchset by taking advantage of patches submitted upstream.

Sponsored by:	Panzura
This commit is contained in:
Josh Paetzel 2019-10-29 14:36:04 +00:00
parent 17c05c4c41
commit 29c57298f2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=515982
7 changed files with 18 additions and 190 deletions

View File

@ -5,6 +5,17 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
20191029:
AFFECTS: users of emulators/open-vm-tools[-nox11]
AUTHOR: jpaetzel@FreeBSD.org
open-vm-tools 11.0.1 has removed the vmxnet driver. This driver has been
in tree for quite some time and hopefully everyone is using the in tree
version, however if you had removed device vmx from your kernel, or are
running an unsupported version of FreeBSD which didn't have the driver
included in the base system, updating your open-vm-tools version will
leave you without networking.
20191026:
AFFECTS: users of www/qt5-webengine
AUTHOR: kai@FreeBSD.org

View File

@ -3,7 +3,6 @@
PORTNAME= open-vm-tools
PORTVERSION= ${RELEASE_VER}
PORTREVISION= 1
DISTVERSIONPREFIX= stable-
PORTEPOCH= 2
CATEGORIES= emulators
@ -19,8 +18,8 @@ ONLY_FOR_ARCHS= amd64 i386
LIB_DEPENDS= libmspack.so:archivers/libmspack \
libdnet.so:net/libdnet
RELEASE_VER= 10.3.0
BUILD_VER= 8931395
RELEASE_VER= 11.0.1
BUILD_VER= 14773994
OPTIONS_DEFINE= LIBNOTIFY OPENSSL X11
OPTIONS_DEFAULT= LIBNOTIFY OPENSSL X11
@ -85,7 +84,6 @@ post-install:
${MKDIR} ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/input
${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmblock.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmblock.ko
${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmmemctl.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmmemctl.ko
${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmxnet.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmxnet.ko
${MKDIR} ${STAGEDIR}${PREFIX}/share/open-vm-tools/scripts/vmware/
${MKDIR} ${STAGEDIR}${PREFIX}/share/open-vm-tools/scripts/
${MKDIR} ${STAGEDIR}${PREFIX}/share/open-vm-tools/tests/

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1533858593
SHA256 (vmware-open-vm-tools-stable-10.3.0_GH0.tar.gz) = b3d0b5fd272a8dc35cab1ddd732f9d436f72682925212a6cdeccdab283e2f5ec
SIZE (vmware-open-vm-tools-stable-10.3.0_GH0.tar.gz) = 3498624
TIMESTAMP = 1571957704
SHA256 (vmware-open-vm-tools-stable-11.0.1_GH0.tar.gz) = 99f1e3c5245bb002c1e66cbb7a1078e1c3567db5f92cc2e00ab08557e9df4758
SIZE (vmware-open-vm-tools-stable-11.0.1_GH0.tar.gz) = 2791701

View File

@ -1,84 +0,0 @@
--- modules/freebsd/vmmemctl/os.c.orig 2018-09-29 03:58:10 UTC
+++ modules/freebsd/vmmemctl/os.c
@@ -109,6 +109,30 @@ MALLOC_DEFINE(M_VMMEMCTL, BALLOON_NAME, "vmmemctl meta
#define VM_SYS_PAGES vm_cnt.v_page_count
#endif
+#if __FreeBSD_version < 1000000
+ #define KVA_ALLOC(size) kmem_alloc_nofault(kernel_map, size)
+ #define KVA_FREE(offset, size) kmem_free(kernel_map, offset, size)
+#else
+ #define KVA_ALLOC(size) kva_alloc(size);
+ #define KVA_FREE(offset, size) kva_free(offset, size)
+#endif
+
+#if __FreeBSD_version < 1000000
+ #define KMEM_ALLOC(size) kmem_alloc(kernel_map, size)
+#elif __FreeBSD_version < 1200080
+ #define KMEM_ALLOC(size) kmem_malloc(kernel_arena, size, M_WAITOK | M_ZERO)
+#else
+ #define KMEM_ALLOC(size) kmem_malloc(size, M_WAITOK | M_ZERO)
+#endif
+
+#if __FreeBSD_version < 1000000
+ #define KMEM_FREE(offset, size) kmem_free(kernel_map, offset, size)
+#elif __FreeBSD_version < 1200083
+ #define KMEM_FREE(offset, size) kmem_free(kernel_arena, offset, size)
+#else
+ #define KMEM_FREE(offset, size) kmem_free(offset, size)
+#endif
+
/*
* Globals
*/
@@ -322,11 +346,7 @@ OS_ReservedPageGetHandle(PA64 pa) // IN
Mapping
OS_MapPageHandle(PageHandle handle) // IN
{
-#if __FreeBSD_version < 1000000
- vm_offset_t res = kmem_alloc_nofault(kernel_map, PAGE_SIZE);
-#else
- vm_offset_t res = kva_alloc(PAGE_SIZE);
-#endif
+ vm_offset_t res = KVA_ALLOC(PAGE_SIZE);
vm_page_t page = (vm_page_t)handle;
@@ -384,11 +404,7 @@ void
OS_UnmapPage(Mapping mapping) // IN
{
pmap_qremove((vm_offset_t)mapping, 1);
-#if __FreeBSD_version < 1000000
- kmem_free(kernel_map, (vm_offset_t)mapping, PAGE_SIZE);
-#else
- kva_free((vm_offset_t)mapping, PAGE_SIZE);
-#endif
+ KVA_FREE((vm_offset_t)mapping, PAGE_SIZE);
}
@@ -405,22 +421,14 @@ os_pmap_alloc(os_pmap *p) // IN
p->size = (p->size + sizeof(unsigned long) - 1) &
~(sizeof(unsigned long) - 1);
-#if __FreeBSD_version < 1000000
- p->bitmap = (unsigned long *)kmem_alloc(kernel_map, p->size);
-#else
- p->bitmap = (unsigned long *)kmem_malloc(kernel_arena, p->size, M_WAITOK | M_ZERO);
-#endif
+ p->bitmap = (unsigned long *)KMEM_ALLOC(p->size);
}
static void
os_pmap_free(os_pmap *p) // IN
{
-#if __FreeBSD_version < 1000000
- kmem_free(kernel_map, (vm_offset_t)p->bitmap, p->size);
-#else
- kmem_free(kernel_arena, (vm_offset_t)p->bitmap, p->size);
-#endif
+ KMEM_FREE((vm_offset_t)p->bitmap, p->size);
p->size = 0;
p->bitmap = NULL;
}

View File

@ -1,80 +0,0 @@
--- modules/freebsd/vmxnet/if_vxn.c.orig 2017-02-24 22:15:37 UTC
+++ modules/freebsd/vmxnet/if_vxn.c
@@ -76,6 +76,10 @@
#include <pci/pcivar.h>
#endif
+#if __FreeBSD_version >= 1100001
+#include <net/if_var.h>
+#endif
+
/* define INLINE the way gcc likes it */
#define INLINE __inline__
@@ -936,14 +940,14 @@ vxn_encap(struct ifnet *ifp,
if (m != NULL) {
struct mbuf *m_new = NULL;
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new == NULL) {
printf("vxn%d: no memory for tx list\n", VXN_IF_UNIT(ifp));
return 1;
}
if (m_head->m_pkthdr.len > MHLEN) {
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
printf("vxn%d: no memory for tx list\n", VXN_IF_UNIT(ifp));
@@ -1067,7 +1071,11 @@ vxn_startl(struct ifnet *ifp)
VMXNET_INC(dd->txDriverNext, dd->txRingLength);
dd->txNumDeferred++;
sc->vxn_tx_pending++;
- ifp->if_opackets++;
+#if __FreeBSD_version >= 1100036
+ if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
+#else
+ ifp->if_opackets++;
+#endif
}
/*
@@ -1266,9 +1274,9 @@ vxn_rx(vxn_softc_t *sc)
/*
* Allocate a new mbuf cluster to replace the current one
*/
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new != NULL) {
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (m_new->m_flags & M_EXT) {
m_adj(m_new, ETHER_ALIGN);
} else {
@@ -1287,7 +1295,11 @@ vxn_rx(vxn_softc_t *sc)
sc->vxn_rx_buffptr[dd->rxDriverNext] = m_new;
rre->paddr = (uint32)vtophys(mtod(m_new, caddr_t));
+#if __FreeBSD_version >= 1100036
+ if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
+#else
ifp->if_ipackets++;
+#endif
m->m_pkthdr.rcvif = ifp;
m->m_pkthdr.len = m->m_len = pkt_len;
@@ -1401,10 +1413,10 @@ vxn_init_rings(vxn_softc_t *sc)
* Allocate an mbuf and initialize it to contain a packet header and
* internal data.
*/
- MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ MGETHDR(m_new, M_NOWAIT, MT_DATA);
if (m_new != NULL) {
/* Allocate and attach an mbuf cluster to mbuf. */
- MCLGET(m_new, M_DONTWAIT);
+ MCLGET(m_new, M_NOWAIT);
if (m_new->m_flags & M_EXT) {
m_adj(m_new, ETHER_ALIGN);
sc->vxn_rx_ring[i].paddr = (uint32)vtophys(mtod(m_new, caddr_t));

View File

@ -1,18 +0,0 @@
--- modules/freebsd/vmxnet/net_compat.h.orig 2018-03-30 18:44:35 UTC
+++ modules/freebsd/vmxnet/net_compat.h
@@ -37,9 +37,14 @@
#if __FreeBSD_version < 500016
#define VXN_IFMULTI_FIRST LIST_FIRST
#define VXN_IFMULTI_NEXT LIST_NEXT
-#else /* >= 500016 */
+#else
+#if __FreeBSD_version <= 1200063
#define VXN_IFMULTI_FIRST TAILQ_FIRST
#define VXN_IFMULTI_NEXT TAILQ_NEXT
+#else /* > 1200063 */
+ #define VXN_IFMULTI_FIRST CK_STAILQ_FIRST
+ #define VXN_IFMULTI_NEXT CK_STAILQ_NEXT
+#endif /* 1200063 */
#endif /* 500016 */
#if __FreeBSD_version < 500043

View File

@ -38,7 +38,6 @@ lib/open-vm-tools/plugins/vmsvc/libvmbackup.so
%%X11%%lib/open-vm-tools/plugins/vmusr/libdndcp.so
lib/vmware-tools/modules/drivers/vmblock.ko
lib/vmware-tools/modules/drivers/vmmemctl.ko
lib/vmware-tools/modules/drivers/vmxnet.ko
libdata/pkgconfig/vmguestlib.pc
sbin/mount_vmblock
share/vmware-tools/poweroff-vm-default
@ -57,5 +56,7 @@ share/vmware-tools/vm-support
%%DATADIR%%/messages/zh_CN/toolboxcmd.vmsg
@rmtry etc/vmware-tools/plugins
etc/pam.d/vmtoolsd
/etc/vmware-tools/tools.conf.example
@dirrmtry /etc/vmware-tools
@dir %%DATADIR%%/scripts/vmware
@dir %%DATADIR%%/tests