Re: [PATCH] dma/idxd: fix burst capacity calculation

2022-01-10 Thread Bruce Richardson
On Mon, Jan 10, 2022 at 01:44:06PM +, Pai G, Sunil wrote: > Hi Bruce, > > > what values for the write_idx and ids_returned vars give this error, and how > > does masking help? I'd expect masking to increase the number of times the > > function returns zero, rather than decreasing it. > > > H

RE: [PATCH] dma/idxd: fix burst capacity calculation

2022-01-10 Thread Pai G, Sunil
Hi Bruce, > what values for the write_idx and ids_returned vars give this error, and how > does masking help? I'd expect masking to increase the number of times the > function returns zero, rather than decreasing it. Here are the values from the idxd dump: dev_capa: 0x50051 - mem2mem sva han

Re: [PATCH] dma/idxd: fix burst capacity calculation

2022-01-10 Thread Bruce Richardson
On Mon, Jan 10, 2022 at 01:09:02PM +, Pai G, Sunil wrote: > Hi Bruce, Kevin > > This patch seems to have uncovered a bug in the driver. > On applying, the idxd_burst_capacity API seems to return 0 for cases even > when there are batch descriptors and ring space available. > Seems like there i

RE: [PATCH] dma/idxd: fix burst capacity calculation

2022-01-10 Thread Pai G, Sunil
Hi Bruce, Kevin This patch seems to have uncovered a bug in the driver. On applying, the idxd_burst_capacity API seems to return 0 for cases even when there are batch descriptors and ring space available. Seems like there is a wraparound missing when calculating the descriptor ring space, causin

RE: [PATCH] dma/idxd: fix burst capacity calculation

2022-01-04 Thread Hu, Jiayu
Tested-by: Jiayu Hu > -Original Message- > From: Kevin Laatz > Sent: Wednesday, January 5, 2022 1:17 AM > To: Richardson, Bruce ; dev@dpdk.org > Cc: sta...@dpdk.org > Subject: Re: [PATCH] dma/idxd: fix burst capacity calculation > > > On 20/12/2021 17

Re: [PATCH] dma/idxd: fix burst capacity calculation

2022-01-04 Thread Kevin Laatz
On 20/12/2021 17:05, Bruce Richardson wrote: When the maximum burst size supported by HW is less than the available ring space, incorrect capacity was returned when there was already some jobs queued up for submission. This was because the capacity calculation failed to subtract the number of a