[ofw] patch: Remove dead code in ipoib

Tzachi Dar tzachid at mellanox.co.il
Tue Oct 28 03:19:09 PDT 2008


Applied on 1708, 1709
 
Thanks
Tzachi


________________________________

	From: ofw-bounces at lists.openfabrics.org
[mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Tzachi Dar
	Sent: Monday, October 27, 2008 10:39 AM
	To: ofw at lists.openfabrics.org
	Subject: [ofw] patch: Remove dead code in ipoib
	
	
	The function ipoib_port_flush_endpts is not in used, and is now
removed.
	 
	Index: ulp/ipoib/kernel/ipoib_endpoint.h
	
===================================================================
	--- ulp/ipoib/kernel/ipoib_endpoint.h (revision 1697)
	+++ ulp/ipoib/kernel/ipoib_endpoint.h (working copy)
	@@ -60,7 +60,6 @@
	  net16_t     dlid;
	  net32_t     qpn;
	  ib_av_handle_t   h_av;
	- boolean_t    expired;
	  ib_al_ifc_t    *p_ifc;
	  boolean_t       is_in_use;
	  boolean_t    is_mcast_listener;
	@@ -140,7 +139,6 @@
	   * or trying to send data to that endpoint.  Clear the expired
flag
	   * to prevent the AV from being flushed.
	   */
	- p_endpt->expired = FALSE;
	 }
	 
	 
	Index: ulp/ipoib/kernel/ipoib_port.c
	
===================================================================
	--- ulp/ipoib/kernel/ipoib_port.c (revision 1697)
	+++ ulp/ipoib/kernel/ipoib_port.c (working copy)
	@@ -5110,51 +5110,6 @@
	  IPOIB_EXIT( IPOIB_DBG_ENDPT );
	 }
	 
	-
	-void
	-ipoib_port_flush_endpts(
	- IN    ipoib_port_t* const   p_port )
	-{
	- cl_map_item_t *p_item;
	- ipoib_endpt_t *p_endpt;
	-
	- IPOIB_ENTER( IPOIB_DBG_ENDPT );
	-
	- cl_obj_lock( &p_port->obj );
	- p_item = cl_qmap_head( &p_port->endpt_mgr.mac_endpts );
	- while( p_item != cl_qmap_end( &p_port->endpt_mgr.mac_endpts )
)
	- {
	-  p_endpt = PARENT_STRUCT( p_item, ipoib_endpt_t, mac_item );
	-  p_item = cl_qmap_next( p_item );
	-
	-  /*
	-   * If the endpoint has been marked as expired before, and we
have
	-   * an AV handle, free the AV.
	-   */
	-  if( p_endpt->expired && p_endpt->h_av )
	-  {
	-   CL_ASSERT( p_endpt->obj.ref_cnt == 1 );
	-   p_port->p_adapter->p_ifc->destroy_av( p_endpt->h_av );
	-   p_endpt->h_av = NULL;
	-   p_endpt->expired = FALSE;
	-  }
	-
	-  /*
	-   * If the endpoint is not in use, mark it as expired.
	-   * Note that the ref count is only zero when the endpoint
gets
	-   * destroyed, so an endpoint that is not in use has a ref
count of 1.
	-   * Also note that we never expire any multicast endpoints.
	-   */
	-  CL_ASSERT( p_endpt->obj.ref_cnt != 0 );
	-  if( p_endpt->obj.ref_cnt == 1 && p_endpt->h_av &&
!p_endpt->h_mcast )
	-   p_endpt->expired = TRUE;
	- }
	- cl_obj_unlock( &p_port->obj );
	-
	- IPOIB_EXIT( IPOIB_DBG_ENDPT );
	-}
	-
	-
	 /*
	  * The sequence for port up is as follows:
	  * 1. The port goes active.  This allows the adapter to send SA
queries
	Index: ulp/ipoib/kernel/ipoib_port.h
	
===================================================================
	--- ulp/ipoib/kernel/ipoib_port.h (revision 1697)
	+++ ulp/ipoib/kernel/ipoib_port.h (working copy)
	@@ -596,10 +596,6 @@
	  IN  const mac_addr_t     mac );
	 
	 void
	-ipoib_port_flush_endpts(
	- IN    ipoib_port_t* const   p_port );
	-
	-void
	 ipoib_port_send(
	  IN    ipoib_port_t* const   p_port,
	  IN    NDIS_PACKET     **p_packet_array,
	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20081028/3de40c17/attachment.html>


More information about the ofw mailing list