Re: [PATCH net-next] net: octeontx2: Fix the confusion in buffer alloc failure path

2021-02-09 Thread sundeep subbaraya
Tested-by: Subbaraya Sundeep On Mon, Feb 8, 2021 at 7:27 AM Kevin Hao wrote: > > Pavel pointed that the return of dma_addr_t in > otx2_alloc_rbuf/__otx2_alloc_rbuf() seem suspicious because a negative > error code may be returned in some cases. For a dma_addr_t, the error > code such as -ENOMEM

Re: [PATCH net-next] net: octeontx2: Fix the confusion in buffer alloc failure path

2021-02-08 Thread Jakub Kicinski
On Mon, 8 Feb 2021 09:45:45 +0800 Kevin Hao wrote: > @@ -1214,7 +1214,7 @@ int otx2_sq_aura_pool_init(struct otx2_nic *pfvf) > struct otx2_snd_queue *sq; > struct otx2_pool *pool; > int err, ptr; > - s64 bufptr; > + dma_addr_t bufptr; nit: please keep the variable declar

[PATCH net-next] net: octeontx2: Fix the confusion in buffer alloc failure path

2021-02-07 Thread Kevin Hao
Pavel pointed that the return of dma_addr_t in otx2_alloc_rbuf/__otx2_alloc_rbuf() seem suspicious because a negative error code may be returned in some cases. For a dma_addr_t, the error code such as -ENOMEM does seem a valid value, so we can't judge if the buffer allocation fail or not based on t