[PATCH] opensm/osm_vendor_ibumad.c: Move error info into single message
The information in ERR 5409 is moved into 5410/5411 to reduce number of messages Signed-off-by: Line Holen --- diff --git a/opensm/libvendor/osm_vendor_ibumad.c b/opensm/libvendor/osm_vendor_ibumad.c index 8f9bbf5..b4319cd 100644 --- a/opensm/libvendor/osm_vendor_ibumad.c +++ b/opensm/libvendor/osm_vendor_ibumad.c @@ -3,6 +3,7 @@ * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved. * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. * Copyright (c) 2009 HNR Consulting. All rights reserved. + * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -325,28 +326,30 @@ static void *umad_receiver(void *p_ptr) /* if status != 0 then we are handling recv timeout on send */ if (umad_status(p_madw->vend_wrap.umad)) { - OSM_LOG(p_vend->p_log, OSM_LOG_ERROR, "ERR 5409: " - "send completed with error" - " (method=0x%X attr=0x%X trans_id=0x%" PRIx64 - ") -- dropping\n", - mad->method, cl_ntoh16(mad->attr_id), - cl_ntoh64(mad->trans_id)); + if (mad->mgmt_class != IB_MCLASS_SUBN_DIR) { /* LID routed */ - OSM_LOG(p_vend->p_log, OSM_LOG_ERROR, - "ERR 5410: class 0x%x LID %u\n", - mad->mgmt_class, + OSM_LOG(p_vend->p_log, OSM_LOG_ERROR, "ERR 5410: " + "Send completed with error -- dropping\n" + "\t\t\tClass 0x%x, Method 0x%X, Attr 0x%X, " + "TID 0x%" PRIx64 ", LID %u\n", + mad->mgmt_class, mad->method, + cl_ntoh16(mad->attr_id), + cl_ntoh64(mad->trans_id), cl_ntoh16(ib_mad_addr->lid)); } else { ib_smp_t *smp; /* Direct routed SMP */ smp = (ib_smp_t *) mad; - OSM_LOG(p_vend->p_log, OSM_LOG_ERROR, - "ERR 5411: DR SMP Hop Ptr: 0x%X\n", - smp->hop_ptr); + OSM_LOG(p_vend->p_log, OSM_LOG_ERROR, "ERR 5411: " + "DR SMP Send completed with error -- dropping\n" + "\t\t\tMethod 0x%X, Attr 0x%X, TID 0x%" PRIx64 + ", Hop Ptr: 0x%X\n", + mad->method, cl_ntoh16(mad->attr_id), + cl_ntoh64(mad->trans_id), smp->hop_ptr); osm_dump_smp_dr_path(p_vend->p_log, smp, -OSM_LOG_ERROR); +OSM_LOG_VERBOSE); } if (!(p_req_madw = get_madw(p_vend, &mad->trans_id))) { -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] opensm: Added print_desc to various log messages
Added print_desc to various log messages to make it easier to identify the node Signed-off-by: Line Holen --- diff --git a/opensm/opensm/osm_lin_fwd_rcv.c b/opensm/opensm/osm_lin_fwd_rcv.c index c686f3b..ef33df3 100644 --- a/opensm/opensm/osm_lin_fwd_rcv.c +++ b/opensm/opensm/osm_lin_fwd_rcv.c @@ -2,6 +2,7 @@ * Copyright (c) 2004-2009 Voltaire, Inc. All rights reserved. * Copyright (c) 2002-2005,2008 Mellanox Technologies LTD. All rights reserved. * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. + * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -89,8 +90,9 @@ void osm_lft_rcv_process(IN void *context, IN void *data) if (status != IB_SUCCESS) { OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0402: " "Setting forwarding table block failed (%s)" - "\n\t\t\t\tSwitch 0x%" PRIx64 "\n", - ib_get_err_str(status), cl_ntoh64(node_guid)); + ", Switch 0x%" PRIx64 " %s\n", + ib_get_err_str(status), cl_ntoh64(node_guid), + p_sw->p_node->print_desc); } } diff --git a/opensm/opensm/osm_mcast_fwd_rcv.c b/opensm/opensm/osm_mcast_fwd_rcv.c index 0fbc95a..917233e 100644 --- a/opensm/opensm/osm_mcast_fwd_rcv.c +++ b/opensm/opensm/osm_mcast_fwd_rcv.c @@ -2,6 +2,7 @@ * Copyright (c) 2004-2009 Voltaire, Inc. All rights reserved. * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved. * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. + * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -107,10 +108,10 @@ void osm_mft_rcv_process(IN void *context, IN void *data) if (status != IB_SUCCESS) { OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0802: " "Setting MFT block failed (%s)" - "\n\t\t\t\tSwitch 0x%016" PRIx64 - ", block %u, position %u\n", - ib_get_err_str(status), - cl_ntoh64(node_guid), block_num, position); + ", Switch 0x%016" PRIx64 + " (%s), block %u, position %u\n", + ib_get_err_str(status), cl_ntoh64(node_guid), + p_sw->p_node->print_desc, block_num, position); } } diff --git a/opensm/opensm/osm_mcast_mgr.c b/opensm/opensm/osm_mcast_mgr.c index 616584f..697fb58 100644 --- a/opensm/opensm/osm_mcast_mgr.c +++ b/opensm/opensm/osm_mcast_mgr.c @@ -3,6 +3,7 @@ * Copyright (c) 2002-2009 Mellanox Technologies LTD. All rights reserved. * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. * Copyright (c) 2008 Xsigo Systems Inc. All rights reserved. + * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -270,9 +271,9 @@ static osm_switch_t *mcast_mgr_find_optimal_switch(osm_sm_t * sm, if (p_best_sw) OSM_LOG(sm->p_log, OSM_LOG_VERBOSE, - "Best switch is 0x%" PRIx64 ", hops = %f\n", + "Best switch is 0x%" PRIx64 " (%s), hops = %f\n", cl_ntoh64(osm_node_get_node_guid(p_best_sw->p_node)), - best_hops); + p_best_sw->p_node->print_desc, best_hops); else OSM_LOG(sm->p_log, OSM_LOG_VERBOSE, "No multicast capable switches detected\n"); @@ -352,8 +353,8 @@ static int mcast_mgr_set_mft_block(osm_sm_t * sm, IN osm_switch_t * p_sw, &context); if (status != IB_SUCCESS) { OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A02: " - "Sending multicast fwd. tbl. block failed (%s)\n", - ib_get_err_str(status)); + "Sending multicast fwd. tbl. block to %s failed (%s)\n", + p_node->print_desc, ib_get_err_str(status)); ret = -1; } } @@ -404,9 +405,10 @@ static void mcast_mgr_subdivide(osm_sm_t * sm, uint16_t mlid_ho, cl_ntoh64(osm_node_get_node_guid(p_sw->p_node)); OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A03: " "Error routing MLID 0x%X through
release of debug/test tools for dapl and verbs
hello, following software tools have been released in public domain on sourceforge: a. TED- test environment for dapl http://sourceforge.net/projects/testdebugdapl/ b. VERTDE - verbs testing and debugging environment http://sourceforge.net/projects/vertde/ both the tools are meant to assist in testing/verification/debugging of uDAPL/verbs implementation as well as the underlying hardware i.e. Host Channel Adapter (HCA). TED and VERTDE were created for internal usage but may be useful to the community involved in development of dapl/verbs software stacks. each tool provides a command line interface to enable protocol level testing of the respective library functions, device driver and HCA in an integrated manner. errors are logged. they support scripting for creating complex test cases. can be used over any implementation of uDAPL/verbs over IB. there will be regular updations with new features, bug fixes, docs etc. suggestions are welcome. thanks for your time. javed -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: release of debug/test tools for dapl and verbs
>can be used over any implementation of uDAPL/verbs over IB. there will be >regular updations with new features, bug fixes, docs etc. suggestions are >welcome. Will your tools work for iWARP adapters as well? Chien -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH]uDAPL v2 - ucm, scm: DAPL_GLOBAL_ROUTING enabled causes segv
socket cm and ud cm providers support QP modify with is_global set and GRH. New v2 providers didn't pass GID information in modify_qp RTR call and incorrectly byte swapped the already network order GID. Add debug print of GID during global modify. Signed-off-by: Arlin Davis --- dapl/openib_common/qp.c |9 +++-- dapl/openib_scm/cm.c|4 ++-- dapl/openib_ucm/cm.c|4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/dapl/openib_common/qp.c b/dapl/openib_common/qp.c index 143098e..eec5bf2 100644 --- a/dapl/openib_common/qp.c +++ b/dapl/openib_common/qp.c @@ -399,11 +399,16 @@ dapls_modify_qp_state(IN ib_qp_handle_t qp_handle, /* address handle. RC and UD */ qp_attr.ah_attr.dlid = ntohs(lid); if (ia_ptr->hca_ptr->ib_trans.global) { + dapl_dbg_log(DAPL_DBG_TYPE_EP, +" QPS_RTR: GID Subnet 0x" F64x " ID 0x" F64x "\n", +(unsigned long long)htonll(gid->global.subnet_prefix), +(unsigned long long)htonll(gid->global.interface_id)); + qp_attr.ah_attr.is_global = 1; qp_attr.ah_attr.grh.dgid.global.subnet_prefix = - ntohll(gid->global.subnet_prefix); + gid->global.subnet_prefix; qp_attr.ah_attr.grh.dgid.global.interface_id = - ntohll(gid->global.interface_id); + gid->global.interface_id; qp_attr.ah_attr.grh.hop_limit = ia_ptr->hca_ptr->ib_trans.hop_limit; qp_attr.ah_attr.grh.traffic_class = diff --git a/dapl/openib_scm/cm.c b/dapl/openib_scm/cm.c index 3201c9a..759e926 100644 --- a/dapl/openib_scm/cm.c +++ b/dapl/openib_scm/cm.c @@ -732,7 +732,7 @@ static void dapli_socket_connect_rtu(dp_ib_cm_handle_t cm_ptr) IBV_QPS_RTR, cm_ptr->msg.saddr.ib.qpn, cm_ptr->msg.saddr.ib.lid, - NULL) != DAT_SUCCESS) { + (ib_gid_handle_t)cm_ptr->msg.saddr.ib.gid) != DAT_SUCCESS) { dapl_log(DAPL_DBG_TYPE_ERR, " CONN_RTU: QPS_RTR ERR %s (%d,%d,%x,%x,%x) -> %s %x\n", strerror(errno), ep_ptr->qp_handle->qp_type, @@ -1107,7 +1107,7 @@ dapli_socket_accept_usr(DAPL_EP * ep_ptr, IBV_QPS_RTR, cm_ptr->msg.saddr.ib.qpn, cm_ptr->msg.saddr.ib.lid, - NULL) != DAT_SUCCESS) { + (ib_gid_handle_t)cm_ptr->msg.saddr.ib.gid) != DAT_SUCCESS) { dapl_log(DAPL_DBG_TYPE_ERR, " ACCEPT_USR: QPS_RTR ERR %s -> %s\n", strerror(errno), diff --git a/dapl/openib_ucm/cm.c b/dapl/openib_ucm/cm.c index b51556a..f5459c0 100644 --- a/dapl/openib_ucm/cm.c +++ b/dapl/openib_ucm/cm.c @@ -1019,7 +1019,7 @@ static void ucm_connect_rtu(dp_ib_cm_handle_t cm, ib_cm_msg_t *msg) IBV_QPS_RTR, cm->msg.daddr.ib.qpn, cm->msg.daddr.ib.lid, - NULL) != DAT_SUCCESS) { + (ib_gid_handle_t)cm->msg.daddr.ib.gid) != DAT_SUCCESS) { dapl_log(DAPL_DBG_TYPE_ERR, " CONN_RTU: QPS_RTR ERR %s <- lid %x iqp %x\n", strerror(errno), ntohs(cm->msg.daddr.ib.lid), @@ -1417,7 +1417,7 @@ dapli_accept_usr(DAPL_EP *ep, DAPL_CR *cr, DAT_COUNT p_size, DAT_PVOID p_data) IBV_QPS_RTR, cm->msg.daddr.ib.qpn, cm->msg.daddr.ib.lid, - NULL) != DAT_SUCCESS) { + (ib_gid_handle_t)cm->msg.daddr.ib.gid) != DAT_SUCCESS) { dapl_log(DAPL_DBG_TYPE_ERR, " ACCEPT_USR: QPS_RTR ERR %s -> lid %x qpn %x\n", strerror(errno), ntohs(cm->msg.daddr.ib.lid), -- 1.5.2.5 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] uDAPL v2 - openib_common: remote memory read privilege set multi times
cleanup duplicate setting of read privileges in dapls_convert_privileges Signed-off-by: Arlin Davis --- dapl/openib_common/mem.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/dapl/openib_common/mem.c b/dapl/openib_common/mem.c index b286f8c..ddf85a4 100644 --- a/dapl/openib_common/mem.c +++ b/dapl/openib_common/mem.c @@ -55,10 +55,6 @@ STATIC _INLINE_ int dapls_convert_privileges(IN DAT_MEM_PRIV_FLAGS privileges) access |= IBV_ACCESS_REMOTE_WRITE; if (DAT_MEM_PRIV_REMOTE_READ_FLAG & privileges) access |= IBV_ACCESS_REMOTE_READ; - if (DAT_MEM_PRIV_REMOTE_READ_FLAG & privileges) - access |= IBV_ACCESS_REMOTE_READ; - if (DAT_MEM_PRIV_REMOTE_READ_FLAG & privileges) - access |= IBV_ACCESS_REMOTE_READ; #ifdef DAT_EXTENSIONS if (DAT_IB_MEM_PRIV_REMOTE_ATOMIC & privileges) access |= IBV_ACCESS_REMOTE_ATOMIC; -- 1.5.2.5 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: RDMAoE verbs questions
> Yes, every Linux arch aligns structs to the min alignment for the > members, so at least 32 in this case. > > However, it doesn't really matter, look at ibv_cmd_query_port, it > doesn't zero the padding. So there must be an ABI bump to ensure that > new code links to a library that doesn't fill the new member with > garbage. > > This is a messy one, the low level libraries have to be reved somehow too.. > ops.query_port2() I guess. Actually I think we can fix this in libibverbs without having to break anything. It's a little bit devious, but if we do something like: // ... add link_layer member in padding of struct ibv_port_attr enum { IBV_LINK_LAYER_UNSPECIFIED, IBV_LINK_LAYER_INFINIBAND, IBV_LINK_LAYER_ETHERNET, }; static inline int __ibv_query_port(struct ibv_context *context, uint8_t port_num, struct ibv_port_attr *port_attr) { port_attr->link_layer = IBV_LINK_LAYER_UNSPECIFIED; return ibv_query_port(context, port_num, port_attr); } // ... rest of file... #define ibv_query_port(context, port_num, port_attr) \ __ibv_query_port(context, port_num, port_attr) then I think legacy apps should be OK (port_attr size doesn't change, binary compat is still there), and new apps that do check link_layer should also be OK ... if they use an old library and/or old driver, they'll see LINK_LAYER_UNSPECIFIED, which means that IBoE is not supported. What do you think, does this work? - R. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: RDMAoE verbs questions
On Fri, Dec 04, 2009 at 08:03:31PM -0800, Roland Dreier wrote: > then I think legacy apps should be OK (port_attr size doesn't change, > binary compat is still there), and new apps that do check link_layer > should also be OK ... if they use an old library and/or old driver, > they'll see LINK_LAYER_UNSPECIFIED, which means that IBoE is not supported. > > What do you think, does this work? Yeah, that should be fine, quite sneaky indeed.. Maybe zero the whole padding though, for future? Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html