From patchwork Fri May 3 05:34:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Asias He X-Patchwork-Id: 2515121 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 9C20D40207 for ; Fri, 3 May 2013 05:34:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761979Ab3ECFeu (ORCPT ); Fri, 3 May 2013 01:34:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33996 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761870Ab3ECFes (ORCPT ); Fri, 3 May 2013 01:34:48 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r435Ykp8017225 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 3 May 2013 01:34:46 -0400 Received: from hj.localdomain.com ([10.66.4.126]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r435YZc4014341; Fri, 3 May 2013 01:34:43 -0400 From: Asias He To: "Michael S. Tsirkin" Cc: Nicholas Bellinger , Rusty Russell , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, target-devel@vger.kernel.org, Asias He Subject: [PATCH 2/3] vhost: Move VHOST_NET_FEATURES to net.c Date: Fri, 3 May 2013 13:34:28 +0800 Message-Id: <1367559269-8325-3-git-send-email-asias@redhat.com> In-Reply-To: <1367559269-8325-1-git-send-email-asias@redhat.com> References: <1367559269-8325-1-git-send-email-asias@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org vhost.h should not depend on device specific marcos like VHOST_NET_F_VIRTIO_NET_HDR and VIRTIO_NET_F_MRG_RXBUF. Signed-off-by: Asias He --- drivers/vhost/net.c | 6 ++++++ drivers/vhost/vhost.h | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index a3645bd..b2f6b41 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -59,6 +59,12 @@ MODULE_PARM_DESC(experimental_zcopytx, "Enable Zero Copy TX;" #define VHOST_DMA_IS_DONE(len) ((len) >= VHOST_DMA_DONE_LEN) enum { + VHOST_NET_FEATURES = VHOST_FEATURES | + (1ULL << VHOST_NET_F_VIRTIO_NET_HDR) | + (1ULL << VIRTIO_NET_F_MRG_RXBUF), +}; + +enum { VHOST_NET_VQ_RX = 0, VHOST_NET_VQ_TX = 1, VHOST_NET_VQ_MAX = 2, diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 4330209..cc9ebf0 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -177,9 +177,6 @@ enum { (1ULL << VIRTIO_RING_F_INDIRECT_DESC) | (1ULL << VIRTIO_RING_F_EVENT_IDX) | (1ULL << VHOST_F_LOG_ALL), - VHOST_NET_FEATURES = VHOST_FEATURES | - (1ULL << VHOST_NET_F_VIRTIO_NET_HDR) | - (1ULL << VIRTIO_NET_F_MRG_RXBUF), }; static inline int vhost_has_feature(struct vhost_dev *dev, int bit)