blob: eda2f4824130e36f3970794f1a4b396809e6de44 [file] [log] [blame]
Michael S. Tsirkin139ab4d2016-05-24 15:21:05 +03001#define _GNU_SOURCE
2#include "main.h"
3#include <assert.h>
4
5/* stub implementation: useful for measuring overhead */
6void alloc_ring(void)
7{
8}
9
10/* guest side */
11int add_inbuf(unsigned len, void *buf, void *datap)
12{
13 return 0;
14}
15
16/*
17 * skb_array API provides no way for producer to find out whether a given
18 * buffer was consumed. Our tests merely require that a successful get_buf
19 * implies that add_inbuf succeed in the past, and that add_inbuf will succeed,
20 * fake it accordingly.
21 */
22void *get_buf(unsigned *lenp, void **bufp)
23{
24 return "Buffer";
25}
26
27void poll_used(void)
28{
29}
30
31void disable_call()
32{
33 assert(0);
34}
35
36bool enable_call()
37{
38 assert(0);
39}
40
41void kick_available(void)
42{
43 assert(0);
44}
45
46/* host side */
47void disable_kick()
48{
49 assert(0);
50}
51
52bool enable_kick()
53{
54 assert(0);
55}
56
57void poll_avail(void)
58{
59}
60
61bool use_buf(unsigned *lenp, void **bufp)
62{
63 return true;
64}
65
66void call_used(void)
67{
68 assert(0);
69}