<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qemu/include/net, branch master</title>
<subtitle>QEMU development tree</subtitle>
<id>https://git.zx2c4.com/qemu/atom/include/net?h=master</id>
<link rel='self' href='https://git.zx2c4.com/qemu/atom/include/net?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/'/>
<updated>2024-06-04T07:14:26Z</updated>
<entry>
<title>net: Remove receive_raw()</title>
<updated>2024-06-04T07:14:26Z</updated>
<author>
<name>Akihiko Odaki</name>
<email>akihiko.odaki@daynix.com</email>
</author>
<published>2024-04-28T07:00:47Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=b9ad513e187669db8f5ac238028f6bf25a17c641'/>
<id>urn:sha1:b9ad513e187669db8f5ac238028f6bf25a17c641</id>
<content type='text'>
While netmap implements virtio-net header, it does not implement
receive_raw(). Instead of implementing receive_raw for netmap, add
virtio-net headers in the common code and use receive_iov()/receive()
instead. This also fixes the buffer size for the virtio-net header.

Fixes: fbbdbddec0 ("tap: allow extended virtio header with hash info")
Signed-off-by: Akihiko Odaki &lt;akihiko.odaki@daynix.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>tap: Remove qemu_using_vnet_hdr()</title>
<updated>2024-06-04T07:14:25Z</updated>
<author>
<name>Akihiko Odaki</name>
<email>akihiko.odaki@daynix.com</email>
</author>
<published>2024-04-28T07:00:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=4b52d63249a508dd927222ffac1a868d38681fc5'/>
<id>urn:sha1:4b52d63249a508dd927222ffac1a868d38681fc5</id>
<content type='text'>
Since qemu_set_vnet_hdr_len() is always called when
qemu_using_vnet_hdr() is called, we can merge them and save some code.

For consistency, express that the virtio-net header is not in use by
returning 0 with qemu_get_vnet_hdr_len() instead of having a dedicated
function, qemu_get_using_vnet_hdr().

Signed-off-by: Akihiko Odaki &lt;akihiko.odaki@daynix.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: remove AnnounceTimer from typedefs.h</title>
<updated>2024-05-03T13:47:48Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2024-05-02T14:55:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=2d3f409631f087a7caa26d03c3b22fbcafc55cc8'/>
<id>urn:sha1:2d3f409631f087a7caa26d03c3b22fbcafc55cc8</id>
<content type='text'>
Exactly nobody needs it there.  Place the typedef in the header
that defines the struct.

Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>Revert "tap: setting error appropriately when calling net_init_tap_one()"</title>
<updated>2024-03-29T06:59:07Z</updated>
<author>
<name>Akihiko Odaki</name>
<email>akihiko.odaki@daynix.com</email>
</author>
<published>2023-09-21T09:37:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=d9b33018a0da51eddceb48c42345cfb351065f3e'/>
<id>urn:sha1:d9b33018a0da51eddceb48c42345cfb351065f3e</id>
<content type='text'>
This reverts commit 46d4d36d0bf2b24b205f2f604f0905db80264eef.

The reverted commit changed to emit warnings instead of errors when
vhost is requested but vhost initialization fails if vhostforce option
is not set.

