[Openib-windows] RE: [patch] reregister of IP address to SM

Yossi Leybovich sleybo at mellanox.co.il
Thu Dec 1 06:16:01 PST 2005


here is the fixed patch.. 
BTW
Is this solve the ipoib hult case ?
dont you think we should dereg when we destroy the adapter ?

Yossi 



Index: ulp/ipoib/kernel/ipoib_adapter.c
===================================================================
--- ulp/ipoib/kernel/ipoib_adapter.c	(revision 193)
+++ ulp/ipoib/kernel/ipoib_adapter.c	(working copy)
@@ -761,6 +761,7 @@
 	}
 	/* Complete any pending OIDs. */
 	ipoib_resume_oids( p_adapter );
+	ipoib_dereg_addrs( p_adapter );
 
 	if( state != IB_PNP_PORT_REMOVE )
 	{
Index: ulp/ipoib/kernel/ipoib_adapter.h
===================================================================
--- ulp/ipoib/kernel/ipoib_adapter.h	(revision 193)
+++ ulp/ipoib/kernel/ipoib_adapter.h	(working copy)
@@ -394,4 +394,7 @@
 ipoib_reg_addrs(
 	IN				ipoib_adapter_t* const
p_adapter );
 
+ipoib_dereg_addrs(
+	IN				ipoib_adapter_t* const
p_adapter );
+
 #endif	/* _IPOIB_ADAPTER_H_ */
Index: ulp/ipoib/kernel/ipoib_driver.c
===================================================================
--- ulp/ipoib/kernel/ipoib_driver.c	(revision 193)
+++ ulp/ipoib/kernel/ipoib_driver.c	(working copy)
@@ -216,10 +216,6 @@
 __ipoib_ats_dereg_cb(
 	IN				void
*context );
 
-static void
-__ipoib_dereg_addrs(
-	IN				ipoib_adapter_t* const
p_adapter );
-
 static NTSTATUS
 __ipoib_read_registry(
 	IN				UNICODE_STRING* const
p_registry_path );
@@ -2231,8 +2227,8 @@
 
 
 /* Object lock is held when this function is called. */
-static void
-__ipoib_dereg_addrs(
+void
+ipoib_dereg_addrs(
 	IN				ipoib_adapter_t* const
p_adapter )
 {
 	net_address_item_t		*p_addr_item;

-----Original Message-----
From: Fab Tillier [mailto:ftillier at silverstorm.com]
Sent: Wednesday, November 30, 2005 9:51 PM
To: Yossi Leybovich
Cc: openib-windows at openib.org
Subject: RE: [Openib-windows] RE: [patch] reregister of IP address to SM



It would help if I actually sent the comments in the code, wouldn't it?
;)

> Index: ulp/ipoib/kernel/ipoib_adapter.h
> ===================================================================
> --- ulp/ipoib/kernel/ipoib_adapter.h	(revision 775)
> +++ ulp/ipoib/kernel/ipoib_adapter.h	(working copy)
> 
> @@ -394,4 +395,8 @@
>  ipoib_reg_addrs(
>  	IN				ipoib_adapter_t* const
> p_adapter );
> 
> +void
> +__ipoib_dereg_addrs(
> +	IN				ipoib_adapter_t* const
> p_adapter );
> +

Only static functions have the leading double underscore in their name.
This
helps make it clear from reading the function name whether it is static
or
global.  If you're making the function global, remove the leading double
underscore.

>  #endif	/* _IPOIB_ADAPTER_H_ */
> Index: ulp/ipoib/kernel/ipoib_driver.c
> ===================================================================
> --- ulp/ipoib/kernel/ipoib_driver.c	(revision 775)
> +++ ulp/ipoib/kernel/ipoib_driver.c	(working copy)
> @@ -217,13 +217,63 @@
>  static void
>  __ipoib_ats_dereg_cb(
>  	IN				void
> *context );
> -
> +/*
>  static void
>  __ipoib_dereg_addrs(
>  	IN				ipoib_adapter_t* const
> p_adapter );
> +*/

Don't just comment out the old static declaration.  When you moved the
declaration to make the function global, the old declaration became dead
code.
There's no reason to leave it around, commented out.  Please delete.

Thanks,

- Fab
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipoib_ips_rereg.patch
Type: application/octet-stream
Size: 1512 bytes
Desc: ipoib_ips_rereg.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20051201/1d447a56/attachment.obj>


More information about the ofw mailing list