aboutsummaryrefslogtreecommitdiff
path: root/qapi/net.json
AgeCommit message (Collapse)AuthorFilesLines
2020-02-15qapi: Delete all the "foo: dropped in n.n" notesPeter Maydell1-4/+0
A handful of QAPI doc comments include lines like "ppcemb: dropped in 3.1". The doc comment parser will just put these into whatever the preceding section was; sometimes that's "Notes", and sometimes it's some random other section, as with "NetClientDriver" where the "'dump': dropped in 2.12" line ends up in the "Since:" section. This tends to render wrongly, more so in the upcoming rST generator, but sometimes even in the Texinfo, as in the case of QKeyCode: ac_bookmarks since 2.10 altgr, altgr_r: dropped in 2.10 Since commit 3264ffced3 (v4.2.0), we have a better place to tell users about deprecated and deleted functionality -- qemu-deprecated.texi. These "dropped in" remarks all predate it, and other feature drops of that vintage are not documented anywhere, so moving these to qemu-deprecated.texi makes little sense. Drop them instead. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20200213175647.17628-19-peter.maydell@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
2020-02-15qapi: Fix indent level on doc comments in json filesPeter Maydell1-11/+11
The current doc generation doesn't care much about indentation levels, but we would like to switch to an rST format, and rST does care about indentation. Make the doc comments more strongly consistent about indentation for multiline constructs like: @arg: description line 1 description line 2 Returns: line one line 2 so that there is always exactly one space after the colon, and subsequent lines align with the first. This commit is a purely whitespace change, and it does not alter the generated .texi files (because the texi generation code strips away all the extra whitespace). This does mean that we end up with some over-length lines. Note that when the documentation for an argument fits on a single line like this: @arg: one line only then stray extra spaces after the ':' don't affect the rST output, so I have not attempted to methodically fix them, though the preference is a single space here too. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20200213175647.17628-10-peter.maydell@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
2019-10-29qapi: add failover negotiated eventJens Freimann1-0/+19
This event is sent to let libvirt know that VIRTIO_NET_F_STANDBY feature is enabled. The primary device this virtio-net (standby) device is associated with, is now hotplugged by the virtio-net device. Signed-off-by: Jens Freimann <jfreimann@redhat.com> Message-Id: <20191029114905.6856-7-jfreimann@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com>
2019-10-29qapi: Fix doc comment checking for commands and eventsMarkus Armbruster1-2/+0
When a command's 'data' is an object, its doc comment describes the arguments defined there. When 'data' names a type, the doc comment does not describe arguments. Instead, the doc generator inserts a pointer to the named type. An event's doc comment works the same. We don't actually check doc comments for commands and events. Instead, QAPISchema._def_command() forwards the doc comment to the implicit argument type, where it gets checked. Works because the check only cares for the implicit argument type's members. Not only is this needlessly hard to understand, it actually falls apart in two cases: * When 'data' is empty, there is nothing to forward to, and the doc comment remains unchecked. Demonstrated by test doc-bad-event-arg. * When 'data' names a type, we can't forward, as the type has its own doc comment. The command or event's doc comment remains unchecked. Demonstrated by test doc-bad-boxed-command-arg. The forwarding goes back to commit 069fb5b250 "qapi: Prepare for requiring more complete documentation", put to use in commit 816a57cd6e "qapi: Fix detection of bogus member documentation". That fix was incomplete. To fix this, make QAPISchemaCommand and QAPISchemaEvent check doc comments, and drop the forwarding of doc comments to implicit argument types. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20191024110237.30963-12-armbru@redhat.com>
2019-07-02net/announce: Add optional IDDr. David Alan Gilbert1-2/+7
Previously there was a single instance of the timer used by monitor triggered announces, that's OK, but when combined with the previous change that lets you have announces for subsets of interfaces it's a bit restrictive if you want to do different things to different interfaces. Add an 'id' field to the announce, and maintain a list of the timers based on id. This allows you to for example: a) Start an announce going on interface eth0 for a long time b) Start an announce going on interface eth1 for a long time c) Kill the announce on eth0 while leaving eth1 going. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
2019-07-02net/announce: Allow optional list of interfacesDr. David Alan Gilbert1-3/+8
Allow the caller to restrict the set of interfaces that announces are sent on. The default is still to send on all interfaces. e.g. { "execute": "announce-self", "arguments": { "initial": 50, "max": 550, "rounds": 5, "step": 50, "interfaces": ["vn2", "vn1"] } } This doesn't affect the behaviour of migraiton announcments. Note: There's still only one timer for the qmp command, so that performing an 'announce-self' on one list of interfaces followed by another 'announce-self' on another list will stop the announces on the existing set. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
2019-03-05qmp: Add announce-self commandDr. David Alan Gilbert1-0/+20
Add a qmp command that can trigger guest announcements. It uses its own announce-timer instance, and parameters passed to it explicitly in the command. Like most qmp commands, it's in the main thread/bql, so there's no racing with any outstanding timer. Based on work of Germano Veit Michel <germano@redhat.com> and Vladislav Yasevich <vyasevic@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
2019-03-05net: Introduce announce timerDr. David Alan Gilbert1-0/+23
The 'announce timer' will be used by migration, and explicit requests for qemu to perform network announces. Based on the work by Germano Veit Michel <germano@redhat.com> and Vlad Yasevich <vyasevic@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
2018-12-13qapi: break long lines at 'data' memberMarc-André Lureau1-1/+2
Let's break the line before 'data'. While at it, improve a bit indentation/spacing. (I removed some alignment which are not helping much readability and become quickly inconsistent) Suggested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20181208111606.8505-26-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-10-21slirp: Implement RFC2132 TFTP server nameFam Zheng1-1/+4
This new usernet option can be used to add data for option 66 (tftp server name) in the BOOTP reply, which is useful in PXE based automatic OS install such as OpenBSD. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Tested-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2018-06-22qapi: remove empty flat union branches and typesAnton Nefedov1-12/+0
Flat unions may now have uncovered branches, so it is possible to get rid of empty types defined for that purpose only. Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1529311206-76847-3-git-send-email-anton.nefedov@virtuozzo.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-06-08slirp: fix domainname version availabilitySamuel Thibault1-1/+1
The change missed the 2.12 deadline. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Eric Blake <eblake@redhat.com>
2018-05-31slirp: Add domainname option to slirp's DHCP serverBenjamin Drung1-0/+4
This patch will allow the user to include the domainname option in replies from the built-in DHCP server. Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2018-05-29qapi: Change "since 2.13" annotations to "since 3.0"Peter Maydell1-1/+1
We're going to make the next release be 3.0, not 2.13; change the annotations in our json appropriately. Changes produced with sed -i -e 's/2\.13/3.0/g' qapi/*.json Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-id: 20180522104000.9044-2-peter.maydell@linaro.org
2018-05-20qapi/net.json: Fix the version number of the "vlan" removalThomas Huth1-2/+2
"vlan" will be dropped in 2.13, not in 2.12. And while we're at it, use the better wording "dropped in" instead of "removed with" (also for the "dump" removal). Reported-by: Stefan Hajnoczi <stefanha@redhat.com> Reported-by: Eric Blake <eblake@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2018-05-14net: Remove the deprecated "vlan" parameterThomas Huth1-8/+7
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>
2018-03-05net: Remove the deprecated way of dumping network packetsThomas Huth1-23/+6
"-net dump" has been marked as deprecated since QEMU v2.10, since it only works with the deprecated 'vlan' parameter (or hubs). Network dumping should be done with "-object filter-dump" nowadays instead. Since nobody complained so far about the deprecation message, let's finally get rid of "-net dump" now. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
2018-01-29net: Allow hubports to connect to other netdevsThomas Huth1-1/+3
QEMU can emulate hubs to connect NICs and netdevs. This is currently primarily used for the mis-named 'vlan' feature of the networking subsystem. Now the 'vlan' feature has been marked as deprecated, since its name is rather confusing and the users often rather mis-configure their network when trying to use it. But while the 'vlan' parameter should be removed at one point in time, the basic idea of emulating a hub in QEMU is still good: It's useful for bundling up the output of multiple NICs into one single l2tp netdev for example. Now to be able to use the hubport feature without 'vlan's, there is one missing piece: The possibility to connect a hubport to a netdev, too. This patch adds this possibility by introducing a new "netdev=..." parameter to the hubports. To bundle up the output of multiple NICs into one socket netdev, you can now run QEMU with these parameters for example: qemu-system-ppc64 ... -netdev socket,id=s1,connect=:11122 \ -netdev hubport,hubid=1,id=h1,netdev=s1 \ -netdev hubport,hubid=1,id=h2 -device e1000,netdev=h2 \ -netdev hubport,hubid=1,id=h3 -device virtio-net-pci,netdev=h3 For using the socket netdev, you have got to start another QEMU as the receiving side first, for example with network dumping enabled: qemu-system-x86_64 -M isapc -netdev socket,id=s0,listen=:11122 \ -device ne2k_isa,netdev=s0 \ -object filter-dump,id=f1,netdev=s0,file=/tmp/dump.dat After the ppc64 guest tried to boot from both NICs, you can see in the dump file (using Wireshark, for example), that the output of both NICs (the e1000 and the virtio-net-pci) has been successfully transfered via the socket netdev in this case. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
2017-09-04qapi-schema: Collect net device stuff in qapi/net.jsonMarkus Armbruster1-0/+706
Cc: Jason Wang <jasowang@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1503602048-12268-8-git-send-email-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>