From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 751072C16 for ; Fri, 22 Apr 2016 12:17:37 +0200 (CEST) Received: by mail-wm0-f42.google.com with SMTP id u206so19337946wme.1 for ; Fri, 22 Apr 2016 03:17:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=4uqtLnuwY9eGTLbf3+cxTOP/QVoWUk6uL6HHJ919/As=; b=gSCdzCG/m3tzgudt3foA5oE7FMLaQ6BkopQ1Tt3pxKVrfEGZArXmN2E94b39zM+Y7T JIOWLUrvcSUlQ3t1Zua4S/d+Em2UuzLPr95QSwS3p39al7pi3nWkqDFxGPtsVgbK1dZo wWhRAWcCiAaFCx5IsBwUhXe9plTQNPRA9DYXKK67W2bKMlcNfEPX3ucfWPe+wwWidZiY tlaaXoEU3wvIaLFbhW/CEu8gfzPuzSa2aYuNpK2NXCY2thFNIvpNQsOCBwctU+l5aEB4 bE75BMrRHGguWyHm0UBezQKwUORvBt1qgNy2w+M4F0jJPtf5ne7GFpwY4I04Inj2lfcc 7Kfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding; bh=4uqtLnuwY9eGTLbf3+cxTOP/QVoWUk6uL6HHJ919/As=; b=Smi5d2WP/+JPgPCN79W2x71WWlSASTSup7bq9Lv1VgD+/OG0VXBFvHIeMwuR+fWA8S xtV2Ux4ZFg8FewQWiFeKeoYsH/+DLfnxoU/ThCEslduzdxEa6PAwDHqcfonmDN0IEt09 FQK+4bgQUauY5zPAuykKDD+arvKnqtxN083RYq6a7s0eaNBA/91t4U6tipRLnFwKOe9Y s3WVt1jtEY2CYJECaSJke0ng8FJB21Wz22Dw0jJjdNwfqnj4rQhWmbzywTwB/DlAB4OG Qi+EJKmlw5QgvlgF1yJd5IprP5y+vfNbvAuvj4t/6q8GGFgvkkxMUUXdC0epgBL9WcZD TgMg== X-Gm-Message-State: AOPr4FW/ldmwNZMD1XWnPryhJw3tN0FYjHQms0ikCXvimUGRKEG4s7AP8IZ0pQh+yBl0N/r4 X-Received: by 10.194.89.38 with SMTP id bl6mr18760739wjb.44.1461320257297; Fri, 22 Apr 2016 03:17:37 -0700 (PDT) Received: from xps13.localnet (APoitiers-658-1-53-118.w86-217.abo.wanadoo.fr. [86.217.192.118]) by smtp.gmail.com with ESMTPSA id z9sm2609925wmh.3.2016.04.22.03.17.36 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 22 Apr 2016 03:17:36 -0700 (PDT) From: Thomas Monjalon To: "Tan, Jianfeng" Cc: Yuanhan Liu , dev@dpdk.org, Huawei Xie , rich.lane@bigswitch.com, mst@redhat.com, nakajima.yoshihiro@lab.ntt.co.jp, p.fedin@samsung.com, michael.qiu@intel.com, ann.zhuangyanying@huawei.com, mukawa@igel.co.jp, nhorman@tuxdriver.com Date: Fri, 22 Apr 2016 12:17:14 +0200 Message-ID: <5090635.8Uvaj0oolv@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <5719F905.1060704@intel.com> References: <1446748276-132087-1-git-send-email-jianfeng.tan@intel.com> <20160421220121.GA7603@yliu-dev.sh.intel.com> <5719F905.1060704@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3 1/2] virtio/vdev: add embeded device emulation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2016 10:17:37 -0000 2016-04-22 18:12, Tan, Jianfeng: > On 4/22/2016 6:01 AM, Yuanhan Liu wrote: > > Further more, I'd suggest to divide the code into following files: > > > > - virtio-user/virtio.c > > > > All virtio device emulation goes here. > > > > - virtio-user/vhost-user.c > > > > The vhost-user frontend implementation > > > > - virtio-user/vhost-kernel.c > > > > vhost kernel hanldings, including setting the tap device. > > > > - And, __maybe__ another standalone file for handling the talk > > between the driver and the device. (See more for the comments > > about virtio_pci_ops below). > > > > > > That would make it much clearer, IMO. > > Got your point here, but to be honest, I'm a little concerned to split a > 1k-lined file into 5+ files. Previously I'd like to make them converged > together. But your suggestion is great for clean code. If any other > could give some comments? I wanted to do the same comment: separating code for guest driver, guest device and host driver will make things easier to understand.