RE: [PATCH] vhost: add runtime locking check in unsafe APIs

2022-05-10 Thread Hu, Jiayu
> -Original Message- > From: Maxime Coquelin > Sent: Tuesday, May 10, 2022 5:14 PM > To: Hu, Jiayu ; dev@dpdk.org; Xia, Chenbo > ; Ding, Xuan ; Jiang, Cheng1 > ; Pai G, Sunil ; > david.march...@redhat.com > Subject: Re: [PATCH] vhost: add runtime locking chec

Re: [PATCH] vhost: add runtime locking check in unsafe APIs

2022-05-10 Thread Maxime Coquelin
Hi Jiayu, On 5/10/22 11:00, Hu, Jiayu wrote: Hi Maxime, This is a good idea to add the lock check below. But I have two questions: First, rte_vhost_clear_queue_thread_unsafe() is thread unsafe. Why doesn't add the check for it? Yes, I missed it. Thanks for spotting that! Second, dev->notify

Re: [PATCH] vhost: add runtime locking check in unsafe APIs

2022-05-10 Thread Maxime Coquelin
On 5/10/22 11:00, Ding, Xuan wrote: Hi Maxime, -Original Message- From: Maxime Coquelin Sent: Tuesday, May 10, 2022 4:25 PM To: dev@dpdk.org; Xia, Chenbo ; Ding, Xuan ; Hu, Jiayu ; Jiang, Cheng1 ; Pai G, Sunil ; david.march...@redhat.com Cc: Maxime Coquelin Subject: [PATCH] vhost:

RE: [PATCH] vhost: add runtime locking check in unsafe APIs

2022-05-10 Thread Hu, Jiayu
Hi Maxime, This is a good idea to add the lock check below. But I have two questions: First, rte_vhost_clear_queue_thread_unsafe() is thread unsafe. Why doesn't add the check for it? Second, dev->notify_ops->destroy_device() is called without taking the lock. If vhost applications try to clear inf

RE: [PATCH] vhost: add runtime locking check in unsafe APIs

2022-05-10 Thread Ding, Xuan
Hi Maxime, > -Original Message- > From: Maxime Coquelin > Sent: Tuesday, May 10, 2022 4:25 PM > To: dev@dpdk.org; Xia, Chenbo ; Ding, Xuan > ; Hu, Jiayu ; Jiang, Cheng1 > ; Pai G, Sunil ; > david.march...@redhat.com > Cc: Maxime Coquelin > Subject: [PATCH] vhost: add runtime locking chec