xref: /freebsd/sys/dev/vmware/vmci/vmci_queue_pair.h (revision 389e4940069316fe667ffa263fa7d6390d0a960f)
1 /*-
2  * Copyright (c) 2018 VMware, Inc.
3  *
4  * SPDX-License-Identifier: (BSD-2-Clause OR GPL-2.0)
5  *
6  * $FreeBSD$
7  */
8 
9 /* VMCI QueuePair API definition. */
10 
11 #ifndef _VMCI_QUEUE_PAIR_H_
12 #define _VMCI_QUEUE_PAIR_H_
13 
14 #include "vmci_kernel_if.h"
15 #include "vmci_queue.h"
16 
17 int	vmci_qp_guest_endpoints_init(void);
18 void	vmci_qp_guest_endpoints_exit(void);
19 void	vmci_qp_guest_endpoints_sync(void);
20 void	vmci_qp_guest_endpoints_convert(bool to_local, bool device_reset);
21 
22 int	vmci_queue_pair_alloc(struct vmci_handle *handle,
23 	    struct vmci_queue **produce_q, uint64_t produce_size,
24 	    struct vmci_queue **consume_q, uint64_t consume_size,
25 	    vmci_id peer, uint32_t flags, vmci_privilege_flags priv_flags);
26 int	vmci_queue_pair_detach(struct vmci_handle handle);
27 
28 #endif /* !_VMCI_QUEUE_PAIR_H_ */
29