net: Remove the deprecated "vlan" parameter

It's been marked as deprecated since QEMU v2.9.0, so that should have
been enough time for everybody to either just drop unnecessary "vlan=0"
parameters, to switch to the modern -device + -netdev syntax for connecting
guest NICs with host network backends, or to switch to the "hubport" netdev
in case hubs are really wanted instead.

Buglink: https://bugs.launchpad.net/qemu/+bug/658904
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
Thomas Huth 2018-04-30 20:02:23 +02:00 committed by Jason Wang
parent 9d94619189
commit af1a5c3eb4
8 changed files with 22 additions and 130 deletions

View file

@ -965,7 +965,6 @@ static int net_client_init1(const void *object, bool is_netdev, Error **errp)
const Netdev *netdev;
const char *name;
NetClientState *peer = NULL;
static bool vlan_warned;
if (is_netdev) {
netdev = object;
@ -1036,15 +1035,10 @@ static int net_client_init1(const void *object, bool is_netdev, Error **errp)
return -1;
}
/* Do not add to a vlan if it's a nic with a netdev= parameter. */
/* Do not add to a hub if it's a nic with a netdev= parameter. */
if (netdev->type != NET_CLIENT_DRIVER_NIC ||
!opts->u.nic.has_netdev) {
peer = net_hub_add_port(net->has_vlan ? net->vlan : 0, NULL, NULL);
}
if (net->has_vlan && !vlan_warned) {
error_report("'vlan' is deprecated. Please use 'netdev' instead.");
vlan_warned = true;
peer = net_hub_add_port(0, NULL, NULL);
}
}
@ -1365,7 +1359,7 @@ void qmp_set_link(const char *name, bool up, Error **errp)
* If the peer is a HUBPORT or a backend, we do not change the
* link status.
*
* This behavior is compatible with qemu vlans where there could be
* This behavior is compatible with qemu hubs where there could be
* multiple clients that can still communicate with each other in
* disconnected mode. For now maintain this compatibility.
*/