Alex Naslednikov wrote: > Please, commit Completed: At revision: 3052
thanks. stan. > > -----Original Message----- > From: Smith, Stan [mailto:[email protected]] > Sent: Monday, December 27, 2010 7:40 PM > To: Alex Naslednikov > Cc: [email protected] > Subject: [PATCH] ipoib_port.cpp white-space adj, spelling > corrections, declaration consistency, lid output as hex > > > Hello, > > extra white-space removal, spelling & grammar corrections. > Change IPOIB_PRINT_EXIT --> IPOIB_PRINT > Add missing IPOIB_EXIT > Be consistent in declaration format within same function: > ipoib_send_NB_SG * s_buf = IPOIB_INFO_FROM_NB(p_netbuf); > ipoib_send_NB_SG *s_buf = IPOIB_INFO_FROM_NB(p_netbuf); > > Output Lid value in hex as tools (vstat) uses hex. > > missing qpool_construct() from Irena. > > signed-off-by: stan smith <[email protected]> > > Previous patch applied to latest svn patched ipoib_port.cpp > > --- A/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp Mon Dec 27 09:19:44 > 2010 +++ B/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp Mon Dec 27 > 09:19:13 2010 @@ -376,7 +376,6 @@ > IN ULONG compl_flags, > IN boolean_t bLock ); > > - > static inline NDIS_STATUS > __send_mgr_queue( > IN ipoib_port_t* const > p_port, @@ -1218,7 +1217,6 @@ > p_port->p_adapter->params.recv_chksum_offload > = CSUM_DISABLED; } > > - > // Now, params struct contains the intersection between the > user definition // and actual HW capabilites > // Remember these values for NDIS OID requests @@ -1989,7 > +1987,6 @@ NET_BUFFER_LIST *cur_net_buffer_list, > *next_net_buffer_list; LONG > NBL_cnt = 0; > > - > for (cur_net_buffer_list = p_net_buffer_lists; > cur_net_buffer_list != NULL; > cur_net_buffer_list = next_net_buffer_list) @@ > -2318,7 +2315,7 @@ if (p_free ) > { > /* > - * Rearm after filtering to prevent contention on the > enpoint maps + * Rearm after filtering to prevent > contention on the + endpoint maps > * and eliminate the possibility of having a call to > * __endpt_mgr_insert find a duplicate. > */ > @@ -2582,8 +2579,8 @@ > cl_qlist_insert_tail( p_bad_list, > &p_desc->item.list_item ); ipoib_port_deref( > p_port, ref_recv_inv_len ); continue; > - > } > + > /* Successful completion. Get the receive > information. */ p_desc->ndis_csum.Value = ( ( > p_wc->recv.ud.recv_opt & IB_RECV_OPT_CSUM_MASK ) >> 8 > ); p_desc->len = len + 14 - 4 ; @@ -3484,6 +3481,7 @@ > IPOIB_ENTER( IPOIB_DBG_SEND ); p_port->send_mgr.depth = 0; > cl_qlist_init( &p_port->send_mgr.pending_list ); > + cl_qpool_construct(&p_port->send_mgr.sg_pool); > cl_qpool_construct( &p_port->send_mgr.send_pool ); > p_port->p_desc = NULL; > IPOIB_EXIT( IPOIB_DBG_SEND ); > @@ -3581,7 +3579,6 @@ > //__send_complete_net_buffer(s_buf, > > NDIS_STATUS_RESET_IN_PROGRESS,send_complete_flags,TRUE); > __send_complete_net_buffer(s_buf, > NDIS_STATUS_FAILURE,send_complete_flags,TRUE); } - } > > static void > @@ -4119,7 +4116,7 @@ > cl_qlist_insert_head( > &p_port->send_mgr.pending_list, > (cl_list_item_t*)s_buf ); IPOIB_PRINT( > TRACE_LEVEL_INFORMATION, IPOIB_DBG_MCAST, - > ("We insert this item back to the pending list: %p \n", + > ("Insert item back to the pending list: + %p \n", > p_net_buffer_list)); > ret = false; > goto send_end; > @@ -4179,8 +4176,8 @@ > MDL > *p_ip_hdr_mdl; UINT > ip_hdr_mdl_len; > > - IPOIB_PRINT_EXIT( TRACE_LEVEL_INFORMATION, > IPOIB_DBG_MCAST, > - ("Sent a Multicast NBL=%p\n", > p_net_buffer_list) ); + IPOIB_PRINT( > TRACE_LEVEL_INFORMATION, IPOIB_DBG_MCAST, + > ("Send a Multicast NBL=%p\n", + p_net_buffer_list) ); > > g_ipoib_send_mcast++; > > @@ -4217,7 +4214,6 @@ > } > p_eth_hdr->dst.addr[1] = ((unsigned > char*)&p_ip_hdr->dst_ip)[0] & 0x0f; > p_eth_hdr->dst.addr[3] = ((unsigned char*)&p_ip_hdr->dst_ip)[1]; - > } > > mc_end: > @@ -4411,7 +4407,6 @@ > > DataOffset= > (ULONG)(NET_BUFFER_CURRENT_MDL_OFFSET(s_buf->p_curr_nb)); > > - > /* > * Skip the Ethernet or LSO header. It is contained at N+1 > first elements (N>=0), > * while (N+1) element may contain only part of it @@ -4424,7 > +4419,6 @@ DataOffset = 0; > i++; > } > - > > if (total_offset > 0 ) > { > @@ -4463,7 +4457,7 @@ > IN const eth_hdr_t* const > p_eth_hdr, IN MDL* > p_mdl, IN size_t > buf_len, - IN ipoib_send_NB_SG > *s_buf ) + IN ipoib_send_NB_SG* > s_buf ) { > NDIS_STATUS status; > PVOID p_ip_hdr; > @@ -4610,7 +4604,7 @@ > > send_gen: > cl_perf_start( SendTcp ); > - status = __send_gen( s_buf, 0 ); > + status = __send_gen( s_buf, 0 ); > cl_perf_stop( &p_port->p_adapter->perf, SendTcp ); > > IPOIB_EXIT( IPOIB_DBG_SEND ); > @@ -4804,8 +4798,6 @@ > } > } > /* Get the UDP header and check the destination port numbers. > */ - > - > > if( buf_len < sizeof(udp_hdr_t) ) > { > @@ -5258,7 +5250,7 @@ > IN eth_hdr_t* const > p_eth_hdr, OUT ipoib_endpt_t** > const pp_endpt ) { > - NDIS_STATUS status; > + NDIS_STATUS status; > > PERF_DECLARE( GetEndpt ); > > @@ -5319,7 +5311,7 @@ > IN eth_hdr_t* const > p_eth_hdr, IN MDL* const > p_mdl, IN const size_t > mdl_len, - IN ipoib_send_NB_SG > *s_buf) + IN ipoib_send_NB_SG > *s_buf ) { > NDIS_STATUS status; > int32_t hdr_idx; > @@ -5437,7 +5429,7 @@ > ( > > p_checksum_list_info->Transmit.IsIPv4 > || p_checksum_list_info->Transmit.IsIPv6 )) { - > // Set transimition checksum offloading + > // Set transmit checksum + offloading > if( > > > p_checksum_list_info->Transmit.IpHeaderChecksum ) { > p_desc->send_wr[i].wr.send_opt |= IB_SEND_OPT_TX_IP_CSUM; @@ -5490,7 > +5482,7 @@ > > IPOIB_ENTER( IPOIB_DBG_SEND ); > > - ipoib_send_NB_SG * s_buf = IPOIB_INFO_FROM_NB(p_netbuf); > + ipoib_send_NB_SG *s_buf = IPOIB_INFO_FROM_NB(p_netbuf); > ipoib_send_desc_t *p_desc = p_port->p_desc; > > //TODO What if first NB was inserted to pending list ???? > @@ -6960,6 +6952,7 @@ > cl_atomic_dec( &p_port->endpt_rdr ); > cl_obj_unlock( &p_port->obj ); > > + IPOIB_EXIT( IPOIB_DBG_ENDPT ); > return status; > } > > @@ -7209,7 +7202,6 @@ > p_port->state = IB_QPS_INIT; > cl_obj_unlock( &p_port->obj ); > > - > /* Wait for all work requests to get flushed. */ > while( p_port->recv_mgr.depth || p_port->send_mgr.depth ) > cl_thread_suspend( 0 ); > @@ -7316,8 +7308,8 @@ > cl_memclr( &av_attr, sizeof(ib_av_attr_t) ); > av_attr.port_num = p_port->port_num; > av_attr.sl = 0; > - IPOIB_PRINT_EXIT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_ENDPT, > - (" av_attr.dlid = p_port_info->base_lid = %d\n", > + IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_ENDPT, > + (" av_attr.dlid = p_port_info->base_lid = %x\n", > cl_ntoh16( p_port_info->base_lid ) )); > av_attr.dlid = p_port_info->base_lid; > av_attr.static_rate = p_port->ib_mgr.rate; @@ -7691,7 +7683,7 > @@ p_port->p_adapter->hung = TRUE; > return; > } > - IPOIB_PRINT_EXIT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_INIT, > + IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_INIT, > ("IB QP was put into IB_QPS_ERROR state\n") ); > > KeResetEvent(&p_port->leave_mcast_event); > @@ -8011,7 +8003,7 @@ > > ib_api_status_t > ipoib_port_join_mcast( > - IN ipoib_port_t* const > p_port, + IN ipoib_port_t* const > p_port, IN const mac_addr_t > mac, IN const uint8_t > state) { > @@ -8078,7 +8070,7 @@ > } > else > { > - /* Handle non IP mutlicast MAC addresses. */ > + /* Handle non IP multicast MAC addresses. */ > /* Update the signature to use the lower 2 bytes of > the OpenIB OUI. */ mcast_req.member_rec.mgid.raw[2] = > 0x14; mcast_req.member_rec.mgid.raw[3] = 0x05; _______________________________________________ ofw mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
