xref: /dpdk/lib/vhost/vduse.h (revision e9fd1ebf981f361844aea9ec94e17f4bda5e1479)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2023 Red Hat, Inc.
3  */
4 
5 #ifndef _VDUSE_H
6 #define _VDUSE_H
7 
8 #include "vhost.h"
9 
10 #define VDUSE_NET_SUPPORTED_FEATURES VIRTIO_NET_SUPPORTED_FEATURES
11 
12 #ifdef VHOST_HAS_VDUSE
13 
14 int vduse_device_create(const char *path, bool compliant_ol_flags);
15 int vduse_device_destroy(const char *path);
16 
17 #else
18 
19 static inline int
20 vduse_device_create(const char *path, bool compliant_ol_flags)
21 {
22 	RTE_SET_USED(compliant_ol_flags);
23 
24 	VHOST_CONFIG_LOG(path, ERR, "VDUSE support disabled at build time");
25 	return -1;
26 }
27 
28 static inline int
29 vduse_device_destroy(const char *path)
30 {
31 	VHOST_CONFIG_LOG(path, ERR, "VDUSE support disabled at build time");
32 	return -1;
33 }
34 
35 #endif /* VHOST_HAS_VDUSE */
36 
37 #endif /* _VDUSE_H */
38