FD.io VPP  v21.01.1
Vector Packet Processing
vhost_std.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 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 #ifndef __VIRTIO_VHOST_STD_H__
16 #define __VIRTIO_VHOST_STD_H__
17 
18 typedef struct
19 {
25 
26 typedef struct
27 {
32 
33 typedef struct
34 {
38 
39 typedef struct
40 {
42  int fd;
44 
45 typedef struct
46 {
54 
55 typedef struct
56 {
60 
61 /* vhost kernel ioctls */
62 #define VHOST_VIRTIO 0xAF
63 #define VHOST_GET_FEATURES _IOR(VHOST_VIRTIO, 0x00, u64)
64 #define VHOST_SET_FEATURES _IOW(VHOST_VIRTIO, 0x00, u64)
65 #define VHOST_SET_OWNER _IO(VHOST_VIRTIO, 0x01)
66 #define VHOST_RESET_OWNER _IO(VHOST_VIRTIO, 0x02)
67 #define VHOST_SET_MEM_TABLE _IOW(VHOST_VIRTIO, 0x03, vhost_memory_t)
68 #define VHOST_SET_LOG_BASE _IOW(VHOST_VIRTIO, 0x04, u64)
69 #define VHOST_SET_LOG_FD _IOW(VHOST_VIRTIO, 0x07, int)
70 #define VHOST_SET_VRING_NUM _IOW(VHOST_VIRTIO, 0x10, vhost_vring_state_t)
71 #define VHOST_SET_VRING_ADDR _IOW(VHOST_VIRTIO, 0x11, vhost_vring_addr_t)
72 #define VHOST_SET_VRING_BASE _IOW(VHOST_VIRTIO, 0x12, vhost_vring_state_t)
73 #define VHOST_GET_VRING_BASE _IOWR(VHOST_VIRTIO, 0x12, vhost_vring_state_t)
74 #define VHOST_SET_VRING_KICK _IOW(VHOST_VIRTIO, 0x20, vhost_vring_file_t)
75 #define VHOST_SET_VRING_CALL _IOW(VHOST_VIRTIO, 0x21, vhost_vring_file_t)
76 #define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, vhost_vring_file_t)
77 #define VHOST_NET_SET_BACKEND _IOW(VHOST_VIRTIO, 0x30, vhost_vring_file_t)
78 
79 #endif
80 
81 /*
82  * fd.io coding-style-patch-verification: ON
83  *
84  * Local Variables:
85  * eval: (c-set-style "gnu")
86  * End:
87  */
unsigned long u64
Definition: types.h:89
unsigned int u32
Definition: types.h:88
vhost_user_memory_region_t regions[VHOST_MEMORY_MAX_NREGIONS]
Definition: vhost_user.h:106