qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Vincenzo Maffione <v.maffione@gmail.com>
Subject: [Qemu-devel] [PATCH 2/3] vhost_net: use offload API instead of bypassing it
Date: Thu, 20 Feb 2014 12:14:08 +0100	[thread overview]
Message-ID: <1392894849-7907-3-git-send-email-stefanha@redhat.com> (raw)
In-Reply-To: <1392894849-7907-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

  parent reply	other threads:[~2014-02-20 11:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-20 11:14 [Qemu-devel] [PATCH 0/3] net: drop implicit peer from offload API Stefan Hajnoczi
2014-02-20 11:14 ` [Qemu-devel] [PATCH 1/3] net: remove " Stefan Hajnoczi
2014-02-20 11:14 ` Stefan Hajnoczi [this message]
2014-02-20 11:14 ` [Qemu-devel] [PATCH 3/3] virtio-net: use qemu_get_queue() where possible Stefan Hajnoczi
2014-02-20 11:58 ` [Qemu-devel] [PATCH 0/3] net: drop implicit peer from offload API Vincenzo Maffione

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=1392894849-7907-3-git-send-email-stefanha@redhat.com \
    --to=stefanha@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=v.maffione@gmail.com \
    /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).