diff options
author | Thomas Huth <thuth@redhat.com> | 2018-04-30 20:02:23 +0200 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2018-05-14 15:47:14 +0800 |
commit | af1a5c3eb41521b4f090ad6125cd981b72b99ab9 (patch) | |
tree | 114b57df7ca6c567d6b8910cacc19d917f5f69ba /net/net.c | |
parent | 9d94619189d899b2b40e9dfaa0ede64c8b81e5ab (diff) | |
download | qemu-af1a5c3eb41521b4f090ad6125cd981b72b99ab9.zip qemu-af1a5c3eb41521b4f090ad6125cd981b72b99ab9.tar.gz qemu-af1a5c3eb41521b4f090ad6125cd981b72b99ab9.tar.bz2 |
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/net.c')
-rw-r--r-- | net/net.c | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -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. */ |