[openib-general][PATCH][kdapl]: DAT_MEM_TYPE_IA support and dat_ia_open fix
Guy German
guyg at voltaire.com
Thu Aug 4 04:06:29 PDT 2005
1. Adding DAT_MEM_TYPE_IA support
2. When calling dat_ia_open - check port status and fail if port is !active
I am resending this patch, also as an attachment, in case there are still
problems in the mailer (Im using mutt now)
Signed-off-by: Guy German <guyg at voltaire.com>
Index: infiniband/ulp/kdapl/ib/dapl_openib_util.c
===================================================================
--- infiniband/ulp/kdapl/ib/dapl_openib_util.c (revision 2980)
+++ infiniband/ulp/kdapl/ib/dapl_openib_util.c (working copy)
@@ -133,8 +133,43 @@ int dapl_ib_mr_register(struct dapl_ia *
return -ENOSYS;
}
+int dapl_ib_mr_register_ia(struct dapl_ia *ia, struct dapl_lmr *lmr,
+ union dat_region_description phys_addr, u64 length,
+ enum dat_mem_priv_flags privileges)
+{
+ int status;
+ int acl;
+ struct ib_mr *mr;
+ struct ib_phys_buf buf_list;
+ u64 iova = 0;
+ buf_list.addr = phys_addr.for_pa;
+ buf_list.size = length;
+
+ iova = buf_list.addr;
+ acl = dapl_ib_convert_mem_privileges(privileges);
+ acl |= IB_ACCESS_MW_BIND;
+ mr = ib_reg_phys_mr(((struct dapl_pz *)lmr->param.pz)->pd,
+ &buf_list, 1, acl, &iova);
+ if (IS_ERR(mr)) {
+ status = PTR_ERR(mr);
+ dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+ "%s: ib_reg_phys_mr error code return = %d\n",
+ __func__, status);
+ return status;
+ }
+ dapl_dbg_log(DAPL_DBG_TYPE_UTIL, "%s: got handle mr=%p\n",
+ __func__, mr);
+
+ lmr->param.lmr_context = mr->lkey;
+ lmr->param.rmr_context = mr->rkey;
+ lmr->param.registered_size = length;
+ lmr->param.registered_address = phys_addr.for_pa;
+ lmr->mr = mr;
+ return 0;
+}
+
int dapl_ib_mr_register_physical(struct dapl_ia *ia, struct dapl_lmr *lmr,
- void *phys_addr, u64 length,
+ union dat_region_description phys_addr, u64 length,
enum dat_mem_priv_flags privileges)
{
int status;
@@ -145,7 +180,7 @@ int dapl_ib_mr_register_physical(struct
u64 iova = 0;
u64 *array;
- array = (u64 *) phys_addr;
+ array = (u64 *)phys_addr.for_array; /* need to add for_u64_array to union */
buf_list = kmalloc(length * sizeof *buf_list, GFP_ATOMIC);
if (!buf_list)
return -ENOMEM;
@@ -164,8 +199,8 @@ int dapl_ib_mr_register_physical(struct
if (IS_ERR(mr)) {
status = PTR_ERR(mr);
dapl_dbg_log(DAPL_DBG_TYPE_ERR,
- " ib_reg_phys_mr error code return = %d\n",
- status);
+ "%s: ib_reg_phys_mr error code return = %d\n",
+ __func__, status);
return status;
}
#if 0
@@ -173,8 +208,8 @@ int dapl_ib_mr_register_physical(struct
status = ib_query_mr(mr, &attr);
if (status < 0) {
dapl_dbg_log(DAPL_DBG_TYPE_ERR,
- " ib_query_mr error code return from ib_query_mr = %d\n",
- status);
+ "%s: ib_query_mr error code return from ib_query_mr = %d\n",
+ __func__, status);
ib_dereg_mr(mr);
return status;
}
@@ -182,10 +217,12 @@ int dapl_ib_mr_register_physical(struct
lmr->param.lmr_context = mr->lkey;
lmr->param.rmr_context = mr->rkey;
+ lmr->param.registered_size = length * PAGE_SIZE;
+ lmr->param.registered_address = array[0];
lmr->mr = mr;
dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
- "dapl_ib_mr_register_physical(%p %d) got lkey 0x%x \n",
+ "%s: (%p %d) got lkey 0x%x \n", __func__,
buf_list, length, lmr->param.lmr_context);
return 0;
}
Index: infiniband/ulp/kdapl/ib/dapl_openib_util.h
===================================================================
--- infiniband/ulp/kdapl/ib/dapl_openib_util.h (revision 2980)
+++ infiniband/ulp/kdapl/ib/dapl_openib_util.h (working copy)
@@ -79,8 +79,13 @@ int dapl_ib_mr_register(struct dapl_ia *
void *virt_addr, u64 length,
enum dat_mem_priv_flags privileges);
+int dapl_ib_mr_register_ia(struct dapl_ia *ia, struct dapl_lmr *lmr,
+ union dat_region_description phys_addr, u64 length,
+ enum dat_mem_priv_flags privileges);
+
int dapl_ib_mr_register_physical(struct dapl_ia *ia, struct dapl_lmr *lmr,
- void *phys_addr, u64 length,
+ union dat_region_description phys_addr,
+ u64 length,
enum dat_mem_priv_flags privileges);
int dapl_ib_mr_deregister(struct dapl_lmr *lmr);
Index: infiniband/ulp/kdapl/ib/dapl_ia.c
===================================================================
--- infiniband/ulp/kdapl/ib/dapl_ia.c (revision 2980)
+++ infiniband/ulp/kdapl/ib/dapl_ia.c (working copy)
@@ -576,6 +576,7 @@ int dapl_ia_open(const char *name, int a
struct dapl_hca *hca = NULL;
struct dapl_ia *ia = NULL;
struct dapl_evd *evd;
+ struct ib_port_attr port_attr;
dapl_dbg_log(DAPL_DBG_TYPE_API,
"dapl_ia_open(%s, %d, %p, %p)\n",
@@ -583,7 +584,7 @@ int dapl_ia_open(const char *name, int a
status = dapl_provider_list_search(name, &provider);
if (0 != status) {
- status = -EINVAL;
+ status = -ENODEV;
goto bail;
}
@@ -591,6 +592,17 @@ int dapl_ia_open(const char *name, int a
*ia_ptr = NULL;
hca = (struct dapl_hca *)provider->extension;
+ status = ib_query_port(hca->device, hca->port_num, &port_attr);
+ if (status)
+ goto bail;
+ if (port_attr.state != IB_PORT_ACTIVE) {
+ dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+ "%s: Port %d is not in ACTIVE state\n",
+ __FUNCTION__, hca->port_num);
+
+ status = -EBUSY;
+ goto bail;
+ }
/* Allocate and initialize ia structure */
ia = dapl_ia_alloc(provider, hca);
@@ -630,13 +642,13 @@ int dapl_ia_open(const char *name, int a
goto bail;
atomic_inc(&evd->evd_ref_count);
- /* Register the handlers associated with the async EVD. */
- status = dapl_ia_setup_callbacks(ia, evd);
- /* Assign the EVD so it gets cleaned up */
+ /* Register the handlers associated with the async EVD. */
+ status = dapl_ia_setup_callbacks(ia, evd);
+ /* Assign the EVD so it gets cleaned up */
ia->cleanup_async_error_evd = TRUE;
ia->async_error_evd = evd;
- if (status != 0)
- goto bail;
+ if (status != 0)
+ goto bail;
}
status = 0;
@@ -741,7 +753,8 @@ int dapl_ia_query(struct dat_ia *ia_ptr,
provider_attr->provider_version_major = DAPL_PROVIDER_MAJOR;
provider_attr->provider_version_minor = DAPL_PROVIDER_MINOR;
provider_attr->lmr_mem_types_supported =
- DAT_MEM_TYPE_VIRTUAL | DAT_MEM_TYPE_LMR;
+ DAT_MEM_TYPE_PHYSICAL | DAT_MEM_TYPE_PLATFORM |
+ DAT_MEM_TYPE_IA;
provider_attr->iov_ownership_on_return = DAT_IOV_CONSUMER;
provider_attr->dat_qos_supported = DAT_QOS_BEST_EFFORT;
provider_attr->completion_flags_supported =
Index: infiniband/ulp/kdapl/ib/dapl_lmr.c
===================================================================
--- infiniband/ulp/kdapl/ib/dapl_lmr.c (revision 2980)
+++ infiniband/ulp/kdapl/ib/dapl_lmr.c (working copy)
@@ -125,20 +125,21 @@ error1:
}
static inline int dapl_lmr_create_physical(struct dapl_ia *ia,
- DAT_REGION_DESCRIPTION phys_addr,
- u64 page_count, struct dapl_pz *pz,
+ union dat_region_description phys_addr,
+ u64 page_count,
+ enum dat_mem_type mem_type,
+ struct dapl_pz *pz,
enum dat_mem_priv_flags privileges,
struct dat_lmr **lmr,
- DAT_LMR_CONTEXT *lmr_context,
- DAT_RMR_CONTEXT *rmr_context,
+ u32 *lmr_context,
+ u32 *rmr_context,
u64 *registered_length,
u64 *registered_address)
{
struct dapl_lmr *new_lmr;
- u64 *array = phys_addr.for_array;
int status;
- new_lmr = dapl_lmr_alloc(ia, DAT_MEM_TYPE_PHYSICAL, phys_addr,
+ new_lmr = dapl_lmr_alloc(ia, mem_type, phys_addr,
page_count, (struct dat_pz *) pz, privileges);
if (NULL == new_lmr) {
@@ -146,8 +147,14 @@ static inline int dapl_lmr_create_physic
goto error1;
}
- status = dapl_ib_mr_register_physical(ia, new_lmr, phys_addr.for_array,
- page_count, privileges);
+ if (DAT_MEM_TYPE_IA == mem_type) {
+ status = dapl_ib_mr_register_ia(ia, new_lmr, phys_addr,
+ page_count, privileges);
+ }
+ else {
+ status = dapl_ib_mr_register_physical(ia, new_lmr, phys_addr,
+ page_count, privileges);
+ }
if (0 != status)
goto error2;
@@ -157,13 +164,13 @@ static inline int dapl_lmr_create_physic
if (lmr)
*lmr = (struct dat_lmr *)new_lmr;
if (lmr_context)
- *lmr_context = (DAT_LMR_CONTEXT)new_lmr->param.lmr_context;
+ *lmr_context = (u32)new_lmr->param.lmr_context;
if (rmr_context)
- *rmr_context = (DAT_LMR_CONTEXT)new_lmr->param.rmr_context;
+ *rmr_context = (u32)new_lmr->param.rmr_context;
if (registered_address)
- *registered_address = array[0];
+ *registered_address = new_lmr->param.registered_address;
if (registered_length)
- *registered_length = page_count * PAGE_SIZE;
+ *registered_length = new_lmr->param.registered_size;
return 0;
@@ -233,7 +240,7 @@ int dapl_lmr_kcreate(struct dat_ia *ia,
struct dapl_ia *dapl_ia;
struct dapl_pz *dapl_pz;
int status;
-
+
dapl_dbg_log(DAPL_DBG_TYPE_API,
"dapl_lmr_kcreate(ia:%p, mem_type:%x, ...)\n",
ia, mem_type);
@@ -250,10 +257,12 @@ int dapl_lmr_kcreate(struct dat_ia *ia,
rmr_context, registered_length,
registered_address);
break;
+ case DAT_MEM_TYPE_PLATFORM: // used as proprietary Tavor-FMR
case DAT_MEM_TYPE_PHYSICAL:
+ case DAT_MEM_TYPE_IA:
status = dapl_lmr_create_physical(dapl_ia, region_description,
- length, dapl_pz, privileges,
- lmr, lmr_context,
+ length, mem_type, dapl_pz,
+ privileges, lmr, lmr_context,
rmr_context,
registered_length,
registered_address);
@@ -275,8 +284,6 @@ int dapl_lmr_kcreate(struct dat_ia *ia,
registered_address);
break;
}
- case DAT_MEM_TYPE_PLATFORM:
- case DAT_MEM_TYPE_IA:
case DAT_MEM_TYPE_BYPASS:
status = -ENOSYS;
break;
@@ -300,7 +307,8 @@ int dapl_lmr_free(struct dat_lmr *lmr)
switch (dapl_lmr->param.mem_type) {
case DAT_MEM_TYPE_PHYSICAL:
- case DAT_MEM_TYPE_VIRTUAL:
+ case DAT_MEM_TYPE_PLATFORM:
+ case DAT_MEM_TYPE_IA:
case DAT_MEM_TYPE_LMR:
{
struct dapl_pz *pz;
@@ -316,8 +324,7 @@ int dapl_lmr_free(struct dat_lmr *lmr)
}
break;
}
- case DAT_MEM_TYPE_PLATFORM:
- case DAT_MEM_TYPE_IA:
+ case DAT_MEM_TYPE_VIRTUAL:
case DAT_MEM_TYPE_BYPASS:
status = -ENOSYS;
break;
-------------- next part --------------
Index: infiniband/ulp/kdapl/ib/dapl_openib_util.c
===================================================================
--- infiniband/ulp/kdapl/ib/dapl_openib_util.c (revision 2980)
+++ infiniband/ulp/kdapl/ib/dapl_openib_util.c (working copy)
@@ -133,8 +133,43 @@ int dapl_ib_mr_register(struct dapl_ia *
return -ENOSYS;
}
+int dapl_ib_mr_register_ia(struct dapl_ia *ia, struct dapl_lmr *lmr,
+ union dat_region_description phys_addr, u64 length,
+ enum dat_mem_priv_flags privileges)
+{
+ int status;
+ int acl;
+ struct ib_mr *mr;
+ struct ib_phys_buf buf_list;
+ u64 iova = 0;
+ buf_list.addr = phys_addr.for_pa;
+ buf_list.size = length;
+
+ iova = buf_list.addr;
+ acl = dapl_ib_convert_mem_privileges(privileges);
+ acl |= IB_ACCESS_MW_BIND;
+ mr = ib_reg_phys_mr(((struct dapl_pz *)lmr->param.pz)->pd,
+ &buf_list, 1, acl, &iova);
+ if (IS_ERR(mr)) {
+ status = PTR_ERR(mr);
+ dapl_dbg_log(DAPL_DBG_TYPE_ERR,
+ "%s: ib_reg_phys_mr error code return = %d\n",
+ __func__, status);
+ return status;
+ }
+ dapl_dbg_log(DAPL_DBG_TYPE_UTIL, "%s: got handle mr=%p\n",
+ __func__, mr);
+
+ lmr->param.lmr_context = mr->lkey;
+ lmr->param.rmr_context = mr->rkey;
+ lmr->param.registered_size = length;
+ lmr->param.registered_address = phys_addr.for_pa;
+ lmr->mr = mr;
+ return 0;
+}
+
int dapl_ib_mr_register_physical(struct dapl_ia *ia, struct dapl_lmr *lmr,
- void *phys_addr, u64 length,
+ union dat_region_description phys_addr, u64 length,
enum dat_mem_priv_flags privileges)
{
int status;
@@ -145,7 +180,7 @@ int dapl_ib_mr_register_physical(struct
u64 iova = 0;
u64 *array;
- array = (u64 *) phys_addr;
+ array = (u64 *)phys_addr.for_array; /* need to add for_u64_array to union */
buf_list = kmalloc(length * sizeof *buf_list, GFP_ATOMIC);
if (!buf_list)
return -ENOMEM;
@@ -164,8 +199,8 @@ int dapl_ib_mr_register_physical(struct
if (IS_ERR(mr)) {
status = PTR_ERR(mr);
dapl_dbg_log(DAPL_DBG_TYPE_ERR,
- " ib_reg_phys_mr error code return = %d\n",
- status);
+ "%s: ib_reg_phys_mr error code return = %d\n",
+ __func__, status);
return status;
}
#if 0
@@ -173,8 +208,8 @@ int dapl_ib_mr_register_physical(struct
status = ib_query_mr(mr, &attr);
if (status < 0) {
dapl_dbg_log(DAPL_DBG_TYPE_ERR,
- " ib_query_mr error code return from ib_query_mr = %d\n",
- status);
+ "%s: ib_query_mr error code return from ib_query_mr = %d\n",
+ __func__, status);
ib_dereg_mr(mr);
return status;
}
@@ -182,10 +217,12 @@ int dapl_ib_mr_register_physical(struct
lmr->param.lmr_context = mr->lkey;
lmr->param.rmr_context = mr->rkey;
+ lmr->param.registered_size = length * PAGE_SIZE;
+ lmr->param.registered_address = array[0];
lmr->mr = mr;
dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
- "dapl_ib_mr_register_physical(%p %d) got lkey 0x%x \n",
+ "%s: (%p %d) got lkey 0x%x \n", __func__,
buf_list, length, lmr->param.lmr_context);
return 0;
}
Index: infiniband/ulp/kdapl/ib/dapl_openib_util.h
===================================================================
--- infiniband/ulp/kdapl/ib/dapl_openib_util.h (revision 2980)
+++ infiniband/ulp/kdapl/ib/dapl_openib_util.h (working copy)
@@ -79,8 +79,13 @@ int dapl_ib_mr_register(struct dapl_ia *
void *virt_addr, u64 length,
enum dat_mem_priv_flags privileges);
+int dapl_ib_mr_register_ia(struct dapl_ia *ia, struct dapl_lmr *lmr,
+ union dat_region_description phys_addr, u64 length,
+ enum dat_mem_priv_flags privileges);
+
int dapl_ib_mr_register_physical(struct dapl_ia *ia, struct dapl_lmr *lmr,
- void *phys_addr, u64 length,
+ union dat_region_description phys_addr,
+ u64 length,
enum dat_mem_priv_flags privileges);
int dapl_ib_mr_deregister(struct dapl_lmr *lmr);
Index: infiniband/ulp/kdapl/ib/dapl_ia.c
===================================================================
--- infiniband/ulp/kdapl/ib/dapl_ia.c (revision 2980)
+++ infiniband/ulp/kdapl/ib/dapl_ia.c (working copy)
@@ -576,6 +576,7 @@ int dapl_ia_open(const char *name, int a
struct dapl_hca *hca = NULL;
struct dapl_ia *ia = NULL;
struct dapl_evd *evd;
+ struct ib_port_attr port_attr;
dapl_dbg_log(DAPL_DBG_TYPE_API,
"dapl_ia_open(%s, %d, %p, %p)\n",
@@ -583,7 +584,7 @@ int dapl_ia_open(const char *name, int a
status = dapl_provider_list_search(name, &provider);
if (0 != status) {
- status = -EINVAL;
+ status = -ENODEV;
goto bail;
}
@@ -591,6 +592,17 @@ int dapl_ia_open(const char *name, int a
*ia_ptr = NULL;
hca = (struct dapl_hca *)provider->extension;
+ status = ib_query_port(hca->device, hca->port_num, &port_attr);
+ if (status)
+ goto bail;
+ if (port_attr.state != IB_PORT_ACTIVE) {
+ dapl_dbg_log(DAPL_DBG_TYPE_WARN,
+ "%s: Port %d is not in ACTIVE state\n",
+ __FUNCTION__, hca->port_num);
+
+ status = -EBUSY;
+ goto bail;
+ }
/* Allocate and initialize ia structure */
ia = dapl_ia_alloc(provider, hca);
@@ -630,13 +642,13 @@ int dapl_ia_open(const char *name, int a
goto bail;
atomic_inc(&evd->evd_ref_count);
- /* Register the handlers associated with the async EVD. */
- status = dapl_ia_setup_callbacks(ia, evd);
- /* Assign the EVD so it gets cleaned up */
+ /* Register the handlers associated with the async EVD. */
+ status = dapl_ia_setup_callbacks(ia, evd);
+ /* Assign the EVD so it gets cleaned up */
ia->cleanup_async_error_evd = TRUE;
ia->async_error_evd = evd;
- if (status != 0)
- goto bail;
+ if (status != 0)
+ goto bail;
}
status = 0;
@@ -741,7 +753,8 @@ int dapl_ia_query(struct dat_ia *ia_ptr,
provider_attr->provider_version_major = DAPL_PROVIDER_MAJOR;
provider_attr->provider_version_minor = DAPL_PROVIDER_MINOR;
provider_attr->lmr_mem_types_supported =
- DAT_MEM_TYPE_VIRTUAL | DAT_MEM_TYPE_LMR;
+ DAT_MEM_TYPE_PHYSICAL | DAT_MEM_TYPE_PLATFORM |
+ DAT_MEM_TYPE_IA;
provider_attr->iov_ownership_on_return = DAT_IOV_CONSUMER;
provider_attr->dat_qos_supported = DAT_QOS_BEST_EFFORT;
provider_attr->completion_flags_supported =
Index: infiniband/ulp/kdapl/ib/dapl_lmr.c
===================================================================
--- infiniband/ulp/kdapl/ib/dapl_lmr.c (revision 2980)
+++ infiniband/ulp/kdapl/ib/dapl_lmr.c (working copy)
@@ -125,20 +125,21 @@ error1:
}
static inline int dapl_lmr_create_physical(struct dapl_ia *ia,
- DAT_REGION_DESCRIPTION phys_addr,
- u64 page_count, struct dapl_pz *pz,
+ union dat_region_description phys_addr,
+ u64 page_count,
+ enum dat_mem_type mem_type,
+ struct dapl_pz *pz,
enum dat_mem_priv_flags privileges,
struct dat_lmr **lmr,
- DAT_LMR_CONTEXT *lmr_context,
- DAT_RMR_CONTEXT *rmr_context,
+ u32 *lmr_context,
+ u32 *rmr_context,
u64 *registered_length,
u64 *registered_address)
{
struct dapl_lmr *new_lmr;
- u64 *array = phys_addr.for_array;
int status;
- new_lmr = dapl_lmr_alloc(ia, DAT_MEM_TYPE_PHYSICAL, phys_addr,
+ new_lmr = dapl_lmr_alloc(ia, mem_type, phys_addr,
page_count, (struct dat_pz *) pz, privileges);
if (NULL == new_lmr) {
@@ -146,8 +147,14 @@ static inline int dapl_lmr_create_physic
goto error1;
}
- status = dapl_ib_mr_register_physical(ia, new_lmr, phys_addr.for_array,
- page_count, privileges);
+ if (DAT_MEM_TYPE_IA == mem_type) {
+ status = dapl_ib_mr_register_ia(ia, new_lmr, phys_addr,
+ page_count, privileges);
+ }
+ else {
+ status = dapl_ib_mr_register_physical(ia, new_lmr, phys_addr,
+ page_count, privileges);
+ }
if (0 != status)
goto error2;
@@ -157,13 +164,13 @@ static inline int dapl_lmr_create_physic
if (lmr)
*lmr = (struct dat_lmr *)new_lmr;
if (lmr_context)
- *lmr_context = (DAT_LMR_CONTEXT)new_lmr->param.lmr_context;
+ *lmr_context = (u32)new_lmr->param.lmr_context;
if (rmr_context)
- *rmr_context = (DAT_LMR_CONTEXT)new_lmr->param.rmr_context;
+ *rmr_context = (u32)new_lmr->param.rmr_context;
if (registered_address)
- *registered_address = array[0];
+ *registered_address = new_lmr->param.registered_address;
if (registered_length)
- *registered_length = page_count * PAGE_SIZE;
+ *registered_length = new_lmr->param.registered_size;
return 0;
@@ -233,7 +240,7 @@ int dapl_lmr_kcreate(struct dat_ia *ia,
struct dapl_ia *dapl_ia;
struct dapl_pz *dapl_pz;
int status;
-
+
dapl_dbg_log(DAPL_DBG_TYPE_API,
"dapl_lmr_kcreate(ia:%p, mem_type:%x, ...)\n",
ia, mem_type);
@@ -250,10 +257,12 @@ int dapl_lmr_kcreate(struct dat_ia *ia,
rmr_context, registered_length,
registered_address);
break;
+ case DAT_MEM_TYPE_PLATFORM: // used as proprietary Tavor-FMR
case DAT_MEM_TYPE_PHYSICAL:
+ case DAT_MEM_TYPE_IA:
status = dapl_lmr_create_physical(dapl_ia, region_description,
- length, dapl_pz, privileges,
- lmr, lmr_context,
+ length, mem_type, dapl_pz,
+ privileges, lmr, lmr_context,
rmr_context,
registered_length,
registered_address);
@@ -275,8 +284,6 @@ int dapl_lmr_kcreate(struct dat_ia *ia,
registered_address);
break;
}
- case DAT_MEM_TYPE_PLATFORM:
- case DAT_MEM_TYPE_IA:
case DAT_MEM_TYPE_BYPASS:
status = -ENOSYS;
break;
@@ -300,7 +307,8 @@ int dapl_lmr_free(struct dat_lmr *lmr)
switch (dapl_lmr->param.mem_type) {
case DAT_MEM_TYPE_PHYSICAL:
- case DAT_MEM_TYPE_VIRTUAL:
+ case DAT_MEM_TYPE_PLATFORM:
+ case DAT_MEM_TYPE_IA:
case DAT_MEM_TYPE_LMR:
{
struct dapl_pz *pz;
@@ -316,8 +324,7 @@ int dapl_lmr_free(struct dat_lmr *lmr)
}
break;
}
- case DAT_MEM_TYPE_PLATFORM:
- case DAT_MEM_TYPE_IA:
+ case DAT_MEM_TYPE_VIRTUAL:
case DAT_MEM_TYPE_BYPASS:
status = -ENOSYS;
break;
More information about the general
mailing list