From patchwork Thu Feb 20 11:14:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 322103 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B72A92C00C8 for ; Thu, 20 Feb 2014 22:14:55 +1100 (EST) Received: from localhost ([::1]:37498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGRaf-0006pi-IN for incoming@patchwork.ozlabs.org; Thu, 20 Feb 2014 06:14:53 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGRaB-0005yY-75 for qemu-devel@nongnu.org; Thu, 20 Feb 2014 06:14:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGRa5-0003SN-93 for qemu-devel@nongnu.org; Thu, 20 Feb 2014 06:14:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:21372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGRa5-0003S9-1I for qemu-devel@nongnu.org; Thu, 20 Feb 2014 06:14:17 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s1KBEFj8010555 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 20 Feb 2014 06:14:15 -0500 Received: from localhost (ovpn-112-44.ams2.redhat.com [10.36.112.44]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s1KBEEPJ016448; Thu, 20 Feb 2014 06:14:15 -0500 From: Stefan Hajnoczi To: Date: Thu, 20 Feb 2014 12:14:08 +0100 Message-Id: <1392894849-7907-3-git-send-email-stefanha@redhat.com> In-Reply-To: <1392894849-7907-1-git-send-email-stefanha@redhat.com> References: <1392894849-7907-1-git-send-email-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Vincenzo Maffione Subject: [Qemu-devel] [PATCH 2/3] vhost_net: use offload API instead of bypassing it X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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) {