[dpdk-dev] [PATCH v3 1/2] virtio/vdev: add embeded device emulation

Thomas Monjalon thomas.monjalon at 6wind.com
Fri Apr 22 12:17:14 CEST 2016


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.


More information about the dev mailing list