aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2018-04-30 20:02:23 +0200
committerJason Wang <jasowang@redhat.com>2018-05-14 15:47:14 +0800
commitaf1a5c3eb41521b4f090ad6125cd981b72b99ab9 (patch)
tree114b57df7ca6c567d6b8910cacc19d917f5f69ba /net
parent9d94619189d899b2b40e9dfaa0ede64c8b81e5ab (diff)
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>
Diffstat (limited to 'net')
-rw-r--r--net/net.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/net/net.c b/net/net.c
index 65457b7976..efb9eaf779 100644
--- a/net/net.c
+++ b/net/net.c
@@ -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.
*/