xprtrdma: Clean up device capability detection
Clean up: Move device capability detection into memreg-specific source files. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Этот коммит содержится в:

коммит произвёл
Anna Schumaker

родитель
a473018cfe
Коммит
b54054ca55
@@ -73,6 +73,23 @@
|
||||
# define RPCDBG_FACILITY RPCDBG_TRANS
|
||||
#endif
|
||||
|
||||
bool
|
||||
frwr_is_supported(struct rpcrdma_ia *ia)
|
||||
{
|
||||
struct ib_device_attr *attrs = &ia->ri_device->attrs;
|
||||
|
||||
if (!(attrs->device_cap_flags & IB_DEVICE_MEM_MGT_EXTENSIONS))
|
||||
goto out_not_supported;
|
||||
if (attrs->max_fast_reg_page_list_len == 0)
|
||||
goto out_not_supported;
|
||||
return true;
|
||||
|
||||
out_not_supported:
|
||||
pr_info("rpcrdma: 'frwr' mode is not supported by device %s\n",
|
||||
ia->ri_device->name);
|
||||
return false;
|
||||
}
|
||||
|
||||
static int
|
||||
__frwr_init(struct rpcrdma_mw *r, struct ib_pd *pd, unsigned int depth)
|
||||
{
|
||||
|
Ссылка в новой задаче
Block a user