Thanks for the review. Revision: 3188 Author: stansmith Date: 2:51:58 PM, Wednesday, June 29, 2011 Message: [IPOIB_NDIS6_CM] move existing debug code into ipoib_debug.cpp under #if EXTRA_DEBUG; simplify and trim release compile surface. Remove commented out code. ---- Modified : /gen1/trunk/ulp/ipoib_NDIS6_CM/kernel/SOURCES Modified : /gen1/trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_cm.cpp Modified : /gen1/trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_debug.cpp Modified : /gen1/trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_debug.h Modified : /gen1/trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_endpoint.h Modified : /gen1/trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp
>-----Original Message----- >From: Alex Naslednikov [mailto:[email protected]] >Sent: Wednesday, June 29, 2011 12:42 AM >To: Smith, Stan >Cc: [email protected] >Subject: RE: [PATCH] 6 of 6 ipoib_ndis6_cm - conditionalize and move debug >code to debug file > >Hi Stan, >I reviewed the patches - ok with me > >-----Original Message----- >From: Smith, Stan [mailto:[email protected]] >Sent: Wednesday, June 29, 2011 12:39 AM >To: Alex Naslednikov >Cc: [email protected] >Subject: [PATCH] 6 of 6 ipoib_ndis6_cm - conditionalize and move debug code to >debug file > > >Migrate debug code into ipoib_debug.cpp and make conditional on >EXTRA_DEBUG==1; trim the default compilation base. >Remove unused (commented out) code. > >Signed-off-by: stan smith <[email protected]> > >--- C:/Users/scsmith/AppData/Local/Temp/ipoib_cm.cpp-revBASE.svn000.tmp.cpp >Tue Jun 28 14:07:03 2011 >+++ >C:/Users/scsmith/Documents/openIB-windows/SVN/gen1/trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_cm.cpp > Tue Jun 28 11:02:01 >2011 >@@ -215,6 +215,35 @@ > > > >+char *get_eth_packet_type_str(net16_t pkt_type) >+{ >+ static char what[28]; >+ >+ switch( pkt_type ) >+ { >+ case ETH_PROT_TYPE_IP: >+ return "ETH_PROT_IP"; >+ >+ case ETH_PROT_TYPE_IPV6: >+ return "ETH_PROT_IPV6"; >+ >+ case ETH_PROT_TYPE_ARP: >+ return "ETH_PROT_ARP"; >+ >+ case ETH_PROT_TYPE_RARP: >+ return "ETH_PROT_RARP"; >+ >+ case ETH_PROT_VLAN_TAG: >+ return "ETH_PROT_VLAN_TAG"; >+ >+ default: >+ break; >+ } >+ StringCchPrintf(what,sizeof(what),"Unknown Eth packet type >0x%x",pkt_type); >+ return what; >+} >+ >+ > char *cm_get_state_str( cm_state_t s ) > { > static char what[28]; >@@ -247,7 +276,7 @@ > return what; > } > >-#if DBG >+#if EXTRA_DBG > > void > decode_enet_pkt(char *preFix, void *hdr, int len, char *postFix) >@@ -299,71 +328,6 @@ > #endif > > >-#if 0 >- >-static void >-decode_NBL( >- IN char const *preFix, >- IN ipoib_port_t *p_port, >- IN NET_BUFFER_LIST *p_net_buffer_list ) >-{ >- ipoib_cm_recv_desc_t *p_desc; >- NET_BUFFER_LIST *cur_NBL, *next_NBL; >- LONG NBL_cnt = 0; >- PNET_BUFFER NB; >- ULONG len, off, i; >- >- IPOIB_ENTER(IPOIB_DBG_RECV); >- >- for (cur_NBL = p_net_buffer_list; cur_NBL != NULL; cur_NBL = next_NBL, >NBL_cnt++) >- { >- next_NBL = NET_BUFFER_LIST_NEXT_NBL(cur_NBL); >- /* Get the port and descriptor from the NET_BUFFER_LIST. */ >- CL_ASSERT(p_port == IPOIB_PORT_FROM_NBL(cur_NBL)); >- p_desc = IPOIB_CM_RECV_FROM_NBL(cur_NBL); >-#if 0 >- decode_enet_pkt( "\n%s", preFix, >- p_desc->p_alloc_buf, >- p_desc->len, >- NULL ); >-#endif >- IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_CM, >- ("%s[%d] curNBL %p p_desc->len %d NblFlags %#x\n", >- preFix, >- NBL_cnt, >- cur_NBL, >- p_desc->len, >- NET_BUFFER_LIST_NBL_FLAGS(cur_NBL)) ); >- >- NB = NET_BUFFER_LIST_FIRST_NB(cur_NBL); >- for(i = 1; NB;i++) >- { >- MDL *p_mdl; >- PUCHAR p_head; >- UINT mdl_len; >- >- p_head=NULL; >- p_mdl = NET_BUFFER_FIRST_MDL(NB); >- NdisQueryMdl( p_mdl, &p_head, &mdl_len, >NormalPagePriority ); >- if( p_head ) >- { >- len = NET_BUFFER_DATA_LENGTH(NB); >- off = NET_BUFFER_DATA_OFFSET(NB); >- IPOIB_PRINT( TRACE_LEVEL_INFORMATION, >IPOIB_DBG_CM, >- (" NB[%d] off %lu len %lu mdl_len %u\n", >- i,off,len,mdl_len) ); >- //(p_head+off), >- //(p_desc->p_buf - >DATA_OFFSET)) ); >- CL_ASSERT( len == p_desc->len ); >- CL_ASSERT( (p_head+off) == (p_desc->p_buf - >DATA_OFFSET)); >- decode_enet_pkt( "\nEdata:", (p_head + off), >mdl_len, NULL ); >- } >- NB=NET_BUFFER_NEXT_NB(NB); >- } >- } >-} >-#endif >- > static ib_api_status_t > __cm_create_qp( > IN ipoib_port_t* p_port, >@@ -2521,8 +2485,6 @@ > > cl_spinlock_release( &p_port->cm_buf_mgr.lock); > >- //cl_spinlock_acquire( &p_port->recv_lock ); >- > do > { > /* Approximate the number of posted receive buffers needed in > order to >@@ -2570,7 +2532,6 @@ > /* normal all-done loop exit */ > break; > } >- //cl_spinlock_release( &p_port->recv_lock ); > > cl_perf_start( CMRecvNdisIndicate ); > >@@ -2634,11 +2595,9 @@ > ipoib_free_received_NBL( p_port, p_endpt->cm_recv.NBL ); > cl_spinlock_release( &p_port->recv_lock ); > } >- //cl_spinlock_acquire( &p_port->recv_lock ); > > } while( NBL_cnt ); > >- //cl_spinlock_release( &p_port->recv_lock ); > > if (p_free ) > { _______________________________________________ ofw mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
