[openib-general] Re: [PATCH][kdapl] Update dat_rmr_bind API

James Lentini jlentini at netapp.com
Wed Jun 22 09:47:07 PDT 2005


Committed in revision 2674.

On Mon, 20 Jun 2005, Itamar Rabenstein wrote:

itamar> Update dat_rmr_bind function API (added lmr_handle as input param)
itamar> 
itamar> Signed-off-by: Itamar Rabenstein <itamar at mellanox.co.il>
itamar> 
itamar> Index: test/dapltest/test/dapl_bpool.c
itamar> ===================================================================
itamar> --- test/dapltest/test/dapl_bpool.c	(revision 2656)
itamar> +++ test/dapltest/test/dapl_bpool.c	(working copy)
itamar> @@ -237,6 +237,7 @@
itamar>      			bpool_ptr->reg_addr, bpool_ptr->reg_size));
itamar>      
itamar>      	ret = dat_rmr_bind ( bpool_ptr->rmr_handle,
itamar> +			    bpool_ptr->lmr,
itamar>      			    &iov,
itamar>      			    mflags,
itamar>      			    bpool_ptr->ep,
itamar> Index: test/dapltest/kdapl/kdapl_tdep_user.c
itamar> ===================================================================
itamar> --- test/dapltest/kdapl/kdapl_tdep_user.c	(revision 2656)
itamar> +++ test/dapltest/kdapl/kdapl_tdep_user.c	(working copy)
itamar> @@ -76,7 +76,7 @@
itamar>      }
itamar>      if (params_ptr->test_type == TRANSACTION_TEST) {
itamar>          print_ioctl.cookie = ioctl (fd, KDAPL_IOCTL_GET_STAT_T, &Client_Stats_T);
itamar> -        DT_print_transaction_stats(&Client_Stats_T,params_ptr->u.Transaction_Cmd.num_iterations,
itamar> +        DT_print_transaction_stats(&Client_Stats_T,params_ptr->u.Transaction_Cmd.num_threads,
itamar>                                     params_ptr->u.Transaction_Cmd.eps_per_thread);
itamar>      }
itamar>  
itamar> Index: dat-provider/dapl_rmr.c
itamar> ===================================================================
itamar> --- dat-provider/dapl_rmr.c	(revision 2656)
itamar> +++ dat-provider/dapl_rmr.c	(working copy)
itamar> @@ -149,26 +149,18 @@
itamar>  }
itamar>  
itamar>  static inline u32 dapl_rmr_bind_fuse(struct dapl_rmr *rmr,
itamar> -				     const struct dat_lmr_triplet *lmr_triplet,
itamar> +				     struct dapl_lmr *lmr,
itamar> +				     const struct dat_lmr_triplet *lmr_triplet,
itamar>  				     enum dat_mem_priv_flags mem_priv,
itamar>  				     struct dapl_ep *ep_ptr,
itamar>  				     DAT_RMR_COOKIE user_cookie,
itamar>  				     enum dat_completion_flags completion_flags,
itamar>  				     DAT_RMR_CONTEXT *rmr_context)
itamar>  {
itamar> -	struct dapl_lmr *lmr;
itamar>  	struct dapl_cookie *cookie;
itamar>  	u32 status;
itamar>  	boolean_t is_signaled;
itamar>  
itamar> -	status = dapl_hash_search(rmr->common.owner_ia->hca->lmr_hash_table,
itamar> -                                  lmr_triplet->lmr_context,
itamar> -                                  (DAPL_HASH_DATA *) &lmr);
itamar> -	if (DAT_SUCCESS != status) {
itamar> -		status = DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
itamar> -		goto bail;
itamar> -	}
itamar> -
itamar>  	/*
itamar>  	 * if the ep in unconnected return an error. IB requires that the
itamar>  	 * QP be connected to change a memory window binding since:
itamar> @@ -353,27 +345,32 @@
itamar>   * Output:
itamar>   */
itamar>  u32 dapl_rmr_bind(struct dat_rmr *rmr_handle,
itamar> -		  const struct dat_lmr_triplet *lmr_triplet,
itamar> +		  struct dat_lmr *lmr_handle, const struct dat_lmr_triplet *lmr_triplet,
itamar>  		  enum dat_mem_priv_flags mem_priv, struct dat_ep *ep,
itamar>  		  DAT_RMR_COOKIE user_cookie,
itamar>  		  enum dat_completion_flags completion_flags,
itamar>  		  DAT_RMR_CONTEXT *rmr_context)
itamar>  {
itamar>  	struct dapl_rmr *rmr;
itamar> +	struct dapl_lmr *lmr;
itamar>  	struct dapl_ep *ep_ptr;
itamar>  
itamar>  	if (!rmr_handle)
itamar>  		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_RMR);
itamar>  
itamar> +	if (!lmr_handle)
itamar> +		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_LMR);
itamar> +
itamar>  	if (!ep)
itamar>  		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_EP);
itamar>  
itamar>  	rmr = (struct dapl_rmr *)rmr_handle;
itamar> +	lmr = (struct dapl_lmr *)lmr_handle;
itamar>  	ep_ptr = (struct dapl_ep *)ep;
itamar>  
itamar>  	/* if the rmr should be bound */
itamar>  	if (0 != lmr_triplet->segment_length)
itamar> -		return dapl_rmr_bind_fuse(rmr, lmr_triplet, mem_priv, ep_ptr,
itamar> +		return dapl_rmr_bind_fuse(rmr, lmr, lmr_triplet, mem_priv, ep_ptr,
itamar>  					  user_cookie, completion_flags, 
itamar>                                            rmr_context);
itamar>  	else /* the rmr should be unbound */
itamar> Index: dat-provider/dapl.h
itamar> ===================================================================
itamar> --- dat-provider/dapl.h	(revision 2656)
itamar> +++ dat-provider/dapl.h	(working copy)
itamar> @@ -543,6 +543,7 @@
itamar>  			  struct dat_rmr_param *rmr_args);
itamar>  
itamar>  extern u32 dapl_rmr_bind(struct dat_rmr *rmr,
itamar> +			 struct dat_lmr *lmr,
itamar>  			 const struct dat_lmr_triplet *lmr_triplet,
itamar>  			 enum dat_mem_priv_flags mem_priv,
itamar>  			 struct dat_ep *ep,
itamar> Index: dat/dat.h
itamar> ===================================================================
itamar> --- dat/dat.h	(revision 2656)
itamar> +++ dat/dat.h	(working copy)
itamar> @@ -1144,7 +1144,8 @@
itamar>  
itamar>  typedef u32 (*DAT_RMR_QUERY_FUNC)(struct dat_rmr *, struct dat_rmr_param *);
itamar>  
itamar> -typedef u32 (*DAT_RMR_BIND_FUNC)(struct dat_rmr *, const struct dat_lmr_triplet *,
itamar> +typedef u32 (*DAT_RMR_BIND_FUNC)(struct dat_rmr *, struct dat_lmr *,
itamar> +				 const struct dat_lmr_triplet *,
itamar>  				 enum dat_mem_priv_flags, struct dat_ep *,
itamar>  				 DAT_RMR_COOKIE, enum dat_completion_flags,
itamar>  				 DAT_RMR_CONTEXT *);
itamar> @@ -1617,23 +1618,24 @@
itamar>          return DAT_CALL_PROVIDER_FUNC(rmr_create_func, pz, rmr);
itamar>  }
itamar>  
itamar> -static inline u32 dat_rmr_query(struct dat_rmr * rmr, struct dat_rmr_param *param)
itamar> +static inline u32 dat_rmr_query(struct dat_rmr *rmr, struct dat_rmr_param *param)
itamar>  {
itamar>          return DAT_CALL_PROVIDER_FUNC(rmr_query_func, rmr, param);
itamar>  }
itamar>  
itamar> -static inline u32 dat_rmr_bind(struct dat_rmr * rmr,
itamar> -			       const struct dat_lmr_triplet *iov,
itamar> +static inline u32 dat_rmr_bind(struct dat_rmr *rmr,
itamar> +			       struct dat_lmr *lmr,
itamar> +				   const struct dat_lmr_triplet *iov,
itamar>  			       enum dat_mem_priv_flags mem_flags,
itamar>  			       struct dat_ep *ep, DAT_RMR_COOKIE cookie,
itamar>  			       enum dat_completion_flags comp_flags,
itamar>  			       DAT_RMR_CONTEXT *context)
itamar>  {
itamar> -        return DAT_CALL_PROVIDER_FUNC(rmr_bind_func, rmr, iov, mem_flags, ep, 
itamar> -                                      cookie, comp_flags, context);
itamar> +        return DAT_CALL_PROVIDER_FUNC(rmr_bind_func, rmr, lmr, iov, mem_flags, 
itamar> +                                      ep, cookie, comp_flags, context);
itamar>  }
itamar>  
itamar> -static inline u32 dat_rmr_free(struct dat_rmr * rmr)
itamar> +static inline u32 dat_rmr_free(struct dat_rmr *rmr)
itamar>  {
itamar>          return DAT_CALL_PROVIDER_FUNC(rmr_free_func, rmr);
itamar>  }
itamar> -- 
itamar> Itamar
itamar> 



More information about the general mailing list