From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Anthony Liguori <aliguori@amazon.com>
Subject: [Qemu-devel] [PULL 10/11] vhost_net: use offload API instead of bypassing it
Date: Tue, 25 Feb 2014 14:33:48 +0100 [thread overview]
Message-ID: <1393335229-607-11-git-send-email-stefanha@redhat.com> (raw)
In-Reply-To: <1393335229-607-1-git-send-email-stefanha@redhat.com>
There is no need to access backend->info->has_vnet_hdr() and friends
anymore. Use the qemu_has_vnet_hdr() API instead.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
hw/net/vhost_net.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index c90b9ec..a1de2f4 100644
--- a/hw/net/vhost_net.c
+++ b/hw/net/vhost_net.c
@@ -106,7 +106,7 @@ struct vhost_net *vhost_net_init(NetClientState *backend, int devfd,
goto fail;
}
net->nc = backend;
- net->dev.backend_features = backend->info->has_vnet_hdr(backend) ? 0 :
+ net->dev.backend_features = qemu_has_vnet_hdr(backend) ? 0 :
(1 << VHOST_NET_F_VIRTIO_NET_HDR);
net->backend = r;
@@ -117,8 +117,8 @@ struct vhost_net *vhost_net_init(NetClientState *backend, int devfd,
if (r < 0) {
goto fail;
}
- if (!backend->info->has_vnet_hdr_len(backend,
- sizeof(struct virtio_net_hdr_mrg_rxbuf))) {
+ if (!qemu_has_vnet_hdr_len(backend,
+ sizeof(struct virtio_net_hdr_mrg_rxbuf))) {
net->dev.features &= ~(1 << VIRTIO_NET_F_MRG_RXBUF);
}
if (~net->dev.features & net->dev.backend_features) {
--
1.8.5.3
next prev parent reply other threads:[~2014-02-25 13:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-25 13:33 [Qemu-devel] [PULL 00/11] Net patches Stefan Hajnoczi
2014-02-25 13:33 ` [Qemu-devel] [PULL 01/11] opencores_eth: flush queue whenever can_receive can go from false to true Stefan Hajnoczi
2014-02-25 13:33 ` [Qemu-devel] [PULL 02/11] net: change vnet-hdr TAP prototypes Stefan Hajnoczi
2014-02-25 13:33 ` [Qemu-devel] [PULL 03/11] net: extend NetClientInfo for offloading Stefan Hajnoczi
2014-02-25 13:33 ` [Qemu-devel] [PULL 04/11] net: TAP uses NetClientInfo offloading callbacks Stefan Hajnoczi
2014-02-25 13:33 ` [Qemu-devel] [PULL 05/11] net: virtio-net and vmxnet3 use offloading API Stefan Hajnoczi
2014-02-25 13:33 ` [Qemu-devel] [PULL 06/11] net: make tap offloading callbacks static Stefan Hajnoczi
2014-02-25 13:33 ` [Qemu-devel] [PULL 07/11] net: add offloading support to netmap backend Stefan Hajnoczi
2014-02-25 13:33 ` [Qemu-devel] [PULL 08/11] net: Disable netmap backend when not supported Stefan Hajnoczi
2014-02-25 13:33 ` [Qemu-devel] [PULL 09/11] net: remove implicit peer from offload API Stefan Hajnoczi
2014-02-25 13:33 ` Stefan Hajnoczi [this message]
2014-02-25 13:33 ` [Qemu-devel] [PULL 11/11] virtio-net: use qemu_get_queue() where possible Stefan Hajnoczi
2014-02-26 20:52 ` [Qemu-devel] [PULL 00/11] Net patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1393335229-607-11-git-send-email-stefanha@redhat.com \
--to=stefanha@redhat.com \
--cc=aliguori@amazon.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).