mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
net: use Netdev instead of NetClientOptions in client init
This way we no longer need NetClientOptions and can convert Netdev into a flat union. Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <93ffdfed7054529635e6acb935150d95dc173a12.1441627176.git.DirtY.iCE.hu@gmail.com> [rework net_client_init1() to pass Netdev by copying from NetdevLegacy, rather than merging the two types - which means that we still need NetClientOptions after all. Rebase to qapi changes. The bulk of the patch is mechanical, replacing 'opts' by 'netdev->opts', while net_client_init1() takes care of converting between legacy and modern types.] Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1468468228-27827-2-git-send-email-eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
committed by
Markus Armbruster
parent
3d344c2aab
commit
cebea51057
@@ -524,7 +524,7 @@ static NetClientInfo net_l2tpv3_info = {
|
||||
.cleanup = net_l2tpv3_cleanup,
|
||||
};
|
||||
|
||||
int net_init_l2tpv3(const NetClientOptions *opts,
|
||||
int net_init_l2tpv3(const Netdev *netdev,
|
||||
const char *name,
|
||||
NetClientState *peer, Error **errp)
|
||||
{
|
||||
@@ -545,8 +545,8 @@ int net_init_l2tpv3(const NetClientOptions *opts,
|
||||
s->queue_tail = 0;
|
||||
s->header_mismatch = false;
|
||||
|
||||
assert(opts->type == NET_CLIENT_OPTIONS_KIND_L2TPV3);
|
||||
l2tpv3 = opts->u.l2tpv3.data;
|
||||
assert(netdev->opts->type == NET_CLIENT_OPTIONS_KIND_L2TPV3);
|
||||
l2tpv3 = netdev->opts->u.l2tpv3.data;
|
||||
|
||||
if (l2tpv3->has_ipv6 && l2tpv3->ipv6) {
|
||||
s->ipv6 = l2tpv3->ipv6;
|
||||
|
||||
Reference in New Issue
Block a user