net: make tap offloading callbacks static
Since TAP offloadings are manipulated through a new API, it's not necessary to export them in include/net/tap.h anymore. Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
cf528b8958
commit
3bac80d31a
@ -29,12 +29,6 @@
|
|||||||
#include "qemu-common.h"
|
#include "qemu-common.h"
|
||||||
#include "qapi-types.h"
|
#include "qapi-types.h"
|
||||||
|
|
||||||
bool tap_has_ufo(NetClientState *nc);
|
|
||||||
bool tap_has_vnet_hdr(NetClientState *nc);
|
|
||||||
bool tap_has_vnet_hdr_len(NetClientState *nc, int len);
|
|
||||||
void tap_using_vnet_hdr(NetClientState *nc, bool using_vnet_hdr);
|
|
||||||
void tap_set_offload(NetClientState *nc, int csum, int tso4, int tso6, int ecn, int ufo);
|
|
||||||
void tap_set_vnet_hdr_len(NetClientState *nc, int len);
|
|
||||||
int tap_enable(NetClientState *nc);
|
int tap_enable(NetClientState *nc);
|
||||||
int tap_disable(NetClientState *nc);
|
int tap_disable(NetClientState *nc);
|
||||||
|
|
||||||
|
@ -669,12 +669,12 @@ static void tap_win32_send(void *opaque)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool tap_has_ufo(NetClientState *nc)
|
static bool tap_has_ufo(NetClientState *nc)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool tap_has_vnet_hdr(NetClientState *nc)
|
static bool tap_has_vnet_hdr(NetClientState *nc)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -688,11 +688,11 @@ void tap_fd_set_vnet_hdr_len(int fd, int len)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void tap_using_vnet_hdr(NetClientState *nc, bool using_vnet_hdr)
|
static void tap_using_vnet_hdr(NetClientState *nc, bool using_vnet_hdr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void tap_set_offload(NetClientState *nc, int csum, int tso4,
|
static void tap_set_offload(NetClientState *nc, int csum, int tso4,
|
||||||
int tso6, int ecn, int ufo)
|
int tso6, int ecn, int ufo)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -702,12 +702,12 @@ struct vhost_net *tap_get_vhost_net(NetClientState *nc)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool tap_has_vnet_hdr_len(NetClientState *nc, int len)
|
static bool tap_has_vnet_hdr_len(NetClientState *nc, int len)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tap_set_vnet_hdr_len(NetClientState *nc, int len)
|
static void tap_set_vnet_hdr_len(NetClientState *nc, int len)
|
||||||
{
|
{
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
12
net/tap.c
12
net/tap.c
@ -210,7 +210,7 @@ static void tap_send(void *opaque)
|
|||||||
} while (size > 0 && qemu_can_send_packet(&s->nc));
|
} while (size > 0 && qemu_can_send_packet(&s->nc));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool tap_has_ufo(NetClientState *nc)
|
static bool tap_has_ufo(NetClientState *nc)
|
||||||
{
|
{
|
||||||
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
||||||
|
|
||||||
@ -219,7 +219,7 @@ bool tap_has_ufo(NetClientState *nc)
|
|||||||
return s->has_ufo;
|
return s->has_ufo;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool tap_has_vnet_hdr(NetClientState *nc)
|
static bool tap_has_vnet_hdr(NetClientState *nc)
|
||||||
{
|
{
|
||||||
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
||||||
|
|
||||||
@ -228,7 +228,7 @@ bool tap_has_vnet_hdr(NetClientState *nc)
|
|||||||
return !!s->host_vnet_hdr_len;
|
return !!s->host_vnet_hdr_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool tap_has_vnet_hdr_len(NetClientState *nc, int len)
|
static bool tap_has_vnet_hdr_len(NetClientState *nc, int len)
|
||||||
{
|
{
|
||||||
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
||||||
|
|
||||||
@ -237,7 +237,7 @@ bool tap_has_vnet_hdr_len(NetClientState *nc, int len)
|
|||||||
return !!tap_probe_vnet_hdr_len(s->fd, len);
|
return !!tap_probe_vnet_hdr_len(s->fd, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
void tap_set_vnet_hdr_len(NetClientState *nc, int len)
|
static void tap_set_vnet_hdr_len(NetClientState *nc, int len)
|
||||||
{
|
{
|
||||||
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
||||||
|
|
||||||
@ -249,7 +249,7 @@ void tap_set_vnet_hdr_len(NetClientState *nc, int len)
|
|||||||
s->host_vnet_hdr_len = len;
|
s->host_vnet_hdr_len = len;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tap_using_vnet_hdr(NetClientState *nc, bool using_vnet_hdr)
|
static void tap_using_vnet_hdr(NetClientState *nc, bool using_vnet_hdr)
|
||||||
{
|
{
|
||||||
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
||||||
|
|
||||||
@ -259,7 +259,7 @@ void tap_using_vnet_hdr(NetClientState *nc, bool using_vnet_hdr)
|
|||||||
s->using_vnet_hdr = using_vnet_hdr;
|
s->using_vnet_hdr = using_vnet_hdr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tap_set_offload(NetClientState *nc, int csum, int tso4,
|
static void tap_set_offload(NetClientState *nc, int csum, int tso4,
|
||||||
int tso6, int ecn, int ufo)
|
int tso6, int ecn, int ufo)
|
||||||
{
|
{
|
||||||
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
||||||
|
Loading…
Reference in New Issue
Block a user