]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Retire VMCIQPair_Init
authorVMware, Inc <>
Tue, 19 Oct 2010 18:29:27 +0000 (11:29 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Tue, 19 Oct 2010 18:29:27 +0000 (11:29 -0700)
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 <mvanzin@vmware.com>
open-vm-tools/modules/linux/shared/vmciKernelAPI.h
open-vm-tools/modules/linux/vmci/vmciQPair.c
open-vm-tools/modules/linux/vsock/linux/af_vsock.c

index 5ebbe1ad3cfe21dcfb59b3ee9edbe176a9605bcb..7488dfbc6faa0ed32125c2bff332c22a794e69f9 100644 (file)
@@ -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);
index 6da36c92bb0c24f60b6e797045b775b5aa1641a0..fbfa0ab494d78990c7eca73bb8b3dfbb9bc90f94 100644 (file)
@@ -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);
-}
-
-
 /*
  *-----------------------------------------------------------------------------
  *
index 7e3212e853540086b0e0e703a117bc8304816cd5..b8acbcd48107181b739e3dcbb2c4e9d14c3e7367 100644 (file)
@@ -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);