However, vhostforce is not meant to ignore vhost errors. It was once
introduced as an option to commit 5430a28fe4 ("vhost: force vhost off
for non-MSI guests") to force enabling vhost for non-MSI guests, which
will have worse performance with vhost. The option was deprecated with
commit 1e7398a140 ("vhost: enable vhost without without MSI-X") and
changed to behave identical with the vhost option for compatibility.

Worse, commit bf769f742c ("virtio: del net client if net_init_tap_one
failed") changed to delete the client when vhost fails even when the
failure only results in a warning. The leads to an assertion failure
for the -netdev command line option.

The reverted commit was intended to avoid that the vhost initialization
failure won't result in a corrupted netdev. This problem should have
been fixed by deleting netdev when the initialization fails instead of
ignoring the failure with an arbitrary option. Fortunately, commit
bf769f742c ("virtio: del net client if net_init_tap_one failed"),
mentioned earlier, implements this behavior.

Restore the correct semantics and fix the assertion failure for the
-netdev command line option by reverting the problematic commit.

Signed-off-by: Akihiko Odaki &lt;akihiko.odaki@daynix.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>qapi: Move @String out of common.json to discourage reuse</title>
<updated>2024-02-12T09:04:32Z</updated>
<author>
<name>Markus Armbruster</name>
<email>armbru@redhat.com</email>
</author>
<published>2024-02-05T07:47:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=8bf69544b5e8142a4b7397bc1235eb2c42d1b29d'/>
<id>urn:sha1:8bf69544b5e8142a4b7397bc1235eb2c42d1b29d</id>
<content type='text'>
Use of String is problematic, because it results in awkward interface
documentation.  The previous commit cleaned up one instance.

Move String out of common.json next to its remaining users in net.json
to discourage reuse elsewhere.

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Message-ID: &lt;20240205074709.3613229-15-armbru@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: make nb_nics and nd_table[] static in net/net.c</title>
<updated>2024-02-02T16:23:48Z</updated>
<author>
<name>David Woodhouse</name>
<email>dwmw@amazon.co.uk</email>
</author>
<published>2023-10-23T08:38:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=e8c5c4525cbbd7207c085732cfd1e67d8f3d662a'/>
<id>urn:sha1:e8c5c4525cbbd7207c085732cfd1e67d8f3d662a</id>
<content type='text'>
Also remove the stale declaration of host_net_devices; the actual
definition was removed long ago in commit 7cc28cb06104 ("net: Remove
the deprecated 'host_net_add' and 'host_net_remove' HMP commands")

Signed-off-by: David Woodhouse &lt;dwmw@amazon.co.uk&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: remove qemu_show_nic_models(), qemu_find_nic_model()</title>
<updated>2024-02-02T16:23:48Z</updated>
<author>
<name>David Woodhouse</name>
<email>dwmw@amazon.co.uk</email>
</author>
<published>2023-10-23T08:38:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=481434f99e5293cadf0f056bef4afbbefd7b0bb3'/>
<id>urn:sha1:481434f99e5293cadf0f056bef4afbbefd7b0bb3</id>
<content type='text'>
These old functions can be removed now too. Let net_param_nic() print
the full set of network devices directly, and also make it note that a
list more specific to this platform/config will be available by using
'-nic model=help' instead.

Signed-off-by: David Woodhouse &lt;dwmw@amazon.co.uk&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: remove qemu_check_nic_model()</title>
<updated>2024-02-02T16:23:47Z</updated>
<author>
<name>David Woodhouse</name>
<email>dwmw@amazon.co.uk</email>
</author>
<published>2023-10-23T08:37:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=09c292c9e4db45152e3d5fed28c7b8c60bcb3cd9'/>
<id>urn:sha1:09c292c9e4db45152e3d5fed28c7b8c60bcb3cd9</id>
<content type='text'>
There are no callers of this function any more, as they have all been
converted to qemu_{create,configure}_nic_device().

Signed-off-by: David Woodhouse &lt;dwmw@amazon.co.uk&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: add qemu_create_nic_bus_devices()</title>
<updated>2024-02-02T16:23:47Z</updated>
<author>
<name>David Woodhouse</name>
<email>dwmw@amazon.co.uk</email>
</author>
<published>2023-10-22T08:13:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=93125e4b4f4b96c8fdce7ae73d8d702f37d9f3b2'/>
<id>urn:sha1:93125e4b4f4b96c8fdce7ae73d8d702f37d9f3b2</id>
<content type='text'>
This will instantiate any NICs which live on a given bus type. Each bus
is allowed *one* substitution (for PCI it's virtio → virtio-net-pci, for
Xen it's xen → xen-net-device; no point in overengineering it unless we
actually want more).

Signed-off-by: David Woodhouse &lt;dwmw@amazon.co.uk&gt;
Reviewed-by: Paul Durrant &lt;paul@xen.org&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: add qemu_{configure,create}_nic_device(), qemu_find_nic_info()</title>
<updated>2024-02-02T16:23:46Z</updated>
<author>
<name>David Woodhouse</name>
<email>dwmw@amazon.co.uk</email>
</author>
<published>2023-10-19T20:28:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=93e9d7301e19222d817af7ed15a608029bd7b0b5'/>
<id>urn:sha1:93e9d7301e19222d817af7ed15a608029bd7b0b5</id>
<content type='text'>
Most code which directly accesses nd_table[] and nb_nics uses them for
one of two things. Either "I have created a NIC device and I'd like a
configuration for it", or "I will create a NIC device *if* there is a
configuration for it".  With some variants on the theme around whether
they actually *check* if the model specified in the configuration is
the right one.

Provide functions which perform both of those, allowing platforms to
be a little more consistent and as a step towards making nd_table[]
and nb_nics private to the net code.

One might argue that platforms ought to be consistent about whether
they create the unconfigured devices or not, but making significant
user-visible changes is explicitly *not* the intent right now.

The new functions leave the 'model' field of the NICInfo as NULL after
using it for the default NIC model, unlike the qemu_check_nic_model()
function which does set nd-&gt;model to match default_model explicitly.
This is acceptable because there is no code which consumes nd-&gt;model
except this NIC-matching code in net/net.c, and no reasonable excuse
for any code wanting to use nd-&gt;model in future.

Also export the qemu_find_nic_info() helper, as some platforms have
special cases they need to handle.

Signed-off-by: David Woodhouse &lt;dwmw@amazon.co.uk&gt;
Reviewed-by: Paul Durrant &lt;paul@xen.org&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
</feed>
