libxcoder  3.4.0
ni_p2p_ioctl.h
Go to the documentation of this file.
1 /*******************************************************************************
2  *
3  * Copyright (C) 2022 NETINT Technologies
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a copy
6  * of this software and associated documentation files (the "Software"), to deal
7  * in the Software without restriction, including without limitation the rights
8  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9  * copies of the Software, and to permit persons to whom the Software is
10  * furnished to do so, subject to the following conditions:
11  *
12  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18  * SOFTWARE.
19  *
20  ******************************************************************************/
21 
22 /*!*****************************************************************************
23  * \file ni_p2p_ioctl.h
24  *
25  * \brief Definitions related to NETINT P2P kernel driver interface
26  ******************************************************************************/
27 
28 #ifndef _NETINT_IOCTL_H
29 #define _NETINT_IOCTL_H
30 
31 #define NI_DMABUF_READ_FENCE (1 << 0)
32 #define NI_DMABUF_SYNC_FILE_OUT_FENCE (1 << 1)
33 #define NI_DMABUF_SYNC_FILE_IN_FENCE (1 << 2)
34 
35 enum
36 {
39 };
40 
42 {
43  int fd;
44  unsigned int flags;
45  int domain;
46  int bus;
47  int dev;
48  int fn;
49  int bar;
50  unsigned long offset;
51  unsigned long length;
52 };
53 
55 {
56  int fd;
57  unsigned int len;
58  int dir;
59  unsigned char *data;
60 };
61 
63 {
64  int fd;
65  int fence_fd;
66  unsigned int flags;
67 };
68 
70 {
71  int fd;
72 };
73 
74 #define NETINT_IOCTL_ID _IO('N', 0x80)
75 #define NETINT_IOCTL_EXPORT_DMABUF \
76  _IOWR('N', 0x81, struct netint_iocmd_export_dmabuf)
77 #define NETINT_IOCTL_ATTACH_RFENCE \
78  _IOW('N', 0x82, struct netint_iocmd_attach_rfence)
79 #define NETINT_IOCTL_SIGNAL_RFENCE \
80  _IOW('N', 0x83, struct netint_iocmd_signal_rfence)
81 #define NETINT_IOCTL_ISSUE_REQ \
82  _IOW('N', 0x85, struct netint_iocmd_issue_request)
83 #endif /* _NETINT_IOCTL_H */
@ NI_DMABUF_WRITE_TO_DEVICE
Definition: ni_p2p_ioctl.h:38
@ NI_DMABUF_READ_FROM_DEVICE
Definition: ni_p2p_ioctl.h:37