[dpdk-dev] [PATCH v2 1/3] vhost: add unsafe API to drain pkts in async vhost

2021-06-15 Thread Cheng Jiang
Applications need to stop DMA transfers and finish all the in-flight pkts when in VM memory hot-plug case and async vhost is used. This patch is to provide an unsafe API to drain in-flight pkts which are submitted to DMA engine in vhost async data path. Signed-off-by: Cheng Jiang --- lib/vhost/r

Re: [dpdk-dev] [PATCH v2 1/3] vhost: add unsafe API to drain pkts in async vhost

2021-07-05 Thread Pai G, Sunil
Hi Cheng, Comments inline. > +uint16_t rte_vhost_drain_queue_thread_unsafe(int vid, uint16_t > queue_id, > + struct rte_mbuf **pkts, uint16_t count) { > + struct virtio_net *dev = get_device(vid); > + struct vhost_virtqueue *vq; > + uint16_t n_pkts = count; > + > +

Re: [dpdk-dev] [PATCH v2 1/3] vhost: add unsafe API to drain pkts in async vhost

2021-07-06 Thread Maxime Coquelin
On 6/15/21 4:15 PM, Cheng Jiang wrote: > Applications need to stop DMA transfers and finish all the in-flight > pkts when in VM memory hot-plug case and async vhost is used. This > patch is to provide an unsafe API to drain in-flight pkts which are > submitted to DMA engine in vhost async data p

Re: [dpdk-dev] [PATCH v2 1/3] vhost: add unsafe API to drain pkts in async vhost

2021-07-07 Thread Jiang, Cheng1
ev] [PATCH v2 1/3] vhost: add unsafe API to drain pkts in > async vhost > > Hi Cheng, > > Comments inline. > > > > > +uint16_t rte_vhost_drain_queue_thread_unsafe(int vid, uint16_t > > queue_id, > > + struct rte_mbuf **pkts, uint16_t count)

Re: [dpdk-dev] [PATCH v2 1/3] vhost: add unsafe API to drain pkts in async vhost

2021-07-08 Thread Pai G, Sunil
Hi Cheng, Repsonse inline. > As for this one, I'm not sure why we need have the loop in the application. > The function of this API is that caller need to drain all the inflight pkts, > it > should be called only once to get the job done. > Don't you think? Perhaps yes, but my thought was to

Re: [dpdk-dev] [PATCH v2 1/3] vhost: add unsafe API to drain pkts in async vhost

2021-07-08 Thread Hu, Jiayu
Hi Maxime, > -Original Message- > From: Maxime Coquelin > Sent: Tuesday, July 6, 2021 10:09 PM > To: Jiang, Cheng1 ; Xia, Chenbo > > Cc: dev@dpdk.org; Hu, Jiayu ; Yang, YvonneX > > Subject: Re: [PATCH v2 1/3] vhost: add unsafe API to drain pkts in async vhost > > > > On 6/15/21 4:15

Re: [dpdk-dev] [PATCH v2 1/3] vhost: add unsafe API to drain pkts in async vhost

2021-07-11 Thread Jiang, Cheng1
Hi, > -Original Message- > From: Pai G, Sunil > Sent: Thursday, July 8, 2021 3:15 PM > To: Jiang, Cheng1 ; maxime.coque...@redhat.com; > Xia, Chenbo > Cc: dev@dpdk.org; Hu, Jiayu ; Yang, YvonneX > > Subject: RE: [dpdk-dev] [PATCH v2 1/3] vhost: add unsafe API