mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
QAPI patches for 2016-07-19
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJXjnLvAAoJEDhwtADrkYZTkd0P/iVsviq3WwxjmpbjyYDqgBYl 2hj9XL8ZtYGwFIU9WZXdu16lXlXtZom9u8XzspXIvhy5McNeWDxYarbE2kByyjac rl4873YzIspVKPPFMl2LWsHwtq7LLGzFF+f+ofjHN81ZdM6qTwZBe00gxxY8281I 6x1aQYkhOAmqJAlqqnEVk76WtdScs23mdbqmy1LzGD3ZBKvDa8IasogAKvZquNZX P16kYdq9QFqFJ30non9fWg9VQWtdryisseVhpSY/PXlrM4H+XPDK4hvegr3pjN8S yqtmKkPOuVWQyCfRz6UWBP0ncz3QN7iOiVLqb6TJgxJ8jFp3lbEEsXsCkvpSWjOU JDFOcGuiE1AVoZF8NxWQ3fdLiHt2jyCgY7iqgbNc1A3eT2H5IshIc7OF5QOU7MtP EYqk5bXiusUftuvZE5Mh0pXJ5AeOEOoXM+/dGRt3IRxPtqOWlW7/NM4YGgMD9XFg 83i5OIjdOBa1HYvetfEl3oKYsu+2zGsSqz4AH3CDIWJ8aoWJ9RNId3JJWFf+jyFR S+l7wMyFYdzDL7VqUmIy8xrVgc0IQPYT0udcjdOciEej873roEVencQ07VnK2zN0 aiAmAN/BQFO0HmmH4rBvTcLxF06+HnW0CwKii0mlAeisUFTQJEDmyg823Uc+MAGl 4pGFqDUbnzsy8xK3HCCP =MhfL -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2016-07-19' into staging QAPI patches for 2016-07-19 # gpg: Signature made Tue 19 Jul 2016 19:35:27 BST # gpg: using RSA key 0x3870B400EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-qapi-2016-07-19: net: Use correct type for bool flag qapi: Change Netdev into a flat union block: Simplify drive-mirror block: Simplify block_set_io_throttle qapi: Implement boxed types for commands/events qapi: Plumb in 'boxed' to qapi generator lower levels qapi-event: Simplify visit of non-implicit data qapi: Drop useless gen_err_check() qapi: Add type.is_empty() helper qapi: Hide tag_name data member of variants qapi: Special case c_name() for empty type qapi: Require all branches of flat union enum to be covered net: use Netdev instead of NetClientOptions in client init qapi: change QmpInputVisitor to QSLIST qapi: change QmpOutputVisitor to QSLIST Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
3b2e6798ff
95 changed files with 700 additions and 509 deletions
28
net/tap.c
28
net/tap.c
|
|
@ -223,7 +223,7 @@ static bool tap_has_ufo(NetClientState *nc)
|
|||
{
|
||||
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
||||
|
||||
assert(nc->info->type == NET_CLIENT_OPTIONS_KIND_TAP);
|
||||
assert(nc->info->type == NET_CLIENT_DRIVER_TAP);
|
||||
|
||||
return s->has_ufo;
|
||||
}
|
||||
|
|
@ -232,7 +232,7 @@ static bool tap_has_vnet_hdr(NetClientState *nc)
|
|||
{
|
||||
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
||||
|
||||
assert(nc->info->type == NET_CLIENT_OPTIONS_KIND_TAP);
|
||||
assert(nc->info->type == NET_CLIENT_DRIVER_TAP);
|
||||
|
||||
return !!s->host_vnet_hdr_len;
|
||||
}
|
||||
|
|
@ -241,7 +241,7 @@ static bool tap_has_vnet_hdr_len(NetClientState *nc, int len)
|
|||
{
|
||||
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
||||
|
||||
assert(nc->info->type == NET_CLIENT_OPTIONS_KIND_TAP);
|
||||
assert(nc->info->type == NET_CLIENT_DRIVER_TAP);
|
||||
|
||||
return !!tap_probe_vnet_hdr_len(s->fd, len);
|
||||
}
|
||||
|
|
@ -250,7 +250,7 @@ static void tap_set_vnet_hdr_len(NetClientState *nc, int len)
|
|||
{
|
||||
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
||||
|
||||
assert(nc->info->type == NET_CLIENT_OPTIONS_KIND_TAP);
|
||||
assert(nc->info->type == NET_CLIENT_DRIVER_TAP);
|
||||
assert(len == sizeof(struct virtio_net_hdr_mrg_rxbuf) ||
|
||||
len == sizeof(struct virtio_net_hdr));
|
||||
|
||||
|
|
@ -262,7 +262,7 @@ static void tap_using_vnet_hdr(NetClientState *nc, bool using_vnet_hdr)
|
|||
{
|
||||
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
||||
|
||||
assert(nc->info->type == NET_CLIENT_OPTIONS_KIND_TAP);
|
||||
assert(nc->info->type == NET_CLIENT_DRIVER_TAP);
|
||||
assert(!!s->host_vnet_hdr_len == using_vnet_hdr);
|
||||
|
||||
s->using_vnet_hdr = using_vnet_hdr;
|
||||
|
|
@ -336,14 +336,14 @@ static void tap_poll(NetClientState *nc, bool enable)
|
|||
int tap_get_fd(NetClientState *nc)
|
||||
{
|
||||
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
||||
assert(nc->info->type == NET_CLIENT_OPTIONS_KIND_TAP);
|
||||
assert(nc->info->type == NET_CLIENT_DRIVER_TAP);
|
||||
return s->fd;
|
||||
}
|
||||
|
||||
/* fd support */
|
||||
|
||||
static NetClientInfo net_tap_info = {
|
||||
.type = NET_CLIENT_OPTIONS_KIND_TAP,
|
||||
.type = NET_CLIENT_DRIVER_TAP,
|
||||
.size = sizeof(TAPState),
|
||||
.receive = tap_receive,
|
||||
.receive_raw = tap_receive_raw,
|
||||
|
|
@ -571,7 +571,7 @@ static int net_bridge_run_helper(const char *helper, const char *bridge,
|
|||
}
|
||||
}
|
||||
|
||||
int net_init_bridge(const NetClientOptions *opts, const char *name,
|
||||
int net_init_bridge(const Netdev *netdev, const char *name,
|
||||
NetClientState *peer, Error **errp)
|
||||
{
|
||||
const NetdevBridgeOptions *bridge;
|
||||
|
|
@ -579,8 +579,8 @@ int net_init_bridge(const NetClientOptions *opts, const char *name,
|
|||
TAPState *s;
|
||||
int fd, vnet_hdr;
|
||||
|
||||
assert(opts->type == NET_CLIENT_OPTIONS_KIND_BRIDGE);
|
||||
bridge = opts->u.bridge.data;
|
||||
assert(netdev->type == NET_CLIENT_DRIVER_BRIDGE);
|
||||
bridge = &netdev->u.bridge;
|
||||
|
||||
helper = bridge->has_helper ? bridge->helper : DEFAULT_BRIDGE_HELPER;
|
||||
br = bridge->has_br ? bridge->br : DEFAULT_BRIDGE_INTERFACE;
|
||||
|
|
@ -735,7 +735,7 @@ static int get_fds(char *str, char *fds[], int max)
|
|||
return i;
|
||||
}
|
||||
|
||||
int net_init_tap(const NetClientOptions *opts, const char *name,
|
||||
int net_init_tap(const Netdev *netdev, const char *name,
|
||||
NetClientState *peer, Error **errp)
|
||||
{
|
||||
const NetdevTapOptions *tap;
|
||||
|
|
@ -747,8 +747,8 @@ int net_init_tap(const NetClientOptions *opts, const char *name,
|
|||
const char *vhostfdname;
|
||||
char ifname[128];
|
||||
|
||||
assert(opts->type == NET_CLIENT_OPTIONS_KIND_TAP);
|
||||
tap = opts->u.tap.data;
|
||||
assert(netdev->type == NET_CLIENT_DRIVER_TAP);
|
||||
tap = &netdev->u.tap;
|
||||
queues = tap->has_queues ? tap->queues : 1;
|
||||
vhostfdname = tap->has_vhostfd ? tap->vhostfd : NULL;
|
||||
|
||||
|
|
@ -921,7 +921,7 @@ free_fail:
|
|||
VHostNetState *tap_get_vhost_net(NetClientState *nc)
|
||||
{
|
||||
TAPState *s = DO_UPCAST(TAPState, nc, nc);
|
||||
assert(nc->info->type == NET_CLIENT_OPTIONS_KIND_TAP);
|
||||
assert(nc->info->type == NET_CLIENT_DRIVER_TAP);
|
||||
return s->vhost_net;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue