[ofw] patch: Remove dead code in ipoib

Tzachi Dar tzachid at mellanox.co.il
Mon Oct 27 01:39:11 PDT 2008


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/20081027/ba60ec65/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipoib_expired.patch
Type: application/octet-stream
Size: 2749 bytes
Desc: ipoib_expired.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20081027/ba60ec65/attachment.obj>


More information about the ofw mailing list