RDMA/efa: Use kvzalloc instead of kzalloc with fallback
Use kvzalloc which attempts to allocate a physically continuous buffer and fallbacks to virtually continuous on failure instead of open coding it in the driver. The is_vmalloc_addr function is used to determine whether the buffer is physically continuous or not (which determines direct vs indirect MR registration mode). Suggested-by: NJason Gunthorpe <jgg@ziepe.ca> Reviewed-by: NFiras JahJah <firasj@amazon.com> Reviewed-by: NYossi Leybovich <sleybo@amazon.com> Signed-off-by: NGal Pressman <galpress@amazon.com> Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
Showing
想要评论请 注册 或 登录