[ofw] [Patch 6/62] Reference implementation of NDv2
Fab Tillier
ftillier at microsoft.com
Wed Feb 20 15:46:49 PST 2013
Physical memory registration is only available to kernel clients. No need for 'um_call' parameter.
Signed-off-by: Fab Tillier <ftillier at microsoft.com>
diff -dwup3 -x *svn* -r \dev\openib\ofw\gen1\branches\mlx4_30\trunk\core\al\al_verbs.h .\core\al\al_verbs.h
--- \dev\openib\ofw\gen1\branches\mlx4_30\trunk\core\al\al_verbs.h Thu May 31 11:22:16 2012
+++ .\core\al\al_verbs.h Wed May 23 18:26:47 2012
@@ -122,7 +122,7 @@ verbs_create_cq(
#define verbs_register_pmr(h_pd, p_phys_create, p_vaddr,\
p_lkey, p_rkey, h_mr) \
h_mr->obj.p_ci_ca->verbs.register_pmr( h_pd->h_ci_pd,\
- p_phys_create, p_vaddr, p_lkey, p_rkey, &h_mr->h_ci_mr, FALSE )
+ p_phys_create, p_vaddr, p_lkey, p_rkey, &h_mr->h_ci_mr )
#define verbs_check_mr(h_mr) ((h_mr)->h_ci_mr)
#define verbs_check_mlnx_fmr(h_fmr) ((h_fmr)->h_ci_fmr)
@@ -155,7 +155,7 @@ verbs_create_cq(
p_vaddr, p_lkey, p_rkey, h_pd ) \
h_mr->obj.p_ci_ca->verbs.modify_pmr( h_mr->h_ci_mr, mr_modify_mask, \
p_pmr_create, p_vaddr, p_lkey, p_rkey, \
- h_pd ? h_pd->h_ci_pd : NULL, FALSE )
+ h_pd ? h_pd->h_ci_pd : NULL )
#define verbs_register_smr(h_mr, h_pd, access_ctrl, p_vaddr, p_lkey, \
p_rkey, ph_mr ) \
diff -dwup3 -x *svn* -r c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mlx4\kernel\hca\mr.c .\hw\mlx4\kernel\hca\mr.c
--- c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mlx4\kernel\hca\mr.c Thu May 31 11:22:19 2012
+++ .\hw\mlx4\kernel\hca\mr.c Thu May 31 12:35:11 2012
@@ -117,8 +121,7 @@ err_unsupported:
IN OUT uint64_t* const p_vaddr,
OUT net32_t* const p_lkey,
OUT net32_t* const p_rkey,
- OUT ib_mr_handle_t* const ph_mr,
- IN boolean_t um_call )
+ OUT ib_mr_handle_t* const ph_mr )
{
ib_api_status_t status;
int err;
@@ -126,8 +164,6 @@ mlnx_register_pmr (
struct ib_phys_buf *buffer_list;
struct ib_pd *p_ib_pd = (struct ib_pd *)h_pd;
- UNUSED_PARAM( um_call );
-
HCA_ENTER(HCA_DBG_MEMORY);
// sanity checks
@@ -242,8 +278,7 @@ mlnx_modify_pmr (
IN OUT uint64_t* const p_vaddr,
OUT uint32_t* const p_lkey,
OUT uint32_t* const p_rkey,
- IN const ib_pd_handle_t h_pd OPTIONAL,
- IN boolean_t um_call )
+ IN const ib_pd_handle_t h_pd OPTIONAL )
{
UNREFERENCED_PARAMETER(h_mr);
UNREFERENCED_PARAMETER(mem_modify_req);
@@ -252,7 +287,6 @@ mlnx_modify_pmr (
UNREFERENCED_PARAMETER(p_lkey);
UNREFERENCED_PARAMETER(p_rkey);
UNREFERENCED_PARAMETER(h_pd);
- UNREFERENCED_PARAMETER(um_call);
HCA_PRINT(TRACE_LEVEL_ERROR , HCA_DBG_MEMORY ,("mlnx_modify_pmr not implemented\n"));
return IB_UNSUPPORTED;
}
diff -dwup3 -x *svn* -r c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mthca\kernel\hca_memory.c .\hw\mthca\kernel\hca_memory.c
--- c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\hw\mthca\kernel\hca_memory.c Thu May 31 11:22:19 2012
+++ .\hw\mthca\kernel\hca_memory.c Wed May 23 18:26:48 2012
@@ -121,8 +121,7 @@ mlnx_register_pmr (
IN OUT uint64_t* const p_vaddr,
OUT net32_t* const p_lkey,
OUT net32_t* const p_rkey,
- OUT ib_mr_handle_t* const ph_mr,
- IN boolean_t um_call )
+ OUT ib_mr_handle_t* const ph_mr )
{
ib_api_status_t status;
int err;
@@ -130,8 +129,6 @@ mlnx_register_pmr (
struct ib_phys_buf *buffer_list;
struct ib_pd *ib_pd_p = (struct ib_pd *)h_pd;
- UNUSED_PARAM( um_call );
-
HCA_ENTER(HCA_DBG_MEMORY);
// sanity checks
@@ -229,8 +226,7 @@ mlnx_modify_pmr (
IN OUT uint64_t* const p_vaddr,
OUT uint32_t* const p_lkey,
OUT uint32_t* const p_rkey,
- IN const ib_pd_handle_t h_pd OPTIONAL,
- IN boolean_t um_call )
+ IN const ib_pd_handle_t h_pd OPTIONAL )
{
UNREFERENCED_PARAMETER(h_mr);
UNREFERENCED_PARAMETER(mem_modify_req);
@@ -239,7 +235,6 @@ mlnx_modify_pmr (
UNREFERENCED_PARAMETER(p_lkey);
UNREFERENCED_PARAMETER(p_rkey);
UNREFERENCED_PARAMETER(h_pd);
- UNREFERENCED_PARAMETER(um_call);
HCA_PRINT(TRACE_LEVEL_ERROR , HCA_DBG_MEMORY ,("mlnx_modify_pmr not implemented\n"));
return IB_UNSUPPORTED;
}
diff -dwup3 -x *svn* -r c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\inc\iba\ib_ci.h .\inc\iba\ib_ci.h
--- c:\dev\openib\ofw\gen1\branches\mlx4_30\trunk\inc\iba\ib_ci.h Thu May 31 11:22:18 2012
+++ .\inc\iba\ib_ci.h Thu Jul 26 15:31:14 2012
@@ -80,6 +80,8 @@ extern "C"
#define MK_VERBS_VERSION(maj,min) ((((maj) & 0xFFFF) << 16) | \
((min) & 0xFFFF))
+#define MAX_LIB_NAME 32
+
/*
* TODO: The in and out buffers should be separated (usage can still make
* both point to the same actual memory region.
@@ -142,6 +146,8 @@ typedef struct _umv_buf
} ci_umv_buf_t;
/******/
+#ifdef CL_KERNEL
+
/****f* Verbs/ci_completion_cb_t
* NAME
* ci_completion_cb_t -- Completion Notification callback.
@@ -1628,8 +1710,7 @@ typedef ib_api_status_t
IN OUT uint64_t* const p_vaddr,
OUT net32_t* const p_lkey,
OUT net32_t* const p_rkey,
- OUT ib_mr_handle_t* const ph_mr,
- IN boolean_t um_call );
+ OUT ib_mr_handle_t* const ph_mr );
/*
* DESCRIPTION
* This routine registers an array of physical pages as a single virtually
@@ -1656,8 +1737,6 @@ typedef ib_api_status_t
* ph_mr
* [out] Handle to the registered memory region. This handle is used when
* submitting work requests to refer to this region of memory.
-* um_call
-* [in] Boolean indicating whether the registration originated in user-mode.
* RETURN VALUE
* IB_SUCCESS
* Registration with the adapter was successful.
@@ -1810,8 +1889,7 @@ typedef ib_api_status_t
IN OUT uint64_t* const p_vaddr,
OUT net32_t* const p_lkey,
OUT net32_t* const p_rkey,
- IN const ib_pd_handle_t h_pd OPTIONAL,
- IN boolean_t um_call );
+ IN const ib_pd_handle_t h_pd OPTIONAL );
/*
* DESCRIPTION
* This routine modifies attributes of the specified memory region
@@ -1842,8 +1920,6 @@ typedef ib_api_status_t
* in the mr_modify_req parameter. This field supplies the new
* protection domain to which the modified region should be
* associated with.
-* um_call
-* [in] Boolean indicating whether the registration originated in user-mode.
* RETURN VALUE
* IB_SUCCESS
* The modify memory region request completed successfully.
@@ -1970,7 +2046,6 @@ typedef ib_api_status_t
*/
-#ifdef CL_KERNEL
/****f* Verbs/ci_alloc_mlnx_fmr
* NAME
* ci_alloc_mlnx_fmr -- Allocate a Mellanox fast memory region with the HCA.
@@ -2157,7 +2232,6 @@ typedef ib_api_status_t
* ci_dealloc_mlnx_fmr, ci_map_phys_mlnx_fmr, ci_unmap_mlnx_fmr
******
*/
-#endif
/****f* Verbs/ci_create_mw
@@ -3084,7 +3159,6 @@ typedef uint8_t
IN const ib_ca_handle_t h_ca,
IN const uint8_t adapter_port_num,
IN const uint16_t ip_port_num );
-
/*
* DESCRIPTION
* This routine retrives service level for given IP port
@@ -3105,10 +3179,6 @@ typedef uint8_t
*/
-#define MAX_LIB_NAME 32
-
-#ifdef CL_KERNEL
-
/****s* Verbs/ci_interface_t
* NAME
* ci_interface_t -- Interface holding Channel Interface API's
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ndv2.6.patch
Type: application/octet-stream
Size: 7037 bytes
Desc: ndv2.6.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20130220/9a083948/attachment.obj>
More information about the ofw
mailing list