FD.io VPP
v18.10-34-gcce845e
Vector Packet Processing
Main Page
Related Pages
Modules
Namespaces
Data Structures
Source
Files
Symbols
vfio.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018 Cisco and/or its affiliates.
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at:
6
*
7
* http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
16
#ifndef included_vlib_linux_vfio_h
17
#define included_vlib_linux_vfio_h
18
19
typedef
struct
20
{
21
int
group
;
22
int
fd
;
23
int
refcnt
;
24
}
linux_pci_vfio_iommu_group_t
;
25
26
typedef
struct
27
{
28
u32
flags
;
29
#define LINUX_VFIO_F_HAVE_IOMMU (1 << 0)
30
#define LINUX_VFIO_F_HAVE_NOIOMMU (1 << 1)
31
int
container_fd
;
32
33
/* VFIO */
34
int
iommu_mode
;
35
36
/* pool of IOMMU groups */
37
linux_pci_vfio_iommu_group_t
*
iommu_groups
;
38
39
/* iommu group pool index by group id hash */
40
uword
*
iommu_pool_index_by_group
;
41
42
/* logging */
43
vlib_log_class_t
log_default
;
44
}
linux_vfio_main_t
;
45
46
extern
linux_vfio_main_t
vfio_main
;
47
48
clib_error_t
*
linux_vfio_init
(
vlib_main_t
*
vm
);
49
void
linux_vfio_dma_map_regions
(
vlib_main_t
*
vm
);
50
clib_error_t
*
linux_vfio_group_get_device_fd
(vlib_pci_addr_t *
addr
,
51
int
*fd);
52
53
54
#endif
/* included_vlib_linux_vfio_h */
55
56
/*
57
* fd.io coding-style-patch-verification: ON
58
*
59
* Local Variables:
60
* eval: (c-set-style "gnu")
61
* End:
62
*/
vlib_log_class_t
u32 vlib_log_class_t
Definition:
log.h:21
linux_vfio_main_t
Definition:
vfio.h:26
linux_vfio_dma_map_regions
void linux_vfio_dma_map_regions(vlib_main_t *vm)
Definition:
vfio.c:77
linux_vfio_main_t::iommu_mode
int iommu_mode
Definition:
vfio.h:34
linux_vfio_main_t::log_default
vlib_log_class_t log_default
Definition:
vfio.h:43
addr
vhost_vring_addr_t addr
Definition:
vhost_user.h:121
linux_vfio_group_get_device_fd
clib_error_t * linux_vfio_group_get_device_fd(vlib_pci_addr_t *addr, int *fd)
Definition:
vfio.c:168
linux_vfio_main_t::iommu_groups
linux_pci_vfio_iommu_group_t * iommu_groups
Definition:
vfio.h:37
linux_pci_vfio_iommu_group_t
Definition:
vfio.h:19
linux_pci_vfio_iommu_group_t::fd
int fd
Definition:
vfio.h:22
u32
unsigned int u32
Definition:
types.h:88
linux_vfio_init
clib_error_t * linux_vfio_init(vlib_main_t *vm)
Definition:
vfio.c:229
linux_vfio_main_t::flags
u32 flags
Definition:
vfio.h:28
vm
vlib_main_t * vm
Definition:
buffer.c:294
linux_vfio_main_t::iommu_pool_index_by_group
uword * iommu_pool_index_by_group
Definition:
vfio.h:40
clib_error_t
Definition:
clib_error.h:21
linux_pci_vfio_iommu_group_t::group
int group
Definition:
vfio.h:21
vlib_main_t
Definition:
main.h:59
uword
u64 uword
Definition:
types.h:112
vfio_main
linux_vfio_main_t vfio_main
Definition:
vfio.c:35
linux_vfio_main_t::container_fd
int container_fd
Definition:
vfio.h:31
linux_pci_vfio_iommu_group_t::refcnt
int refcnt
Definition:
vfio.h:23
src
vlib
linux
vfio.h
Generated on Thu May 16 2019 14:25:46 for FD.io VPP by
1.8.11