Re: [dpdk-dev] [PATCH v2] vhost: fix index overflow for packed ring in async vhost

2021-07-19 Thread Xia, Chenbo
> -Original Message- > From: Jiang, Cheng1 > Sent: Thursday, July 15, 2021 5:51 PM > To: maxime.coque...@redhat.com; Xia, Chenbo > Cc: dev@dpdk.org; Hu, Jiayu ; Yang, YvonneX > ; Jiang, Cheng1 ; > sta...@dpdk.org > Subject: [PATCH v2] vhost: fix index overflow for packed ring in async vho

Re: [dpdk-dev] [PATCH v2] vhost: fix index overflow for packed ring in async vhost

2021-07-15 Thread Xia, Chenbo
> -Original Message- > From: Jiang, Cheng1 > Sent: Thursday, July 15, 2021 5:51 PM > To: maxime.coque...@redhat.com; Xia, Chenbo > Cc: dev@dpdk.org; Hu, Jiayu ; Yang, YvonneX > ; Jiang, Cheng1 ; > sta...@dpdk.org > Subject: [PATCH v2] vhost: fix index overflow for packed ring in async vho

[dpdk-dev] [PATCH v2] vhost: fix index overflow for packed ring in async vhost

2021-07-15 Thread Cheng Jiang
We introduced some new indexes in packed ring of async vhost. They will eventually overflow and lead to errors if the ring size is not a power of 2. This patch is to check and keep these indexes within a reasonable range. Fixes: 873e8dad6f49 ("vhost: support packed ring in async datapath") Cc: sta