]> git.proxmox.com Git - mirror_qemu.git/commit
net: Drop the NetLegacy structure, always use Netdev instead
authorThomas Huth <thuth@redhat.com>
Mon, 18 May 2020 18:01:03 +0000 (20:01 +0200)
committerJason Wang <jasowang@redhat.com>
Thu, 18 Jun 2020 13:05:52 +0000 (21:05 +0800)
commit71830d8430e65dd20aec4765d87e60336148e1a6
treee34c39a744f3edab707805dc1a896116aa9d93a4
parent9d903f30cb37eb2f7aec53ab58cd869f48ec16d5
net: Drop the NetLegacy structure, always use Netdev instead

Now that the "name" parameter is gone, there is hardly any difference
between NetLegacy and Netdev anymore, so we can drop NetLegacy and always
use Netdev to simplify the code quite a bit.

The only two differences that were really left between Netdev and NetLegacy:

1) NetLegacy does not allow a "hubport" type. We can continue to block
   this with a simple check in net_client_init1() for this type.

2) The "id" parameter was optional in NetLegacy (and an internal id
   was chosen via assign_name() during initialization), but it is mandatory
   for Netdev. To avoid that the visitor code bails out here, we have to
   add an internal id to the QemuOpts already earlier now.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
net/net.c
qapi/net.json