Re: [PATCH] vdpa/mlx5: Fix memory key MTT population

2021-01-06 Thread Eli Cohen
On Thu, Jan 07, 2021 at 12:15:53PM +0800, Jason Wang wrote: > > On 2021/1/6 下午5:05, Eli Cohen wrote: > > map_direct_mr() assumed that the number of scatter/gather entries > > returned by dma_map_sg_attrs() was equal to the number of segments in > > the sgl list. This led to wrong population of

Re: [PATCH] vdpa/mlx5: Fix memory key MTT population

2021-01-06 Thread Jason Wang
On 2021/1/6 下午5:05, Eli Cohen wrote: map_direct_mr() assumed that the number of scatter/gather entries returned by dma_map_sg_attrs() was equal to the number of segments in the sgl list. This led to wrong population of the mkey object. Fix this by properly referring to the returned value. In

[PATCH] vdpa/mlx5: Fix memory key MTT population

2021-01-06 Thread Eli Cohen
map_direct_mr() assumed that the number of scatter/gather entries returned by dma_map_sg_attrs() was equal to the number of segments in the sgl list. This led to wrong population of the mkey object. Fix this by properly referring to the returned value. In addition, get rid of fill_sg() whjich