// SPDX-License-Identifier: GPL-2.01#define _GNU_SOURCE2#include "main.h"3#include <assert.h>45/* stub implementation: useful for measuring overhead */6void alloc_ring(void)7{8}910/* guest side */11int add_inbuf(unsigned len, void *buf, void *datap)12{13return 0;14}1516/*17* skb_array API provides no way for producer to find out whether a given18* buffer was consumed. Our tests merely require that a successful get_buf19* 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{24return "Buffer";25}2627bool used_empty()28{29return false;30}3132void disable_call()33{34assert(0);35}3637bool enable_call()38{39assert(0);40}4142void kick_available(void)43{44assert(0);45}4647/* host side */48void disable_kick()49{50assert(0);51}5253bool enable_kick()54{55assert(0);56}5758bool avail_empty()59{60return false;61}6263bool use_buf(unsigned *lenp, void **bufp)64{65return true;66}6768void call_used(void)69{70assert(0);71}727374