[dpdk-dev] [PATCH 0/3] Vhost app removes dependency of REFCNT

Bruce Richardson bruce.richardson at intel.com
Fri Oct 24 12:47:32 CEST 2014


On Fri, Oct 24, 2014 at 11:47:46AM +0200, Thomas Monjalon wrote:
> 2014-10-24 16:10, Ouyang Changchun:
> > To remove the dependency of RTE_MBUF_REFCNT for vhost zero copy,
> > the mbuf need introduce EXTERNAL_MBUF(in ol_flags) to indicate it
> > attaches to an external buffer, say, from guest space. And don't
> > free the external buffer when freeing the mbuf itself in host, in
> > addition, RX function in PMD need make sure not overwrite this flag
> > when filling ol_flags from descriptors to mbuf.
> 
> So you are replacing refcnt by something else which requires special
> handling in drivers.
> I feel this is not the right design.
> Why do you want to remove refcnt dependency?
>
Ignoring the implementation of the patchset for now - as I haven't reviewed 
it in depth yet, I think the removal of the dependency on REFCNT in this 
vhost code is a good thing.  This is the only place in DPDK which depends on 
the REFCNT being *disabled*.  We have lots of things which rely on using 
having a reference count enabled in the mbuf, and lots and lots of #ifdefs 
in the code to work around the possibility of it being disabled. If we can 
remove the need for the reference count to be disabled here we can look to 
do some major cleanup, by removing completely the option to disable the 
reference counting.

Regards,
/Bruce


More information about the dev mailing list