From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <yuanhan.liu@linux.intel.com>
Received: from mga05.intel.com (mga05.intel.com [192.55.52.43])
 by dpdk.org (Postfix) with ESMTP id 3E427695D
 for <dev@dpdk.org>; Thu, 23 Mar 2017 08:13:25 +0100 (CET)
Received: from fmsmga003.fm.intel.com ([10.253.24.29])
 by fmsmga105.fm.intel.com with ESMTP; 23 Mar 2017 00:13:25 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.36,208,1486454400"; d="scan'208";a="837675437"
Received: from yliu-dev.sh.intel.com ([10.239.67.162])
 by FMSMGA003.fm.intel.com with ESMTP; 23 Mar 2017 00:13:23 -0700
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: dev@dpdk.org
Cc: Maxime Coquelin <maxime.coquelin@redhat.com>,
 Harris James R <james.r.harris@intel.com>,
 Liu Changpeng <changpeng.liu@intel.com>,
 Yuanhan Liu <yuanhan.liu@linux.intel.com>
Date: Thu, 23 Mar 2017 15:10:57 +0800
Message-Id: <1490253059-28112-21-git-send-email-yuanhan.liu@linux.intel.com>
X-Mailer: git-send-email 1.9.0
In-Reply-To: <1490253059-28112-1-git-send-email-yuanhan.liu@linux.intel.com>
References: <1488534682-3494-1-git-send-email-yuanhan.liu@linux.intel.com>
 <1490253059-28112-1-git-send-email-yuanhan.liu@linux.intel.com>
Subject: [dpdk-dev] [PATCH v2 20/22] vhost: workaround the build dependency
	on mbuf header
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Mar 2017 07:13:25 -0000

rte_mbuf struct is something more likely will be used only in vhost-user
net driver, while we have made vhost-user generic enough that it can
be used for implementing other drivers (such as vhost-user SCSI), they
have also include <rte_mbuf.h>. Otherwise, the build will be broken.

We could workaround it by using forward declaration, so that other
non-net drivers won't need include <rte_mbuf.h>.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 lib/librte_vhost/rte_vhost.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
index d4ee210..bc1a958 100644
--- a/lib/librte_vhost/rte_vhost.h
+++ b/lib/librte_vhost/rte_vhost.h
@@ -348,6 +348,8 @@ int rte_vhost_driver_callback_register(const char *path,
  */
 uint16_t rte_vhost_avail_entries(int vid, uint16_t queue_id);
 
+struct rte_mbuf;
+struct rte_mempool;
 /**
  * This function adds buffers to the virtio devices RX virtqueue. Buffers can
  * be received from the physical port or from another virtual device. A packet
-- 
1.9.0