From: VMware, Inc <> Date: Tue, 19 Oct 2010 18:29:27 +0000 (-0700) Subject: Retire VMCIQPair_Init X-Git-Tag: 2010.10.18-313025~88 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ae5455c77d0f5fcaa3422cef7f25ccbdf9105288;p=thirdparty%2Fopen-vm-tools.git Retire VMCIQPair_Init Queue pairs allocated with VMCIQPair_Alloc are initialized by either the hypervisor or the VMCI driver (for local queue pairs) and has been doing so since the initial release of VMCI with queue pairs (ws65), so VMCIQPair_Init isn't necessary (and may not do what you think, since it only initializes half a queue pair). So retire it. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/modules/linux/shared/vmciKernelAPI.h b/open-vm-tools/modules/linux/shared/vmciKernelAPI.h index 5ebbe1ad3..7488dfbc6 100644 --- a/open-vm-tools/modules/linux/shared/vmciKernelAPI.h +++ b/open-vm-tools/modules/linux/shared/vmciKernelAPI.h @@ -107,7 +107,6 @@ int VMCIQPair_Alloc(VMCIQPair **qpair, int VMCIQPair_Detach(VMCIQPair **qpair); -void VMCIQPair_Init(VMCIQPair *qpair); int VMCIQPair_GetProduceIndexes(const VMCIQPair *qpair, uint64 *producerTail, uint64 *consumerHead); diff --git a/open-vm-tools/modules/linux/vmci/vmciQPair.c b/open-vm-tools/modules/linux/vmci/vmciQPair.c index 6da36c92b..fbfa0ab49 100644 --- a/open-vm-tools/modules/linux/vmci/vmciQPair.c +++ b/open-vm-tools/modules/linux/vmci/vmciQPair.c @@ -284,39 +284,6 @@ VMCIQPairUnlock(const VMCIQPair *qpair) // IN } -/* - *----------------------------------------------------------------------------- - * - * VMCIQPair_Init -- - * - * This is the client interface for initializing the producer's - * pointers. - * - * Results: - * err, if < 0 - * - * Side effects: - * Windows blocking call. - * - *----------------------------------------------------------------------------- - */ - -VMCI_EXPORT_SYMBOL(VMCIQPair_Init) -void -VMCIQPair_Init(VMCIQPair *qpair) -{ - VMCIQPairLock(qpair); - - if (NULL != qpair && - NULL != qpair->produceQ && - NULL != qpair->produceQ->qHeader) { - VMCIQueueHeader_Init(qpair->produceQ->qHeader, qpair->handle); - } - - VMCIQPairUnlock(qpair); -} - - /* *----------------------------------------------------------------------------- * diff --git a/open-vm-tools/modules/linux/vsock/linux/af_vsock.c b/open-vm-tools/modules/linux/vsock/linux/af_vsock.c index 7e3212e85..b8acbcd48 100644 --- a/open-vm-tools/modules/linux/vsock/linux/af_vsock.c +++ b/open-vm-tools/modules/linux/vsock/linux/af_vsock.c @@ -1769,8 +1769,6 @@ VSockVmciRecvConnectingServer(struct sock *listener, // IN: the listening socket goto destroy; } - VMCIQPair_Init(qpair); - ASSERT(VMCI_HANDLE_EQUAL(handle, pkt->u.handle)); vpending->qpHandle = handle; vpending->qpair = qpair; @@ -2091,8 +2089,6 @@ VSockVmciRecvConnectingClientNegotiate(struct sock *sk, // IN: socket goto destroy; } - VMCIQPair_Init(qpair); - err = VSOCK_SEND_QP_OFFER(sk, handle); if (err < 0) { err = VSockVmci_ErrorToVSockError(err);