[openib-general] Re: [PATCH] kdapltest: fix pointer to pointer bug

James Lentini jlentini at netapp.com
Wed Jun 8 09:35:40 PDT 2005


Committed in revision 2572.

On Thu, 2 Jun 2005, Tom Duffy wrote:

tduffy> In my work going through trying to get rid of the opaque dat handles, I
tduffy> came across what looks like a bug in kdapltest.  I don't think
tduffy> DT_Performance_Test_Create() and DT_Performance_Test_Client() should
tduffy> take a DAT_IA_HANDLE * as an argument as this would be a pointer to a
tduffy> pointer.
tduffy> 
tduffy> Of course, the compiler didn't catch it until I changed it to a real
tduffy> struct pointers thus showing one of the problems with using opaques.
tduffy> 
tduffy> Signed-off-by: Tom Duffy <tduffy at sun.com>
tduffy> 
tduffy> Index: linux-kernel-clean/test/dapltest/test/dapl_performance_util.c
tduffy> ===================================================================
tduffy> --- linux-kernel-clean/test/dapltest/test/dapl_performance_util.c	(revision 2532)
tduffy> +++ linux-kernel-clean/test/dapltest/test/dapl_performance_util.c	(working copy)
tduffy> @@ -33,7 +33,7 @@
tduffy>  boolean_t
tduffy>  DT_Performance_Test_Create (
tduffy>      Per_Test_Data_t 		*pt_ptr,
tduffy> -    DAT_IA_HANDLE 		*ia_handle,
tduffy> +    DAT_IA_HANDLE 		ia_handle,
tduffy>      struct sockaddr *		remote_ia_addr,
tduffy>      boolean_t 		is_server,
tduffy>      boolean_t			is_remote_little_endian,
tduffy> Index: linux-kernel-clean/test/dapltest/test/dapl_performance_client.c
tduffy> ===================================================================
tduffy> --- linux-kernel-clean/test/dapltest/test/dapl_performance_client.c	(revision 2532)
tduffy> +++ linux-kernel-clean/test/dapltest/test/dapl_performance_client.c	(working copy)
tduffy> @@ -34,7 +34,7 @@ int
tduffy>  DT_Performance_Test_Client (
tduffy>      Params_t		*params_ptr,
tduffy>      Per_Test_Data_t 	*pt_ptr,
tduffy> -    DAT_IA_HANDLE  	*ia_handle,
tduffy> +    DAT_IA_HANDLE  	ia_handle,
tduffy>      struct sockaddr *	remote_ia_addr)
tduffy>  {
tduffy>      Performance_Test_t 		*test_ptr = NULL;
tduffy> Index: linux-kernel-clean/test/dapltest/include/dapl_proto.h
tduffy> ===================================================================
tduffy> --- linux-kernel-clean/test/dapltest/include/dapl_proto.h	(revision 2532)
tduffy> +++ linux-kernel-clean/test/dapltest/include/dapl_proto.h	(working copy)
tduffy> @@ -236,7 +236,7 @@ void            DT_Performance_Cmd_Endia
tduffy>  /* dapl_performance_client.c */
tduffy>  int             DT_Performance_Test_Client (   Params_t	*params_ptr,
tduffy>  					       Per_Test_Data_t * pt_ptr,
tduffy> -					       DAT_IA_HANDLE * ia_handle,
tduffy> +					       DAT_IA_HANDLE ia_handle,
tduffy>  					       struct sockaddr *remote);
tduffy>  
tduffy>  boolean_t            DT_Performance_Test_Client_Connect (
tduffy> @@ -261,7 +261,7 @@ boolean_t            DT_Performance_Test
tduffy>  
tduffy>  /* dapl_performance_util.c */
tduffy>  boolean_t            DT_Performance_Test_Create (Per_Test_Data_t * pt_ptr,
tduffy> -					   DAT_IA_HANDLE * ia_handle,
tduffy> +					   DAT_IA_HANDLE ia_handle,
tduffy>  					   struct sockaddr *remote_ia_addr,
tduffy>  					   boolean_t is_server,
tduffy>  					   boolean_t is_remote_little_endian,
tduffy> 



More information about the general mailing list