Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
73 lines
971 B
C
73 lines
971 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#define _GNU_SOURCE
|
|
#include "main.h"
|
|
#include <assert.h>
|
|
|
|
/* stub implementation: useful for measuring overhead */
|
|
void alloc_ring(void)
|
|
{
|
|
}
|
|
|
|
/* guest side */
|
|
int add_inbuf(unsigned len, void *buf, void *datap)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/*
|
|
* skb_array API provides no way for producer to find out whether a given
|
|
* buffer was consumed. Our tests merely require that a successful get_buf
|
|
* implies that add_inbuf succeed in the past, and that add_inbuf will succeed,
|
|
* fake it accordingly.
|
|
*/
|
|
void *get_buf(unsigned *lenp, void **bufp)
|
|
{
|
|
return "Buffer";
|
|
}
|
|
|
|
bool used_empty()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
void disable_call()
|
|
{
|
|
assert(0);
|
|
}
|
|
|
|
bool enable_call()
|
|
{
|
|
assert(0);
|
|
}
|
|
|
|
void kick_available(void)
|
|
{
|
|
assert(0);
|
|
}
|
|
|
|
/* host side */
|
|
void disable_kick()
|
|
{
|
|
assert(0);
|
|
}
|
|
|
|
bool enable_kick()
|
|
{
|
|
assert(0);
|
|
}
|
|
|
|
bool avail_empty()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
bool use_buf(unsigned *lenp, void **bufp)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
void call_used(void)
|
|
{
|
|
assert(0);
|
|
}
|