[dpdk-dev] [PATCH v2] kni: fix wrong mbuf alloc count in kni_allocate_mbufs

2021-06-22 Thread wangyunjian
From: Yunjian Wang In kni_allocate_mbufs(), we alloc mbuf for alloc_q as this code. allocq_free = (kni->alloc_q->read - kni->alloc_q->write - 1) \ & (MAX_MBUF_BURST_NUM - 1); The value of allocq_free maybe zero, for example : The ring size is 1024. After init, write = read = 0. Th

Re: [dpdk-dev] [PATCH v2] kni: fix wrong mbuf alloc count in kni_allocate_mbufs

2021-06-22 Thread Ferruh Yigit
On 6/22/2021 11:57 AM, wangyunjian wrote: > From: Yunjian Wang > > In kni_allocate_mbufs(), we alloc mbuf for alloc_q as this code. > allocq_free = (kni->alloc_q->read - kni->alloc_q->write - 1) \ > & (MAX_MBUF_BURST_NUM - 1); > The value of allocq_free maybe zero, for example : > T

Re: [dpdk-dev] [PATCH v2] kni: fix wrong mbuf alloc count in kni_allocate_mbufs

2021-06-22 Thread wangyunjian
> -Original Message- > From: Ferruh Yigit [mailto:ferruh.yi...@intel.com] > Sent: Tuesday, June 22, 2021 8:28 PM > To: wangyunjian ; dev@dpdk.org > Cc: tho...@monjalon.net; gowrishanka...@linux.vnet.ibm.com; > dingxiaoxiong ; sta...@dpdk.org; liucheng (J) > > Subject: Re: [PATCH v2] kni: f