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

Ouyang, Changchun changchun.ouyang at intel.com
Sat Oct 25 03:01:35 CEST 2014


Hi Thomas

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Friday, October 24, 2014 5:48 PM
> To: Ouyang, Changchun
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 0/3] Vhost app removes dependency of
> REFCNT
> 
> 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.

To some extent, You are right, but I'd like regard as: our current mbuf implement has no consideration of external buffer. 
While vhost zero copy need it work well when it is external buffer, so need this special handling.
 Very appreciate if you have a better solution, design idea and let me know.  

> I feel this is not the right design.
> Why do you want to remove refcnt dependency?
> 
Bruce has some explanation about the reason in another mail.
For vhost zero copy itself, it doesn't depend on most of code REFCNT, it just need mbuf can support external buffer.
Before the change, undefine the REFCNT, make mbuf has workaround for supporting external buffer.

Thanks and regards,
Changchun



More information about the dev mailing list