[dpdk-dev] [PATCH v1 2/4] vhost: dynamically alloc async memory

Fu, Patrick patrick.fu at intel.com
Tue Sep 29 07:55:15 CEST 2020



> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin at redhat.com>
> Sent: Wednesday, September 23, 2020 5:15 PM
> To: Fu, Patrick <patrick.fu at intel.com>; dev at dpdk.org; Xia, Chenbo
> <chenbo.xia at intel.com>
> Cc: Wang, Zhihong <zhihong.wang at intel.com>; Jiang, Cheng1
> <cheng1.jiang at intel.com>
> Subject: Re: [PATCH v1 2/4] vhost: dynamically alloc async memory
> 
> s/alloc/allocate/
> 
Fix in v2

> On 9/11/20 3:53 AM, Patrick Fu wrote:
> > alloc async internal memory buffer by rte_malloc(), replacing array
> 
> Allocate async internal memory buffer with rte_malloc()
> 
Fix in v2

> > index 28aa77380..0af0ac23d 100644
> > --- a/lib/librte_vhost/vhost.h
> > +++ b/lib/librte_vhost/vhost.h
> > @@ -218,8 +218,8 @@ struct vhost_virtqueue {
> >  	/* operation callbacks for async dma */
> >  	struct rte_vhost_async_channel_ops	async_ops;
> >
> > -	struct rte_vhost_iov_iter it_pool[VHOST_MAX_ASYNC_IT];
> > -	struct iovec vec_pool[VHOST_MAX_ASYNC_VEC];
> > +	struct rte_vhost_iov_iter *it_pool;
> > +	struct iovec *vec_pool;
> >
> >  	/* async data transfer status */
> >  	uintptr_t	**async_pkts_pending;
> >
> 
> I think you should also take care of reallocating on the same numa node
> the ring is (seel numa_realloc().
Agree, will add numa based allocation in v2

Thanks,

Patrick


More information about the dev mailing list