[PATCH 2/3] OpenSM: don't remove our own SM port.
When cleaning up remotes of non reachable ports anymore. Make exception for our own local SM port. In that case port still be in SM DB and running single port mode is possible. Signed-off-by: Sasha Khapyorsky sash...@gmail.com --- opensm/osm_drop_mgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opensm/osm_drop_mgr.c b/opensm/osm_drop_mgr.c index b309273..5113fa2 100644 --- a/opensm/osm_drop_mgr.c +++ b/opensm/osm_drop_mgr.c @@ -114,7 +114,9 @@ static void drop_mgr_clean_physp(osm_sm_t * sm, IN osm_physp_t * p_physp) the remote port, since it is no longer reachable. This can be done if we reset the discovery count of the remote port. */ - if (!p_remote_physp-p_node-sw) { + if (!p_remote_physp-p_node-sw + p_remote_physp-port_guid != + sm-p_subn-sm_port_guid) { p_remote_port-discovery_count = 0; OSM_LOG(sm-p_log, OSM_LOG_DEBUG, Resetting discovery count of node: -- 1.8.1.2 -- 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: [PATCH] opensm: update internal PortInfo state for any ports
Hi Hal, On 09:37 Fri 12 Jul , Hal Rosenstock wrote: What difference does it make ? Does this patch fix some operational issue ? Is there any harm in not keeping the complete PortInfo when port is DOWN ? AFAIK it doesn't harm in the current state. However, I'm prepering the patches, which will let to OpenSM work on stand alone port. For such mode this fix is critical. Will recent with other patches shortly. Sasha -- 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 1/3] opensm: update internal PortInfo state for any ports
Should not be matter to keep internal SM's PortInfo data for ports in any states. Signed-off-by: Sasha Khapyorsky sash...@gmail.com --- opensm/osm_port.c | 33 - 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/opensm/osm_port.c b/opensm/osm_port.c index 6e73e66..d59d404 100644 --- a/opensm/osm_port.c +++ b/opensm/osm_port.c @@ -669,25 +669,16 @@ void osm_physp_set_port_info(IN osm_physp_t * p_physp, CL_ASSERT(p_pi); CL_ASSERT(osm_physp_is_valid(p_physp)); - if (ib_port_info_get_port_state(p_pi) == IB_LINK_DOWN) { - /* If PortState is down, only copy PortState */ - /* and PortPhysicalState per C14-24-2.1 */ - ib_port_info_set_port_state(p_physp-port_info, IB_LINK_DOWN); - ib_port_info_set_port_phys_state - (ib_port_info_get_port_phys_state(p_pi), -p_physp-port_info); - } else { - p_physp-port_info = *p_pi; - - /* The MKey in p_pi can only be considered valid if it's -* for a HCA/router or switch port 0, and it's either -* non-zero or the MKeyProtect bits are also zero. -*/ - if ((osm_node_get_type(p_physp-p_node) != -IB_NODE_TYPE_SWITCH || p_physp-port_num == 0) - (p_pi-m_key != 0 || ib_port_info_get_mpb(p_pi) == 0)) - osm_db_guid2mkey_set(p_sm-p_subn-p_g2m, -cl_ntoh64(p_physp-port_guid), -cl_ntoh64(p_pi-m_key)); - } + p_physp-port_info = *p_pi; + + /* The MKey in p_pi can only be considered valid if it's +* for a HCA/router or switch port 0, and it's either +* non-zero or the MKeyProtect bits are also zero. +*/ + if ((osm_node_get_type(p_physp-p_node) != IB_NODE_TYPE_SWITCH || +p_physp-port_num == 0) + (p_pi-m_key != 0 || ib_port_info_get_mpb(p_pi) == 0)) + osm_db_guid2mkey_set(p_sm-p_subn-p_g2m, +cl_ntoh64(p_physp-port_guid), +cl_ntoh64(p_pi-m_key)); } -- 1.8.1.2 -- 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 3/3] OpenSM: single port sweep
This provides possibility to keep SM/SA operational even in case when the local SM port was disconnected. It is needed in order to not break existing loopback connections. As side effect it let us to startup OpenSM on disconnected port. Signed-off-by: Sasha Khapyorsky sash...@gmail.com --- opensm/osm_state_mgr.c | 95 +- 1 file changed, 87 insertions(+), 8 deletions(-) diff --git a/opensm/osm_state_mgr.c b/opensm/osm_state_mgr.c index 1b73834..c586e64 100644 --- a/opensm/osm_state_mgr.c +++ b/opensm/osm_state_mgr.c @@ -1075,6 +1075,90 @@ int wait_for_pending_transactions(osm_stats_t * stats) return osm_exit_flag; } +static void single_node_sweep(osm_sm_t *sm) +{ + osm_opensm_report_event(sm-p_subn-p_osm, + OSM_EVENT_ID_HEAVY_SWEEP_DONE, NULL); + + OSM_LOG_MSG_BOX(sm-p_log, OSM_LOG_VERBOSE, HEAVY SWEEP COMPLETE); + + osm_drop_mgr_process(sm); + + /* +* If we are not MASTER already - this means that we are +* in discovery state. call osm_sm_state_mgr with signal +* DISCOVERY_COMPLETED +*/ + if (sm-p_subn-sm_state == IB_SMINFO_STATE_DISCOVERING) + osm_sm_state_mgr_process(sm, OSM_SM_SIGNAL_DISCOVERY_COMPLETED); + + osm_pkey_mgr_process(sm-p_subn-p_osm); + + /* try to restore SA DB (this should be before lid_mgr + because we may want to disable clients reregistration + when SA DB is restored) */ + osm_sa_db_file_load(sm-p_subn-p_osm); + + if (wait_for_pending_transactions(sm-p_subn-p_osm-stats)) + return; + + OSM_LOG_MSG_BOX(sm-p_log, OSM_LOG_VERBOSE, + PKEY setup completed - STARTING SM LID CONFIG); + + osm_lid_mgr_process_sm(sm-lid_mgr); + if (wait_for_pending_transactions(sm-p_subn-p_osm-stats)) + return; + + state_mgr_notify_lid_change(sm); + + /* At this point we need to check the consistency of +* the port_lid_tbl under the subnet. There might be +* errors in it if PortInfo Set requests didn't reach +* their destination. */ + state_mgr_check_tbl_consistency(sm); + + OSM_LOG_MSG_BOX(sm-p_log, OSM_LOG_VERBOSE, LID ASSIGNMENT COMPLETE); + + /* in any case we zero this flag */ + sm-p_subn-coming_out_of_standby = FALSE; + + /* If there were errors - then the subnet is not really up */ + if (sm-p_subn-subnet_initialization_error == TRUE) { + osm_log_v2(sm-p_log, OSM_LOG_SYS, FILE_ID, + Errors during initialization\n); + OSM_LOG_MSG_BOX(sm-p_log, OSM_LOG_ERROR, + ERRORS DURING INITIALIZATION); + } else { + sm-p_subn-need_update = 0; + osm_dump_all(sm-p_subn-p_osm); + state_mgr_up_msg(sm); + sm-p_subn-first_time_master_sweep = FALSE; + sm-p_subn-set_client_rereg_on_sweep = FALSE; + + if (OSM_LOG_IS_ACTIVE_V2(sm-p_log, OSM_LOG_VERBOSE) || + sm-p_subn-opt.sa_db_dump) + osm_sa_db_file_dump(sm-p_subn-p_osm); + } + + /* +* Finally signal the subnet up event +*/ + cl_event_signal(sm-subnet_up_event); + + osm_opensm_report_event(sm-p_subn-p_osm, OSM_EVENT_ID_SUBNET_UP, + NULL); + + /* if we got a signal to force heavy sweep or errors +* in the middle of the sweep - try another sweep. */ + if (sm-p_subn-force_heavy_sweep + || sm-p_subn-subnet_initialization_error) + osm_sm_signal(sm, OSM_SIGNAL_SWEEP); + + /* Write a new copy of our persistent guid2mkey database */ + osm_db_store(sm-p_subn-p_g2m); + osm_db_store(sm-p_subn-p_neighbor); +} + static void do_sweep(osm_sm_t * sm) { ib_api_status_t status; @@ -1234,15 +1318,10 @@ repeat_discovery: SM PORT DOWN); } - /* Run the drop manager - we want to clear all records */ - osm_drop_mgr_process(sm); - - /* Move to DISCOVERING state */ - if (sm-p_subn-sm_state != IB_SMINFO_STATE_DISCOVERING) - osm_sm_state_mgr_process(sm, OSM_SM_SIGNAL_DISCOVER); - osm_opensm_report_event(sm-p_subn-p_osm, - OSM_EVENT_ID_STATE_CHANGE, NULL); + /* special case - just loopback on disconnected node */ + single_node_sweep(sm); return; + } else { if (!sm-p_subn-last_sm_port_state) { sm-p_subn-last_sm_port_state = 1; -- 1.8.1.2 -- 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: update internal PortInfo state for any ports
Should not be matter to keep internal SM's PortInfo data for ports in any states. Signed-off-by: Sasha Khapyorsky sash...@gmail.com diff --git a/opensm/osm_port.c b/opensm/osm_port.c index 6e73e66..d59d404 100644 --- a/opensm/osm_port.c +++ b/opensm/osm_port.c @@ -669,25 +669,16 @@ void osm_physp_set_port_info(IN osm_physp_t * p_physp, CL_ASSERT(p_pi); CL_ASSERT(osm_physp_is_valid(p_physp)); - if (ib_port_info_get_port_state(p_pi) == IB_LINK_DOWN) { - /* If PortState is down, only copy PortState */ - /* and PortPhysicalState per C14-24-2.1 */ - ib_port_info_set_port_state(p_physp-port_info, IB_LINK_DOWN); - ib_port_info_set_port_phys_state - (ib_port_info_get_port_phys_state(p_pi), -p_physp-port_info); - } else { - p_physp-port_info = *p_pi; - - /* The MKey in p_pi can only be considered valid if it's -* for a HCA/router or switch port 0, and it's either -* non-zero or the MKeyProtect bits are also zero. -*/ - if ((osm_node_get_type(p_physp-p_node) != -IB_NODE_TYPE_SWITCH || p_physp-port_num == 0) - (p_pi-m_key != 0 || ib_port_info_get_mpb(p_pi) == 0)) - osm_db_guid2mkey_set(p_sm-p_subn-p_g2m, -cl_ntoh64(p_physp-port_guid), -cl_ntoh64(p_pi-m_key)); - } + p_physp-port_info = *p_pi; + + /* The MKey in p_pi can only be considered valid if it's +* for a HCA/router or switch port 0, and it's either +* non-zero or the MKeyProtect bits are also zero. +*/ + if ((osm_node_get_type(p_physp-p_node) != IB_NODE_TYPE_SWITCH || +p_physp-port_num == 0) + (p_pi-m_key != 0 || ib_port_info_get_mpb(p_pi) == 0)) + osm_db_guid2mkey_set(p_sm-p_subn-p_g2m, +cl_ntoh64(p_physp-port_guid), +cl_ntoh64(p_pi-m_key)); } -- 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: OFA Management maintainership
Hi, I'm finishing my work for Voltaire those days and wish to transfer my role as OFA management packages maintainer to Alex Netes ale...@voltaire.com which I know many years as a great experienced engineer and very good and positive person. So starting from today his trees should be considered as master development trees: git://git.openfabrics.org/~alexnetes/libibumad git://git.openfabrics.org/~alexnetes/opensm git://git.openfabrics.org/~alexnetes/libibmad git://git.openfabrics.org/~alexnetes/infiniband-diags git://git.openfabrics.org/~alexnetes/ibsim It is also likely that in a near feature maintainerships of libibumad and infiniband-diags will be taken by Ira Weiny wei...@llnl.gov. I would like to wish to Alex and Ira a lot of success with their roles. Also I would like to thank a whole community for good working time. I still be reachable by my email address sashakv...@gmail.com, so feel free to contact me in case of any question. Sasha -- 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: OFA Management maintainership
On 14:17 Wed 09 Feb , Hal Rosenstock wrote: It is also likely that in a near feature maintainerships of libibumad and infiniband-diags will be taken by Ira Weiny wei...@llnl.gov. Do you mean libibmad rather than libibumad ? Yes, sure - libibmad. Sasha -- 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: [PATCH V2] Add node/port/qos information to some error messages
On 19:21 Thu 27 Jan , Ira Weiny wrote: From: Ira Weiny wei...@llnl.gov Date: Tue, 25 Jan 2011 17:09:04 -0800 Subject: [PATCH] Add node/port/qos information to some error messages V2: further cleanup of text include MultiPathRecord messages add qos information where appropriate Signed-off-by: Ira Weiny wei...@llnl.gov Applied. Thanks. Sasha -- 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: [PATCH 00/13] opensm: Cleanups and more documentation for torus-2QoS patchset
Hi Jim, On 15:11 Fri 12 Nov , Jim Schutt wrote: These patches clean up and add documentation to the torus-2QoS routing module for OpenSM. They apply on top of my previous bug-fix patchset from September (http://www.spinics.net/lists/linux-rdma/msg05809.html), which applies to your torus-2qos branch. Following your and others feedback. I've merge torus-2qos branch upstream. Thanks. Sasha -- 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: RFC: Splitting of the management git tree in Open Fabrics
Hi, On 12:51 Tue 31 Aug , Ira Weiny wrote: On openfabrics.org/git split management.git into the following trees. openfabrics.org/git/infiniband-diags.git openfabrics.org/git/libibumad.git openfabrics.org/git/libibmad.git openfabrics.org/git/opensm.git Sasha can populate those from the current management tree. We believe there are git commands which will do this without losing any history from the git trees. As was already discussed. I'm going to split management tree into separate libibumad, libibmad, opensm and infiniband-diags trees and will publish this soon (few days). The history will be preserved as per sub-tree. Sasha -- 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: [PATCH] infiniband-diags: Verify timeout value specified to diagnostics
On 11:47 Wed 15 Dec , Ira Weiny wrote: Verify timeout value specified to diagnostics Signed-off-by: Ira Weiny wei...@hype137.llnl.gov Applied. Thanks. Sasha -- 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: [PATCH] replace (long*)(long) casting with transportable data type (uintptr_t)
On 15:18 Tue 07 Dec , Smith, Stan wrote: We should return to my original patch submission. remove the (long*) (long) and replace with (uintptr_t) -(osmv_query_req_t *) (long *)(long)(p_madw-context.ni_context. -node_guid); +(osmv_query_req_t *) (uintptr_t) p_madw-context.ni_context.node_guid; Sasha, can you take care of this? Done. Thanks. Sasha -- 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: ibnetdiscover issue
Hi Tom, On 16:14 Wed 08 Dec , Tom Ammon wrote: Is there a quick workaround we could put in place? I want to map out our fabric, and I especially need the spine GUIDs on the GD4200 because I'm going to be doing up/down routing and want to specify the root GUIDs. I can also submit a support case to Voltaire, if you think that would make it go faster. I want to make sure we are using OFED as distributed from OFA. As far as I can see ibnetdiscover supports 4200 device. Could you rerun ibnetdiscover without '-g' option and send me results? Sasha Tom On 12/8/2010 11:28 AM, Hal Rosenstock wrote: Hi Tom, On 12/8/2010 12:48 PM, Tom Ammon wrote: Hi, I get the following when I try to run ibnetdiscover from a server plugged in to a voltaire 4036 switch. We're using OFED 1.5.2: [r...@sm1 ~]# ibnetdiscover src/chassis.c:535; Unexpected node found: guid 0x0008f1050075134c ibnetdiscover: iberror: failed: discover failed Looks to me like there's a missing is_spine_4200() clause missing in get_router_slot in libibnetdisc/src/chassis.c. Eli had added changes to support the 4200 so he's the best one to comment. -- Hal However, ibdiagnet runs fine: [r...@sm1 ~]# ibdiagnet Loading IBDIAGNET from: /usr/lib64/ibdiagnet1.5.4 -W- Topology file is not specified. Reports regarding cluster links will use direct routes. Loading IBDM from: /usr/lib64/ibdm1.5.4 -I- Using port 1 as the local port. -I- Discovering ... 277 nodes (23 Switches 254 CA-s) discovered. -I--- -I- Bad Guids/LIDs Info -I--- -I- No bad Guids were found -I--- -I- Links With Logical State = INIT -I--- -I- No bad Links (with logical state = INIT) were found -I--- -I- General Device Info -I--- -I--- -I- PM Counters Info -I--- -W- lid=0x0007 guid=0x0008f105006515ba dev=23131 Port=33 Performance Monitor counter : Value link_error_recovery_counter : 0xff (overflow) -W- lid=0x0010 guid=0x0008f10500201d7c dev=23130 Port=14 Performance Monitor counter : Value symbol_error_counter : 0x (overflow) -W- lid=0x0001 guid=0x0008f10500108a76 dev=23130 Port=30 Performance Monitor counter : Value symbol_error_counter : 0x (overflow) -I--- -I- Fabric Partitions Report (see ibdiagnet.pkey for a full hosts list) -I--- -I- PKey:0x7fff Hosts:254 full:254 limited:0 -I--- -I- IPoIB Subnets Check -I--- -I- Subnet: IPv4 PKey:0x7fff QKey:0x0b1b MTU:2048Byte rate:10Gbps SL:0x00 -I--- -I- Bad Links Info -I- No bad link were found -I--- -I- Stages Status Report: STAGE Errors Warnings Bad GUIDs/LIDs Check 0 0 Link State Active Check 0 0 General Devices Info Report 0 0 Performance Counters Report 0 3 Partitions Check 0 0 IPoIB Subnets Check 0 0 Please see /tmp/ibdiagnet.log for complete log -I- Done. Run time was 21 seconds. Any ideas? Tom -- 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 -- Tom Ammon Network Engineer Office: 801.587.0976 Mobile: 801.674.9273 Center for High Performance Computing University of Utah http://www.chpc.utah.edu -- 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 -- 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: [PATCH] replace (long*)(long) casting with transportable data type (uintptr_t)
On 15:55 Mon 06 Dec , Stan C. Smith wrote: Hello, Your suggestion of removing extra casts does operate correctly under windows x64/x86 variants. Windows compilers have improved. thanks, Stan. Signed-off-by: stan smith stan.sm...@intel.com Applied. Thanks. Sasha -- 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: [PATCH 0/2] opensm: Bug fixes for torus-2QoS patchset
On 11:03 Fri 17 Sep , Jim Schutt wrote: Hi Sasha, These patches fix bugs discovered during further testing of the torus-2QoS routing module for OpenSM. They apply to your torus-2qos branch. Thanks -- Jim Jim Schutt (2): opensm/osm_torus.c: Add check for invalid topology discovery due to user misconfiguration. opensm/osm_torus.c: Handle calloc() failure on routing engine context creation. opensm/opensm/osm_torus.c | 24 +++- 1 files changed, 23 insertions(+), 1 deletions(-) Applied. Thanks. Sasha -- 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: [PATCH] infiniband-diags/ibtracert: Eliminate direct route (-D) option
On 11:10 Tue 14 Sep , Hal Rosenstock wrote: Direct route does not make sense as an ibtracert option so eliminate it. Signed-off-by: Hal Rosenstock h...@mellanox.com Applied. Thanks. Sasha -- 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: [PATCH 00/13] opensm: Cleanups and more documentation for torus-2QoS patchset
On 15:11 Fri 12 Nov , Jim Schutt wrote: Hi Sasha, These patches clean up and add documentation to the torus-2QoS routing module for OpenSM. They apply on top of my previous bug-fix patchset from September (http://www.spinics.net/lists/linux-rdma/msg05809.html), which applies to your torus-2qos branch. Applied. Thanks. Sasha -- 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: [PATCH] infiniband-diags/saquery.c: In dump_one_mcmember_record, fix flow label endian
On 09:06 Wed 27 Oct , Hal Rosenstock wrote: Already in host endian Signed-off-by: Hal Rosenstock h...@mellanox.com Applied by hands (the patch was malformed). Thanks. Sasha --- diff --git a/infiniband-diags/src/saquery.c b/infiniband-diags/src/saquery.c index cb4fc18..18c5a1c 100644 --- a/infiniband-diags/src/saquery.c +++ b/infiniband-diags/src/saquery.c @@ -1,7 +1,7 @@ /* * Copyright (c) 2006,2007 The Regents of the University of California. * Copyright (c) 2004-2009 Voltaire, Inc. All rights reserved. - * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved. + * Copyright (c) 2002-2010 Mellanox Technologies LTD. All rights reserved. * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. * Copyright (c) 2009 HNR Consulting. All rights reserved. * @@ -461,7 +461,7 @@ static void dump_one_mcmember_record(void *data) inet_ntop(AF_INET6, mr-port_gid.raw, gid, sizeof(gid)), cl_ntoh32(mr-qkey), cl_ntoh16(mr-mlid), mr-mtu, mr-tclass, cl_ntoh16(mr-pkey), mr-rate, mr-pkt_life, sl, -cl_ntoh32(flow), hop, scope, join, mr-proxy_join); +flow, hop, scope, join, mr-proxy_join); } static void dump_multicast_group_record(void *data) -- 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: [PATCH] infiniband-diags/iblinkinfo.c: Limit some queries to switches
On 08:47 Wed 27 Oct , Hal Rosenstock wrote: infiniband-diags/iblinkinfo.c: Limit certain queries to switches iblinkinfo man page says: DESCRIPTION iblinkinfo reports the link info for each port of each switch active in the IB fabric. OPTIONS -S guid Output only the switch specified by guid (hex format) -D direct_route Output only the switch specified by the direct route path. Queries by DR path or GUID should (also) be limited to switches. Signed-off-by: Hal Rosenstock h...@mellanox.com Applied by hands (the patch is malformed). Thanks. Sasha --- diff --git a/infiniband-diags/src/iblinkinfo.c b/infiniband-diags/src/iblinkinfo.c index d0c9b13..b129cb6 100644 --- a/infiniband-diags/src/iblinkinfo.c +++ b/infiniband-diags/src/iblinkinfo.c @@ -2,6 +2,7 @@ * Copyright (c) 2004-2009 Voltaire Inc. All rights reserved. * Copyright (c) 2007 Xsigo Systems Inc. All rights reserved. * Copyright (c) 2008 Lawrence Livermore National Lab. All rights reserved. + * Copyright (c) 2010 Mellanox Technologies LTD. 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 @@ -387,7 +388,7 @@ int main(int argc, char **argv) if (!all guid_str) { ibnd_node_t *sw = ibnd_find_node_guid(fabric, guid); - if (sw) + if (sw sw-type == IB_NODE_TYPE_SWITCH) print_switch(sw, NULL); else fprintf(stderr, Failed to find switch: %s\n, @@ -402,7 +403,7 @@ int main(int argc, char **argv) mad_decode_field(ni, IB_NODE_GUID_F, (guid)); sw = ibnd_find_node_guid(fabric, guid); - if (sw) + if (sw sw-type == IB_NODE_TYPE_SWITCH) print_switch(sw, NULL); else fprintf(stderr, Failed to find switch: %s\n, dr_path); -- 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 -- 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: [PATCH][TRIVIAL] opensm: Fix some typos
On 09:46 Mon 27 Sep , Hal Rosenstock wrote: Fix some typos in the opensm man page (man/opensm.8.in) and in the partition config doc (doc/partition-config.txt) Signed-off-by: Hal Rosenstock h...@mellanox.com Applied. Thanks. Sasha -- 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: [PATCH] osmtest/osmt_service.c: In osmt_run_service_records_flow, add missing status
On 09:40 Mon 27 Sep , Hal Rosenstock wrote: When deleting ServiceRecord for service_name[6] fails, error status should be set. Signed-off-by: Hal Rosenstock h...@mellanox.com Applied. Thanks. Sasha -- 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: [PATCH] opensm/osm_ucast_ftree: When roots are not connected, update hop count but not lft
On 09:32 Mon 27 Sep , Hal Rosenstock wrote: When roots are not connected, neither hops nor lfts are updated for root switch port 0s. This causes a problem for multicast (looping) where switch port 0s can join. Solution proposed by Yevgeny is to treat this as updn does and update the hop count but not new_lft. Signed-off-by: Hal Rosenstock h...@mellanox.com Applied. Thanks. Sasha -- 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: [PATCH] opensm/osm_trap_rcv.c: No need to check for sweep for trap 145
On 11:38 Thu 17 Jun , Hal Rosenstock wrote: Trap 145 merely carries the SystemImageGUID (and indication that it changed) so there is no need (to even check) for sweep Signed-off-by: Hal Rosenstock hal.rosenst...@gmail.com Applied. Thanks. Sasha -- 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: [PATCH] opensm/osm_trap_rcv.c: fix possible core dump
On 17:53 Tue 07 Sep , Yevgeny Kliteynik wrote: Handle the case when source physical port for trap 145 wasn't found. Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] opensm/osm_ucast_ftree.c: fix small memory leak in error path
On 18:11 Tue 07 Sep , Yevgeny Kliteynik wrote: Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] opensm/osm_ucast_ftree.c: fixing another memory leak at error path
On 18:11 Tue 07 Sep , Yevgeny Kliteynik wrote: Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] opensm/osm_ucast_lash.c: small bug in calculating allocated size
On 18:15 Tue 07 Sep , Yevgeny Kliteynik wrote: Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] opensm/osm_pkey_mgr.c: fixing small memory leak
On 18:15 Tue 07 Sep , Yevgeny Kliteynik wrote: Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] opensm/osm_ucast_file.c: closing file descriptor in error path
On 18:16 Tue 07 Sep , Yevgeny Kliteynik wrote: Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] opensm/osm_qos_parser_y.y: fixing bunch of memory leaks on invalid values
On 18:17 Tue 07 Sep , Yevgeny Kliteynik wrote: Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH v2] opensm/osm_console.c: fix memory and file descriptor leaks
On 22:30 Tue 07 Sep , Yevgeny Kliteynik wrote: Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] opensm/st.c: fix potential core dumps
On 18:18 Tue 07 Sep , Yevgeny Kliteynik wrote: If we're out of polynomials, new_size() will return -1 Deal with this in low-level calls. Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH V2] libibmad/fields.c: Change all PortCounter names to match the Specification
On 12:13 Wed 08 Sep , Ira Weiny wrote: From: Ira Weiny wei...@llnl.gov Date: Tue, 3 Aug 2010 10:40:56 -0700 Subject: [PATCH V2] libibmad/fields.c: Change all PortCounter names to match the Specification Change from V1: Add name change to scripts in infiniband-diags Signed-off-by: Ira Weiny wei...@llnl.gov Applied. Thanks. Sasha -- 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: [PATCH] replace (long*)(long) casting with transportable data type (uintptr_t)
On 14:12 Thu 09 Sep , Stan C. Smith wrote: Hello, In osm_vendor_ibumad_sa.c the casting of a pointer to a long causes data truncation problems in 64-bit Windows where sizeof(long) != sizeof(void*). 'uintptr_t' is correct in both operating environments. Wouldn't it be better to remove those additional castings at all? Like below? thank you, stan. signed-off-by: stan smith stan.sm...@intel.com diff --git a/opensm/libvendor/osm_vendor_ibumad_sa.c b/opensm/libvendor/osm_vendor_ibumad_sa.c index 1fdcc47..9180972 100644 --- a/opensm/libvendor/osm_vendor_ibumad_sa.c +++ b/opensm/libvendor/osm_vendor_ibumad_sa.c @@ -85,7 +85,7 @@ __osmv_sa_mad_rcv_cb(IN osm_madw_t * p_madw, /* obtain the sent context since we store it during send in the ni_ctx */ p_query_req_copy = - (osmv_query_req_t *) (long *)(long)(p_req_madw-context.ni_context. + (osmv_query_req_t *) (uintptr_t)(p_req_madw-context.ni_context. node_guid); p_query_req_copy = (osmv_query_req_t *) p_req_madw-context.ni_context.node_guid; /* provide the context of the original request in the result */ @@ -181,7 +181,7 @@ static void __osmv_sa_mad_err_cb(IN void *bind_context, IN osm_madw_t * p_madw) /* Obtain the sent context etc */ p_query_req_copy = - (osmv_query_req_t *) (long *)(long)(p_madw-context.ni_context. + (osmv_query_req_t *) (uintptr_t)(p_madw-context.ni_context. node_guid); p_query_req_copy = (osmv_query_req_t *) p_madw-context.ni_context.node_guid; /* provide the context of the original request in the result */ @@ -433,7 +433,7 @@ __osmv_send_sa_req(IN osmv_sa_bind_info_t * p_bind, } *p_query_req_copy = *p_query_req; p_madw-context.ni_context.node_guid = - (ib_net64_t) (long)p_query_req_copy; + (ib_net64_t) (uintptr_t)p_query_req_copy; p_madw-context.ni_context.node_guid = (ib_net64_t) p_query_req_copy; ? Sasha /* we can support async as well as sync calls */ sync = ((p_query_req-flags OSM_SA_FLAGS_SYNC) == OSM_SA_FLAGS_SYNC); -- 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: [PATCH v2] opensm: bug in trap report for MC create(66) and delete(67) traps
On 19:43 Thu 04 Feb , Eli Dorfman (Voltaire) wrote: Subject: [PATCH] Wrong handling of MC create and delete traps For these traps the GID in the data details is the MGID and not the source port gid. So the SM should check that subscriber port has the pkey of the MC group. There was also an error in comparing the subnet prefix and guid due to host/network order mismatch. Signed-off-by: Eli Dorfman e...@voltaire.com Rebased and applied. Thanks. Sasha -- 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: osm_vl15intf.c: fixing use-after-free coredump
On 13:04 Mon 11 Oct , Yevgeny Kliteynik wrote: p_madw is freed if responce is not expected. Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH management.git] Fix autotools to include the necessary M4 files
On 12:14 Mon 25 Oct , Jason Gunthorpe wrote: vs after patching: jggl{jgg}/tmp/ofa/management/libibumad#./autogen.sh + aclocal -I config + libtoolize --force --copy libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'. libtoolize: copying file `config/ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `config'. libtoolize: copying file `config/libtool.m4' libtoolize: copying file `config/ltoptions.m4' libtoolize: copying file `config/ltsugar.m4' libtoolize: copying file `config/ltversion.m4' libtoolize: copying file `config/lt~obsolete.m4' + autoheader + automake --foreign --add-missing --copy + autoconf Much happier. Ok. I see now. Sasha -- 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: [PATCH management.git] Fix autotools to include the necessary M4 files
On 16:33 Thu 07 Oct , Jason Gunthorpe wrote: Otherwise running autogen.sh with a new version of autotools and then building on a system with an older version tends to explode. Unfortunately this is sometimes necessary since the new version is required by the package. This is how GNU envisions this mess works at least.. Signed-off-by: Jason Gunthorpe jguntho...@obsidianresearch.com Applied. Thanks. Sasha -- 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: [PATCH] opensm/osm_state_mgr.c: Don't signal DISCOVER to SM state machine when already DISCOVERING
On 09:16 Mon 04 Oct , Hal Rosenstock wrote: Eliminate this illegal state machine transition which triggers the following log message: sm_state_mgr_signal_error: ERR 3207: Invalid signal OSM_SM_SIGNAL_DISCOVER in state DISCOVERING This is observed when the SM port is down. Signed-off-by: Hal Rosenstock h...@mellanox.com Applied. Thanks. Sasha -- 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: [PATCH] umad.{c,h}: moving stdlib.h include from C to H file
On 12:37 Mon 04 Oct , Yevgeny Kliteynik wrote: umad.h uses size_t type, which requires stdlib.h Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] ibstat.c: fix core dump if wrong port phys state is reported
On 12:16 Mon 04 Oct , Yevgeny Kliteynik wrote: Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] opensm/osm_helper.c: use ARR_SIZE macro instead of hardcoded values
On 11:56 Sun 12 Sep , Yevgeny Kliteynik wrote: Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] opensm/osm_helper.c: fix potential overrun of the array
On 18:02 Tue 07 Sep , Yevgeny Kliteynik wrote: Max index of the ib_sm_method_str[] static array is 0x20. Fixing OSM_SM_METHOD_STR_UNKNOWN_VAL to match this value. Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] opensm/osm_helper.c: cosmetics - move define closer to the relevant code
On 18:03 Tue 07 Sep , Yevgeny Kliteynik wrote: OSM_SA_METHOD_STR_UNKNOWN_VAL refers to ib_sa_method_str[]. Moving it closer to the array. Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] opensm/osm_subnet.c: fixing small bug in error path
On 18:04 Tue 07 Sep , Yevgeny Kliteynik wrote: Closing file on failure Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] opensm/osm_db_files.c: fix small memory leak
On 18:05 Tue 07 Sep , Yevgeny Kliteynik wrote: Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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/osm_db_files.c: malloc() return value run-time check
Check a return value of malloc() run-time instead of debug macro. Signed-off-by: Sasha Khapyorsky sas...@voltaire.com --- opensm/opensm/osm_db_files.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/opensm/opensm/osm_db_files.c b/opensm/opensm/osm_db_files.c index 07a9ce0..18ac830 100644 --- a/opensm/opensm/osm_db_files.c +++ b/opensm/opensm/osm_db_files.c @@ -157,7 +157,10 @@ int osm_db_init(IN osm_db_t * p_db, IN osm_log_t * p_log) OSM_LOG_ENTER(p_log); p_db_imp = malloc(sizeof(osm_db_imp_t)); - CL_ASSERT(p_db_imp != NULL); + if (!p_db_imp) { + OSM_LOG(p_log, OSM_LOG_ERROR, ERR 6100: No memory.\n); + return -1; + } p_db_imp-db_dir_name = getenv(OSM_CACHE_DIR); if (!p_db_imp-db_dir_name || !(*p_db_imp-db_dir_name)) -- 1.7.0.4 -- 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
git.openfabrics.org DNS names
Hi, What is going with git.openfabrics.org names? Seems that it is pointed another machine now without git and gitweb working. Sasha -- 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: Multicast group pre-creation for TopSpin old stack
On 17:13 Mon 06 Sep , Roland Dreier wrote: It's been carried forward just in case anyone was still running the old TS stack. It's always hard to determine the negative (when no one is using it any longer) (with the latest OpenSM) but it may be high time to deprecate this. Is anyone still using the old TS stack ? If so, is it used with OpenSM ? Maybe Roland has insight into whether the old TS stack might be being used with (the latest) OpenSM. Seems a fairly remote possibility but on the other hand I guess I could see someone buying old Topspin equipment on ebay and wanting to use it with modern software. As far as I could understand this TS multicast group only impacts IPoIB communication between two TS stack clients. If so then it is likely that just using old Topspin switch will not activate this flow anyway. Right? In any case, if carrying this workaround forward costs anything, I think it could be dropped. Ok, I think we can remove this then. Sasha -- 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: [PATCH] opensm/osm_prtn.c: removing TopSpin hack
On 17:50 Tue 07 Sep , Yevgeny Kliteynik wrote: Removing hack that was supposed to support TopSpin's non-compliant join compmask for IPoIB v4 multicast group ff12:401b:pkey::1 Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] opensm/osm_db_files.c: remove bad free() call
On 17:52 Tue 07 Sep , Yevgeny Kliteynik wrote: p_key is a parameter, and it is char[]. It shouldn't be freed here. I don't see this. st_delete() call: if (st_delete(p_domain_imp-p_hash, (void *)p_key, (void *)p_prev_val)) { ... free(p_key); ... } overwrites those value by pointers to key values stored in the hash table (then 1 is returned). Sasha Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il --- opensm/opensm/osm_db_files.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/opensm/opensm/osm_db_files.c b/opensm/opensm/osm_db_files.c index dd9f772..c475004 100644 --- a/opensm/opensm/osm_db_files.c +++ b/opensm/opensm/osm_db_files.c @@ -582,7 +582,6 @@ int osm_db_delete(IN osm_db_domain_t * p_domain, IN char *p_key) p_key, p_domain_imp-file_name, p_prev_val); res = 1; } else { - free(p_key); free(p_prev_val); res = 0; } -- 1.6.2.4 -- 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: [PATCH] opensm/osm_trap_rcv.c: fix possible core dump
On 17:53 Tue 07 Sep , Yevgeny Kliteynik wrote: Handle the case when source physical port for trap 145 wasn't found. Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il --- opensm/opensm/osm_trap_rcv.c | 14 ++ 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/opensm/opensm/osm_trap_rcv.c b/opensm/opensm/osm_trap_rcv.c index 500632c..9f39644 100644 --- a/opensm/opensm/osm_trap_rcv.c +++ b/opensm/opensm/osm_trap_rcv.c @@ -510,10 +510,16 @@ static void trap_rcv_process_request(IN osm_sm_t * sm, ERR 3812: No physical port found for trap 144: \node description update\\n); goto check_sweep; - } else if (cl_ntoh16(p_ntci-g_or_v.generic.trap_num) == 145) - /* this assumes that trap 145 content is not broken? */ - p_physp-p_node-node_info.sys_guid = - p_ntci-data_details.ntc_145.new_sys_guid; + } else if (cl_ntoh16(p_ntci-g_or_v.generic.trap_num) == 145) { + if (p_physp) + /* this assumes that trap 145 content is not broken? */ + p_physp-p_node-node_info.sys_guid = + p_ntci-data_details.ntc_145.new_sys_guid; + else + OSM_LOG(sm-p_log, OSM_LOG_ERROR, + ERR 3813: No physical port found for + trap 145: \SystemImageGUID update\\n); + } Wouldn't it be better to make such check for all traps and not separately for selected values? Sasha check_sweep: /* do a sweep if we received a trap */ -- 1.6.2.4 -- 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: [PATCH] libvendor/osm_vendor_mlx_sa.c: remove useless if statement
On 22:34 Tue 07 Sep , Yevgeny Kliteynik wrote: Content of p_query_req_copy is used in the function, so no point checking if it's NULL before the free() Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] opensm/osm_mtree.c: removing useless 'if' statement
On 17:53 Tue 07 Sep , Yevgeny Kliteynik wrote: p_mtn-max_children is an array - no point checking if it is NULL. Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: git.openfabrics.org DNS names
Hi Jeff, On 09:51 Tue 07 Sep , Jeff Becker wrote: Sorry for the outage. It's being worked on... Now I have this for couple of hours: Could not resolve hostname git.openfabrics.org: Name or service not known Sasha -- 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/sa: simplify osm_mcmr_rcv_find_or_create_new_mgrp() function call
Simplify osm_mcmr_rcv_find_or_create_new_mgrp() function call so that it will return the pointer to created of found MC group. Signed-off-by: Sasha Khapyorsky sas...@voltaire.com --- opensm/include/opensm/osm_sa.h | 15 +++ opensm/opensm/osm_prtn.c | 20 ++-- opensm/opensm/osm_sa.c |8 opensm/opensm/osm_sa_mcmember_record.c | 21 ++--- 4 files changed, 31 insertions(+), 33 deletions(-) diff --git a/opensm/include/opensm/osm_sa.h b/opensm/include/opensm/osm_sa.h index d516310..7c1061d 100644 --- a/opensm/include/opensm/osm_sa.h +++ b/opensm/include/opensm/osm_sa.h @@ -472,22 +472,21 @@ int osm_sa_db_file_load(struct osm_opensm *p_osm); * SYNOPSIS */ -ib_api_status_t -osm_mcmr_rcv_find_or_create_new_mgrp(IN osm_sa_t * sa, IN ib_net64_t comp_mask, -IN ib_member_rec_t * p_recvd_mcmember_rec, -OUT osm_mgrp_t ** pp_mgrp); +osm_mgrp_t *osm_mcmr_rcv_find_or_create_new_mgrp(IN osm_sa_t * sa, +IN ib_net64_t comp_mask, +IN ib_member_rec_t * +p_recvd_mcmember_rec); /* * PARAMETERS * p_sa * [in] Pointer to an osm_sa_t object. +* comp_mask +* [in] SA query component mask * p_recvd_mcmember_rec * [in] Received Multicast member record * -* pp_mgrp -* [out] pointer the osm_mgrp_t object -* * RETURN VALUES -* IB_SUCCESS, IB_ERROR +* The pointer to MC group object found or created, NULL in case of errors * */ diff --git a/opensm/opensm/osm_prtn.c b/opensm/opensm/osm_prtn.c index 4b087a4..6a23c76 100644 --- a/opensm/opensm/osm_prtn.c +++ b/opensm/opensm/osm_prtn.c @@ -174,9 +174,8 @@ ib_api_status_t osm_prtn_add_mcgroup(osm_log_t * p_log, osm_subn_t * p_subn, ib_member_rec_t mc_rec; ib_net64_t comp_mask; ib_net16_t pkey; - osm_mgrp_t *p_mgrp = NULL; + osm_mgrp_t *mgrp; osm_sa_t *p_sa = p_subn-p_osm-sa; - ib_api_status_t status = IB_SUCCESS; uint8_t hop_limit; pkey = p-pkey | cl_hton16(0x8000); @@ -197,24 +196,25 @@ ib_api_status_t osm_prtn_add_mcgroup(osm_log_t * p_log, osm_subn_t * p_subn, mc_rec.pkt_life = p_subn-opt.subnet_timeout; mc_rec.sl_flow_hop = ib_member_set_sl_flow_hop(p-sl, 0, hop_limit); /* Scope in MCMemberRecord (if present) needs to be consistent with MGID */ - mc_rec.scope_state = ib_member_set_scope_state(scope, IB_MC_REC_STATE_FULL_MEMBER); + mc_rec.scope_state = + ib_member_set_scope_state(scope, IB_MC_REC_STATE_FULL_MEMBER); ib_mgid_set_scope(mc_rec.mgid, scope); /* don't update rate, mtu */ comp_mask = IB_MCR_COMPMASK_MTU | IB_MCR_COMPMASK_MTU_SEL | IB_MCR_COMPMASK_RATE | IB_MCR_COMPMASK_RATE_SEL; - status = osm_mcmr_rcv_find_or_create_new_mgrp(p_sa, comp_mask, mc_rec, - p_mgrp); - if (!p_mgrp || status != IB_SUCCESS) + mgrp = osm_mcmr_rcv_find_or_create_new_mgrp(p_sa, comp_mask, mc_rec); + if (!mgrp) { OSM_LOG(p_log, OSM_LOG_ERROR, Failed to create MC group with pkey 0x%04x\n, cl_ntoh16(pkey)); - if (p_mgrp) { - p_mgrp-well_known = TRUE; - p-mgrp = p_mgrp; + return IB_ERROR; } - return status; + mgrp-well_known = TRUE; + p-mgrp = mgrp; + + return IB_SUCCESS; } static uint16_t generate_pkey(osm_subn_t * p_subn) diff --git a/opensm/opensm/osm_sa.c b/opensm/opensm/osm_sa.c index ef9872d..812e435 100644 --- a/opensm/opensm/osm_sa.c +++ b/opensm/opensm/osm_sa.c @@ -741,10 +741,10 @@ static osm_mgrp_t *load_mcgroup(osm_opensm_t * p_osm, ib_net16_t mlid, comp_mask = IB_MCR_COMPMASK_MTU | IB_MCR_COMPMASK_MTU_SEL | IB_MCR_COMPMASK_RATE | IB_MCR_COMPMASK_RATE_SEL; - if (osm_mcmr_rcv_find_or_create_new_mgrp(p_osm-sa, -comp_mask, p_mcm_rec, -p_mgrp) != IB_SUCCESS || - !p_mgrp || p_mgrp-mlid != mlid) { + if (!(p_mgrp = osm_mcmr_rcv_find_or_create_new_mgrp(p_osm-sa, + comp_mask, + p_mcm_rec)) || + p_mgrp-mlid != mlid) { OSM_LOG(p_osm-log, OSM_LOG_ERROR, cannot create MC group with mlid 0x%04x and mgid 0x%016 PRIx64 :0x%016 PRIx64 \n, cl_ntoh16(mlid), diff --git a/opensm/opensm/osm_sa_mcmember_record.c b/opensm/opensm/osm_sa_mcmember_record.c index 93c2767..b2318ec 100644 --- a/opensm/opensm
Re: [PATCH] opensm/osm_pkey.c: removing unused function
On 17:55 Tue 07 Sep , Yevgeny Kliteynik wrote: Removing unused (and, may I add, buggy) function. Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] opensm/osm_sa_pkey_record.c: removing unused variable
On 17:57 Tue 07 Sep , Yevgeny Kliteynik wrote: Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] opensm/osm_sa_vlarb_record.c: removed unused variable
On 17:59 Tue 07 Sep , Yevgeny Kliteynik wrote: Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] opensm/osm_node_info_rcv.c: remove useless code line
On 17:58 Tue 07 Sep , Yevgeny Kliteynik wrote: Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] infiniband-diags: Do not exit when unexpected node found
On 11:28 Sun 05 Sep , Eli Dorfman (Voltaire) wrote: Show error message but do not exit when unexpected node is found. Signed-off-by: Eli Dorfman e...@voltaire.com Applied. Thanks. Sasha -- 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: [PATCH] inifiband-diags: Support Voltaire switch ISR4200
On 11:30 Sun 05 Sep , Eli Dorfman (Voltaire) wrote: Support Voltaire switch (ISR4200) grouping. Signed-off-by: Eli Dorfman e...@voltaire.com Applied. Thanks. Sasha -- 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: Multicast group pre-creation for TopSpin old stack
Hi Yevgeny, On 12:07 Sun 05 Sep , Yevgeny Kliteynik wrote: There's a hack in the SM to deal with TopSpin's non-compliant join compmask for IPoIB v4 multicast group ff12:401b:pkey::1 The group is pre-defined and maintained as a well-known multicast group. opensm/osm_prtn.c: 232 /* workaround for TS */ 233 /* FIXME: remove this upon TS fixes */ 234 mc_rec.mgid = osm_ts_ipoib_mgid; 235 memcpy(mc_rec.mgid.raw[4], pkey, sizeof(pkey)); 236 /* Scope in MCMemberRecord (if present) needs to be consistent with MGID */ 237 mc_rec.scope_state = ib_member_set_scope_state(scope, IB_MC_REC_STATE_FULL_MEMBER); 238 ib_mgid_set_scope(mc_rec.mgid, scope); 239 240 status = osm_mcmr_rcv_find_or_create_new_mgrp(p_sa, comp_mask, mc_rec, 241p_mgrp); 242 if (p_mgrp) { 243 p_mgrp-well_known = TRUE; 244 if (!p-mgrp) 245 p-mgrp = p_mgrp; 246 } As far as I can tell, this was added before git history. Any idea if it's still needed? I don't know, just remember that we have asked about this during partition manager development (somewhere in 2006), and have got an answer like it is probably needed. Personally I've never seen this used. Maybe Hal may remember more. Sasha -- 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: [PATCH v2] opensm/osm_qos_policy.c: change a log message
On 18:24 Sun 05 Sep , Yevgeny Kliteynik wrote: Pring multicast group GID rather than LID - MGID is more relevant than MLID in this context. Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied with tiny change (see below). Thanks. --- V2: fixed the log message opensm/opensm/osm_qos_policy.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/opensm/opensm/osm_qos_policy.c b/opensm/opensm/osm_qos_policy.c index 72df6c8..fa04e10 100644 --- a/opensm/opensm/osm_qos_policy.c +++ b/opensm/opensm/osm_qos_policy.c @@ -48,6 +48,7 @@ #include stdlib.h #include string.h #include ctype.h +#include arpa/inet.h #include opensm/osm_log.h #include opensm/osm_node.h #include opensm/osm_port.h @@ -772,6 +773,7 @@ static void __qos_policy_validate_pkey( uint8_t sl; uint32_t flow; uint8_t hop; + char gid_str[INET6_ADDRSTRLEN]; I moved this string declaration to be under related 'if'... if (!p_qos_policy || !p_qos_match_rule || !p_prtn) return; @@ -801,9 +803,10 @@ static void __qos_policy_validate_pkey( sl, flow, hop); if (sl != p_prtn-sl) { there... Sasha OSM_LOG(p_qos_policy-p_subn-p_osm-log, OSM_LOG_DEBUG, - Updating MCGroup (MLID 0x%04x) SL to + Updating MCGroup (MGID %s) SL to match partition SL (%u)\n, - cl_hton16(p_prtn-mgrp-mcmember_rec.mlid), + inet_ntop(AF_INET6, p_prtn-mgrp-mcmember_rec.mgid.raw, + gid_str, sizeof gid_str), p_prtn-sl); p_prtn-mgrp-mcmember_rec.sl_flow_hop = ib_member_set_sl_flow_hop(p_prtn-sl, flow, hop); -- 1.6.2.4 -- 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
[ANNOUNCE] management tarballs release
Hi, There is a new release of the management (OpenSM and infiniband diagnostics) tarballs available in: http://www.openfabrics.org/downloads/management/ (listed in http://www.openfabrics.org/downloads/management/latest.txt) md5sum: 8341b50b95bfd511621a23ad900a46c5 libibumad-1.3.6.tar.gz a1d04520f9d77713a021e4d6af099383 libibmad-1.3.6.tar.gz 3880d2f467b6f2d5fada941c7f8baeb7 opensm-3.3.7.tar.gz 2e6c404427dda6512c3bb40c1a67d4f4 infiniband-diags-1.5.7.tar.gz All component versions are from recent master branch. Full list of changes is below. Sasha Al Chu (5): make libibnetdisc default behavior to overwrite a cache support libibnetdisc caching no-overwrite flag add ibcacheedit tool support diffing nodedesc on remoteports in ibnetdiscover support diffing lids and nodedesc on remoteports in ibnetdiscover Arputham Benjamin (1): libibumad: Increase the limit of UMAD_MAX_DEVICES Arthur Kepner (1): opensm: toggle sweeping V3 Doron Shoham (1): ibnetdiscover: add '-f' flag to show full information (ports' speed and width). Eli Dorfman (Voltaire) (6): return no path when path does not exist fix MFT record dump opensm: Fix wrong messages in MC delete flow opensm: Modify OSM_LOG_SYS messages opensm/osm_lid_mgr.c: Allow switch lids to be non LMC aligned opensm: Fix sl2vl configuration Hal Rosenstock (16): opensm/osm_sa_path_record.c: Add error code to newly added log message opensm/osm_sa_multipath_record.c: livelock in mpr_rcv_get_path_parms infiniband-diags/libibnetdisc/ibnetdisc.c: Fix compile warns on 32 bit archs infiniband-diags/libibnetdisc/chassis.c: In group_nodes, pass on all nodes infiniband-diags/libibnetdisc/chassis.c: In group_nodes, set fabric-chassis infiniband-diags/ibnetdiscover.c: Cosmetic changes opensm: Better handling of non responsive SMAs infiniband-diags/perfquery.8: Add some missing counters to description opensm/osm_trap_rcv.c: No need for heavy sweep when just NodeDescription changes opensm/osm_mcast_mgr.c: Only route MLIDs with more than 1 member opensm/osm_qos.c: Eliminate unneeded endport SL to VL setup opensm/osm_req.c: In osm_send_trap144, eliminate redundant clear of m_key in smp opensm/osm_helper.c: Add some missing message names to disp_msg_str opensm/include/osm_helper.h: Eliminate some duplicate declarations opensm/osm_pkey_mgr.c: Eliminate unneeded parameter from pkey_mgr_get_physp_max_blocks API infiniband-diags/ibnetdiscover: Fix handling of CA ports in recv_port_info Hefty, Sean (2): ib/mgmt: fix build under windows stack libibnetdisc: fix cast in unmarshall16 Ira Weiny (3): libibnetdisc: move ibmad_port out of smp_engine opensm/osm_perfmgr.c: Remove unnecessary lock reference from Performance Manager object ibqueryerrors.c: Optimize by querying AllPortSelect first Jim Schutt (1): opensm/qos.c: Revert port ranges for calls to sl2vl_update_table(). Sasha Khapyorsky (9): infiniband-diags/vendstat: code simplifications infiniband-diags/vendstat: add config space access options infiniband-diags/vendstat: allow multiple config space records iba/ib_types.h: remove assertion in ib_get_attr_offset() infiniband-diags/ibstat: convert to PRIx64 macros GUID printing complib/cl_timer: remove not needed timeval initializations opensm_release_notes-3.3: update management: update shared library versions management: packages versions update Smith, Stan (3): opensm/complib use portable macro syntax osmtest - use helper function ib_types.h add debug assert Stan C. Smith (3): opensm - address windows env issues opensm/libvendor Reduce stack consumption opensm - cleanup Yevgeny Kliteynik (7): opensm: fixing compilation issues in some header files opensm/osmtest.c: fix bug in getting attr offset opensm/main.c: force stdout to be line-buffered opensm/osm_sa_path_record.c: adding wrapper for pr_rcv_get_path_parms() opensm/osmeventplugin: added new events to monitor SM complib/cl_timer.c: fixing cl_timer calculation opensm/osm_opensm.c: no report when SM is exiting -- 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: [PATCH v4 00/18] opensm: Add new torus routing engine: torus-2QoS
Hi Jim, On 10:42 Fri 03 Sep , Jim Schutt wrote: This is v4 of a patchset to add to opensm a new routing engine designed to handle large fabrics connected with a 2D/3D torus topology. I've pushed this as separate branch now. So we will be able to continue merging there, after OFED will pick up the recent management release. Sasha -- 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: [PATCH v2] opensm: Fix sl2vl configuration
On 12:36 Sun 01 Aug , Eli Dorfman (Voltaire) wrote: Fix the patch according to Jim's comments Changed i,j to in,out to make code readable For non-optimal sl2vl configuration in and out ports were reversed. For optimal sl2vl added override of default ALL settting with port's sl2vl when operational VL was other than the default port. Signed-off-by: Eli Dorfman e...@voltaire.com Applied. Thanks. Sasha -- 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: [PATCH] libibumad: Increase the limit of UMAD_MAX_DEVICES
On 16:30 Tue 10 Aug , Arputham Benjamin wrote: ibstat command doesn't show all HCAs when the number of HCAs in one system exceeds 20. We need to change this limit. Increase it to 32 to be consistent with the define IB_UVERBS_MAX_DEVICES = 32 Signed-off-by: Arputham Benjamin abenja...@sgi.com Applied. Thanks. Sasha -- 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: [PATCHv3] opensm/include/osm_helper.h: Eliminate some duplicate declarations
On 14:20 Tue 31 Aug , Hal Rosenstock wrote: Signed-off-by: Hal Rosenstock h...@mellanox.com Applied. Thanks. Sasha -- 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: [PATCHv2] opensm/osm_pkey_mgr.c: Eliminate unneeded parameter from pkey_mgr_get_physp_max_blocks API
On 14:21 Tue 31 Aug , Hal Rosenstock wrote: Signed-off-by: Hal Rosenstock h...@mellanox.com Applied. Thanks. Sasha -- 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: [PATCH] ibnetdiscover: add '-f' flag to show full information (ports' speed and width).
On 16:14 Thu 26 Aug , Doron Shoham wrote: add '-f' flag to show full information (ports' speed and witdh). mainly to work with ibsim (using links real speed and width). Signed-off-by: Doron Shoham dor...@voltaire.com Applied. Thanks. Sasha -- 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: [PATCH] ibnetdiscover: add '-f' flag to show full information (ports' speed and width).
On 17:18 Tue 31 Aug , Eli Dorfman (Voltaire) wrote: Sasha Khapyorsky wrote: On 09:45 Tue 24 Aug , Hal Rosenstock wrote: What about the flag? do we still need it if we pass the output after the comment? I wouldn't think so. I also think we've made commentary changes to the ibnetdiscover output format like this before. If we wanted to be absolutely sure it wouldn't break anything, we'd keep the flag though. It's up to Sasha. The '-f' flag could make sense since those information actually duplicates previous 4xDDR, etc. and used by ibsim's parser only. Also it would be nice to make ibsim's parser to understand both possibilities: s=2 and speed=2 (Or even to parse *x*DR strings :)) Is it valid to assume that *x*DR string is always the last token? I think that it would be better to not assume this. Sasha If so, the patch should be changed Eli Sasha -- 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 -- 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: ibnetdiscover issue with multiported CA (or router) with multiple ports on same subnet
Hi Hal, On 13:27 Wed 25 Aug , Hal Rosenstock wrote: I'm seeing an issue with ibnetdiscover from a CA port where it appears to extend a path at a remote CA port (it's actually another port on the same CA) to query NodeInfo of the next hop beyond it. I get the following error message: src/query_smp.c:188; umad (DR path slid 0; dlid 0; 0,1,20,2 Attr 0x11:0) bad status 110; Connection timed out where smpquery -D nodeinfo of 0,1,20 is a CA which can also be seen from the topology. It appears to stem from the following code snippet from libibnetdisc/src/ibnetdisc.c:recv_port_info if (port_num mad_get_field(port-info, 0, IB_PORT_PHYS_STATE_F) == IB_PORT_PHYS_STATE_LINKUP ((node-type == IB_NODE_SWITCH port_num != local_port) || (node == fabric-from_node port_num == local_port))) { ib_portid_t path = smp-path; if (extend_dpath(engine, path, port_num) 0) query_node_info(engine, path, node); } This makes sense for me. that was introduced by: commit fcb8d5e7588e38508a8e354c37009d73c0a3889f Author: Sasha Khapyorsky sas...@voltaire.com Date: Sat Apr 10 02:43:24 2010 +0300 libibnetdisc: no backward NodeInfo queries Then switch is reached via port N we don't need to query back via this port - source node is discovered already. Finally this saves some amount of unnecessary MADs. Signed-off-by: Sasha Khapyorsky sas...@voltaire.com and subsequently modified by: commit 49d149c63a44d99259f516a15af53d8cf3f0e7c9 Author: Sasha Khapyorsky sas...@voltaire.com Date: Tue Apr 13 19:54:45 2010 +0300 libibnetdisc: don't try to cross discovery over CA When discovery is running from CA node it shouldn't try to cross over all ports, but only via local one (send over non-local ports will fail since CA doesn't route MADs). Signed-off-by: Sasha Khapyorsky sas...@voltaire.com due to the (node == fabric-from_node port_num == local_port) clause being TRUE. But I don't see how those patches are actually related to the story. An original (before patches) condition was: if (port_num mad_get_field(port-info, 0, IB_PORT_PHYS_STATE_F) == IB_PORT_PHYS_STATE_LINKUP (node-type == IB_NODE_SWITCH || node == fabric-from_node)) , which has the described bug as I can understand this. Sasha -- 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: [PATCH] infiniband-diags/ibnetdiscover: Fix handling of CA ports in recv_port_info
On 14:08 Wed 25 Aug , Hal Rosenstock wrote: When multiple ports on the same CA are connected to the same subnet and an ibnetdiscover is initiated from one of them, the discovery continues past the other CA port and an error occurs. The error is: src/query_smp.c:188; umad (DR path slid 0; dlid 0; 0,1,20,2 Attr0x11:0) bad status 110; Connection timed out Fix this by saving the initiating port number in the fabric structure and using that rather than local_port for the comparison in recv_port_info. Signed-off-by: Hal Rosenstock h...@mellanox.com Applied. Thanks. Sasha -- 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: ibnetdiscover issue with multiported CA (or router) with multiple ports on same subnet
On 09:47 Wed 01 Sep , Hal Rosenstock wrote: I thought this used to work and those changes looked related to me. Maybe the fix is right but that part of the problem description isn't. Do you want a revised patch without that part of the description ? No needs - I applied this already. Thanks. Sasha -- 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: [PATCH] osmtest/SA client: Only set attribute offset for RMPP operations
Hi Hal, On 08:37 Fri 27 Aug , Hal Rosenstock wrote: The patch description would be very useful. What is motivation for such changes? Sasha Signed-off-by: Hal Rosenstock hal.rosenst...@gmail.com --- diff --git a/opensm/libvendor/osm_vendor_ibumad_sa.c b/opensm/libvendor/osm_vendor_ibumad_sa.c index 3a7d54a..a81a6b7 100644 --- a/opensm/libvendor/osm_vendor_ibumad_sa.c +++ b/opensm/libvendor/osm_vendor_ibumad_sa.c @@ -2,7 +2,7 @@ * Copyright (c) 2004-2009 Voltaire, Inc. All rights reserved. * Copyright (c) 2002-2007,2009 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,2010 HNR Consulting. 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 @@ -342,6 +342,7 @@ __osmv_send_sa_req(IN osmv_sa_bind_info_t * p_bind, static atomic32_t trans_id; boolean_t sync; osmv_query_req_t *p_query_req_copy; + uint32_t sa_size; OSM_LOG_ENTER(p_log); @@ -401,8 +402,8 @@ __osmv_send_sa_req(IN osmv_sa_bind_info_t * p_bind, p_sa_mad-rmpp_flags = IB_RMPP_FLAG_ACTIVE; #endif if (p_sa_mad-comp_mask) { - memcpy(p_sa_mad-data, p_sa_mad_data-p_attr, -ib_get_attr_size(p_sa_mad_data-attr_offset)); + p_sa_mad_data-attr_offset ? (sa_size = ib_get_attr_size(p_sa_mad_data-attr_offset)) : (sa_size = IB_SA_DATA_SIZE); + memcpy(p_sa_mad-data, p_sa_mad_data-p_attr, sa_size); } /* @@ -488,6 +489,7 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, /* Set the request information. */ sa_mad_data.method = IB_MAD_METHOD_GETTABLE; sa_mad_data.attr_mod = 0; + sa_mad_data.attr_offset = 0; /* Set the MAD attributes and component mask correctly. */ switch (p_query_req-query_type) { @@ -497,7 +499,11 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, p_user_query = (osmv_user_query_t *) p_query_req-p_query_input; if (p_user_query-method) sa_mad_data.method = p_user_query-method; - sa_mad_data.attr_offset = p_user_query-attr_offset; +#ifdef DUAL_SIDED_RMPP + if (sa_mad_data.method == IB_MAD_METHOD_GETMULTI || + sa_mad_data.method == IB_MAD_METHOD_GETTRACETABLE) + sa_mad_data.attr_offset = p_user_query-attr_offset; +#endif sa_mad_data.attr_id = p_user_query-attr_id; sa_mad_data.attr_mod = p_user_query-attr_mod; sa_mad_data.comp_mask = p_user_query-comp_mask; @@ -507,8 +513,6 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, case OSMV_QUERY_ALL_SVC_RECS: OSM_LOG(p_log, OSM_LOG_DEBUG, DBG:001 SVC_REC_BY_NAME\n); sa_mad_data.attr_id = IB_MAD_ATTR_SERVICE_RECORD; - sa_mad_data.attr_offset = - ib_get_attr_offset(sizeof(ib_service_record_t)); sa_mad_data.comp_mask = 0; sa_mad_data.p_attr = u.svc_rec; break; @@ -518,8 +522,6 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, sa_mad_data.method = IB_MAD_METHOD_GET; sa_mad_data.attr_id = IB_MAD_ATTR_SERVICE_RECORD; sa_mad_data.comp_mask = IB_SR_COMPMASK_SNAME; - sa_mad_data.attr_offset = - ib_get_attr_offset(sizeof(ib_service_record_t)); sa_mad_data.p_attr = u.svc_rec; memcpy(u.svc_rec.service_name, p_query_req-p_query_input, sizeof(ib_svc_name_t)); @@ -529,8 +531,6 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, OSM_LOG(p_log, OSM_LOG_DEBUG, DBG:001 SVC_REC_BY_ID\n); sa_mad_data.attr_id = IB_MAD_ATTR_SERVICE_RECORD; sa_mad_data.comp_mask = IB_SR_COMPMASK_SID; - sa_mad_data.attr_offset = - ib_get_attr_offset(sizeof(ib_service_record_t)); sa_mad_data.p_attr = u.svc_rec; u.svc_rec.service_id = *(ib_net64_t *) (p_query_req-p_query_input); @@ -540,8 +540,6 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, OSM_LOG(p_log, OSM_LOG_DEBUG, DBG:001 CLASS_PORT_INFO\n); sa_mad_data.method = IB_MAD_METHOD_GET; sa_mad_data.attr_id = IB_MAD_ATTR_CLASS_PORT_INFO; - sa_mad_data.attr_offset = - ib_get_attr_offset(sizeof(ib_class_port_info_t)); sa_mad_data.comp_mask = 0; sa_mad_data.p_attr = u.class_port_info; break; @@ -549,8 +547,6 @@ osmv_query_sa(IN osm_bind_handle_t h_bind, case OSMV_QUERY_NODE_REC_BY_NODE_GUID: OSM_LOG(p_log, OSM_LOG_DEBUG, DBG:001 NODE_REC_BY_NODE_GUID\n); sa_mad_data.attr_id =
Re: [PATCH] complib/cl_timer.c: fixing cl_timer calculation
On 15:01 Tue 24 Aug , Yevgeny Kliteynik wrote: BTW, any idea what are the (obviously historical) reasons for these lines in the code? 323: /* do not do 0 wait ! */ 324: /* if (delta_time 1000.0) {delta_time = 1000;} */ Have no idea. This is from day zero of git history. Sasha -- 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: [PATCH v2] complib/cl_timer.c: fixing cl_timer calculation
On 16:21 Tue 24 Aug , Yevgeny Kliteynik wrote: When calculating p_timer-timeout.tv_sec and p_timer-timeout.tv_nsec, the carry was ignored, resulting in wrong value in p_timer-timeout.tv_sec, and value 10^9 in p_timer-timeout.tv_nsec (illegal value). Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Tiny comment is below. --- V2: - using macros instead of int types - fixed the same problem in cl_timer_trim() opensm/complib/cl_timer.c | 48 ++-- 1 files changed, 24 insertions(+), 24 deletions(-) diff --git a/opensm/complib/cl_timer.c b/opensm/complib/cl_timer.c index 2acdb51..3b3c7b0 100644 --- a/opensm/complib/cl_timer.c +++ b/opensm/complib/cl_timer.c @@ -294,12 +294,32 @@ static cl_status_t __cl_timer_find(IN const cl_list_item_t * const p_list_item, return (CL_NOT_FOUND); } +/* + * Calculate 'struct timespec' value that is the + * current time plus the 'time_ms' milliseconds. + */ +static __inline void __cl_timer_calculate(IN const uint32_t time_ms, + OUT struct timespec * const p_timer) +{ + struct timeval curtime, deltatime, endtime; + +#ifndef timerclear +#define timerclear(tvp) (tvp)-tv_sec = (time_t)0, (tvp)-tv_usec = 0L +#endif + timerclear(curtime); + gettimeofday(curtime, NULL); I don't think that curtime initialization does something useful before gettimeofday() call. Sasha + + deltatime.tv_sec = time_ms / 1000; + deltatime.tv_usec = (time_ms % 1000) * 1000; + timeradd(curtime, deltatime, endtime); + p_timer-tv_sec = endtime.tv_sec; + p_timer-tv_nsec = endtime.tv_usec * 1000; +} + cl_status_t cl_timer_start(IN cl_timer_t * const p_timer, IN const uint32_t time_ms) { - struct timeval curtime; cl_list_item_t *p_list_item; - uint32_t delta_time = time_ms; CL_ASSERT(p_timer); CL_ASSERT(p_timer-state == CL_INITIALIZED); @@ -313,20 +333,7 @@ cl_status_t cl_timer_start(IN cl_timer_t * const p_timer, cl_qlist_remove_item(gp_timer_prov-queue, p_timer-list_item); - /* Get the current time */ -#ifndef timerclear -#define timerclear(tvp) (tvp)-tv_sec = (time_t)0, (tvp)-tv_usec = 0L -#endif - timerclear(curtime); - gettimeofday(curtime, NULL); - - /* do not do 0 wait ! */ - /* if (delta_time 1000.0) {delta_time = 1000;} */ - - /* Calculate the timeout. */ - p_timer-timeout.tv_sec = curtime.tv_sec + (delta_time / 1000); - p_timer-timeout.tv_nsec = - (curtime.tv_usec + ((delta_time % 1000) * 1000)) * 1000; + __cl_timer_calculate(time_ms, p_timer-timeout); /* Add the timer to the queue. */ if (cl_is_qlist_empty(gp_timer_prov-queue)) { @@ -385,7 +392,6 @@ void cl_timer_stop(IN cl_timer_t * const p_timer) cl_status_t cl_timer_trim(IN cl_timer_t * const p_timer, IN const uint32_t time_ms) { - struct timeval curtime; struct timespec newtime; cl_status_t status; @@ -394,13 +400,7 @@ cl_status_t cl_timer_trim(IN cl_timer_t * const p_timer, pthread_mutex_lock(gp_timer_prov-mutex); - /* Get the current time */ - timerclear(curtime); - gettimeofday(curtime, NULL); - - /* Calculate the timeout. */ - newtime.tv_sec = curtime.tv_sec + (time_ms / 1000); - newtime.tv_nsec = (curtime.tv_usec + ((time_ms % 1000) * 1000)) * 1000; + __cl_timer_calculate(time_ms, newtime); if (p_timer-timer_state == CL_TIMER_QUEUED) { /* If the old time is earlier, do not trim it. Just return. */ -- 1.6.2.4 -- 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: opensm/osm_opensm.c: no report when SM is exiting
On 16:38 Wed 18 Aug , Yevgeny Kliteynik wrote: Don't bother reporting events to plug-ins while SM is exiting. Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] ibnetdiscover: add '-f' flag to show full information (ports' speed and width).
On 09:45 Tue 24 Aug , Hal Rosenstock wrote: What about the flag? do we still need it if we pass the output after the comment? I wouldn't think so. I also think we've made commentary changes to the ibnetdiscover output format like this before. If we wanted to be absolutely sure it wouldn't break anything, we'd keep the flag though. It's up to Sasha. The '-f' flag could make sense since those information actually duplicates previous 4xDDR, etc. and used by ibsim's parser only. Also it would be nice to make ibsim's parser to understand both possibilities: s=2 and speed=2 (Or even to parse *x*DR strings :)) Sasha -- 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: [ofw] [Patch] [Tools][infiniband-diags]
On 20:19 Sun 01 Aug , Sasha Khapyorsky wrote: On 14:36 Wed 28 Jul , Irena Kruchkovsky wrote: A patch that fixes the GUID output in ibstat to work correctly in windows 2003. Index: D:/Windows/MLNX_VPI/tools/infiniband-diags/src/ibstat.c === --- D:/Windows/MLNX_VPI/tools/infiniband-diags/src/ibstat.c (revision 6199) +++ D:/Windows/MLNX_VPI/tools/infiniband-diags/src/ibstat.c (revision 6200) @@ -72,9 +72,9 @@ printf(\tNumber of ports: %d\n, ca-numports); printf(\tFirmware version: %s\n, ca-fw_ver); printf(\tHardware version: %s\n, ca-hw_ver); - printf(\tNode GUID: 0x%016llx\n, + printf(\tNode GUID: 0x%016I64x\n, Normally we are using PRI* macros with management code. What about this: I've commited this couple of days ago: commit e4b73c2081a9afc346adf98d0f4d348005c920f6 Author: Sasha Khapyorsky sas...@voltaire.com Date: Sun Aug 1 20:26:11 2010 +0300 infiniband-diags/ibstat: convert to PRIx64 macros GUID printing Convert to using PRIx64 macros for printing GUID values. Pointed out by Irena Kruchkovsky. Signed-off-by: Sasha Khapyorsky sas...@voltaire.com diff --git a/infiniband-diags/src/ibstat.c b/infiniband-diags/src/ibstat.c index c44d8c4..f655a13 100644 --- a/infiniband-diags/src/ibstat.c +++ b/infiniband-diags/src/ibstat.c @@ -72,10 +72,9 @@ static void ca_dump(umad_ca_t * ca) printf(\tNumber of ports: %d\n, ca-numports); printf(\tFirmware version: %s\n, ca-fw_ver); printf(\tHardware version: %s\n, ca-hw_ver); - printf(\tNode GUID: 0x%016llx\n, - (long long unsigned)ntohll(ca-node_guid)); - printf(\tSystem image GUID: 0x%016llx\n, - (long long unsigned)ntohll(ca-system_guid)); + printf(\tNode GUID: 0x%016 PRIx64 \n, ntohll(ca-node_guid)); + printf(\tSystem image GUID: 0x%016 PRIx64 \n, + ntohll(ca-system_guid)); } static char *port_state_str[] = { @@ -122,8 +121,7 @@ static int port_dump(umad_port_t * port, int alone) printf(%sLMC: %d\n, pre, port-lmc); printf(%sSM lid: %d\n, pre, port-sm_lid); printf(%sCapability mask: 0x%08x\n, pre, ntohl(port-capmask)); - printf(%sPort GUID: 0x%016llx\n, pre, - (long long unsigned)ntohll(port-port_guid)); + printf(%sPort GUID: 0x%016 PRIx64 \n, pre, ntohll(port-port_guid)); printf(%sLink layer: %s\n, pre, port-link_layer); return 0; } @@ -182,8 +180,7 @@ static int ports_list(char names[][UMAD_CA_NAME_LEN], int n) for (i = 0; i found; i++) if (guids[i]) - printf(0x%016llx\n, - (long long unsigned)ntohll(guids[i])); + printf(0x%016 PRIx64 \n, ntohll(guids[i])); return found; } , hope this solves your issues too. Sasha -- 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: [PATCH] ibnetdiscover: add '-f' flag to show full information (ports' speed and width).
On 11:30 Wed 18 Aug , Doron Shoham wrote: add '-f' flag to show full information (ports' speed and witdh). mainly to work with ibsim (using links real speed and width). Seems almost fine. However see the comments below. Signed-off-by: Doron Shoham dor...@voltaire.com --- infiniband-diags/src/ibnetdiscover.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/infiniband-diags/src/ibnetdiscover.c b/infiniband-diags/src/ibnetdiscover.c index f20058c..0a020a2 100644 --- a/infiniband-diags/src/ibnetdiscover.c +++ b/infiniband-diags/src/ibnetdiscover.c @@ -77,6 +77,7 @@ static char *diff_cache_file = NULL; static unsigned diffcheck_flags = DIFF_FLAG_DEFAULT; static int report_max_hops = 0; +static int full_info = 0; /** * Define our own conversion functions to maintain compatibility with the old @@ -357,6 +358,8 @@ void out_switch_port(ibnd_port_t * port, int group, char *out_prefix) ext_port_str ? ext_port_str : ); if (port-remoteport-node-type != IB_NODE_SWITCH) fprintf(f, (% PRIx64 ) , port-remoteport-guid); + if (full_info) + fprintf(f, s=%d w=%d, ispeed, iwidth); I think that in order to not potentially break any ibnetdiscover output parsers it would be better to put such f output after a comment line. Would it work with ibsim in a same way? fprintf(f, \t\t# \%s\ lid %d %s%s, rem_nodename, port-remoteport-node-type == IB_NODE_SWITCH ? @@ -396,7 +399,8 @@ void out_ca_port(ibnd_port_t * port, int group, char *out_prefix) rem_nodename = remap_node_name(node_name_map, port-remoteport-node-guid, port-remoteport-node-nodedesc); - + if (full_info) + fprintf(f, s=%d w=%d, ispeed, iwidth); Ditto. Sasha fprintf(f, \t\t# lid %d lmc %d \%s\ lid %d %s%s\n, port-base_lid, port-lmc, rem_nodename, port-remoteport-node-type == IB_NODE_SWITCH ? @@ -926,6 +930,9 @@ static int process_opt(void *context, int ch, char *optarg) case 's': cfg-show_progress = 1; break; + case 'f': + full_info = 1; + break; case 'l': list = LIST_CA_NODE | LIST_SWITCH_NODE | LIST_ROUTER_NODE; break; @@ -964,6 +971,7 @@ int main(int argc, char **argv) ibnd_fabric_t *diff_fabric = NULL; const struct ibdiag_opt opts[] = { + {full, 'f', 0, NULL, show full information (ports' speed and witdh)}, {show, 's', 0, NULL, show more information}, {list, 'l', 0, NULL, list of connected nodes}, {grouping, 'g', 0, NULL, show grouping}, -- 1.5.4 -- 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: [ofw] [Patch] [Tools][infiniband-diags]
On 14:36 Wed 28 Jul , Irena Kruchkovsky wrote: A patch that fixes the GUID output in ibstat to work correctly in windows 2003. Index: D:/Windows/MLNX_VPI/tools/infiniband-diags/src/ibstat.c === --- D:/Windows/MLNX_VPI/tools/infiniband-diags/src/ibstat.c (revision 6199) +++ D:/Windows/MLNX_VPI/tools/infiniband-diags/src/ibstat.c (revision 6200) @@ -72,9 +72,9 @@ printf(\tNumber of ports: %d\n, ca-numports); printf(\tFirmware version: %s\n, ca-fw_ver); printf(\tHardware version: %s\n, ca-hw_ver); - printf(\tNode GUID: 0x%016llx\n, + printf(\tNode GUID: 0x%016I64x\n, Normally we are using PRI* macros with management code. What about this: diff --git a/infiniband-diags/src/ibstat.c b/infiniband-diags/src/ibstat.c index c44d8c4..525902d 100644 --- a/infiniband-diags/src/ibstat.c +++ b/infiniband-diags/src/ibstat.c @@ -72,10 +72,9 @@ static void ca_dump(umad_ca_t * ca) printf(\tNumber of ports: %d\n, ca-numports); printf(\tFirmware version: %s\n, ca-fw_ver); printf(\tHardware version: %s\n, ca-hw_ver); - printf(\tNode GUID: 0x%016llx\n, - (long long unsigned)ntohll(ca-node_guid)); - printf(\tSystem image GUID: 0x%016llx\n, - (long long unsigned)ntohll(ca-system_guid)); + printf(\tNode GUID: 0x%016 PRIx64 \n, ntohll(ca-node_guid)); + printf(\tSystem image GUID: 0x%016 PRIx64 \n, + ntohll(ca-system_guid)); } static char *port_state_str[] = { @@ -122,8 +121,7 @@ static int port_dump(umad_port_t * port, int alone) printf(%sLMC: %d\n, pre, port-lmc); printf(%sSM lid: %d\n, pre, port-sm_lid); printf(%sCapability mask: 0x%08x\n, pre, ntohl(port-capmask)); - printf(%sPort GUID: 0x%016llx\n, pre, - (long long unsigned)ntohll(port-port_guid)); + printf(%sPort GUID: 0x%016 PRIx64 \n, pre, ntohll(port-port_guid)); printf(%sLink layer: %s\n, pre, port-link_layer); return 0; } ? Does it solve an issue as well? Sasha -- 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: libibnetdisc: fix cast in unmarshall16
On 11:40 Mon 26 Jul , Hefty, Sean wrote: Uri Habusha reported a build error on windows as a result of an incorrect cast to uint64_t. Signed-off-by: Sean Hefty sean.he...@intel.com Applied. Thanks. Sasha --- .../libibnetdisc/src/ibnetdisc_cache.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/infiniband-diags/libibnetdisc/src/ibnetdisc_cache.c b/infiniband-diags/libibnetdisc/src/ibnetdisc_cache.c index 1de42eb..199bf33 100644 --- a/infiniband-diags/libibnetdisc/src/ibnetdisc_cache.c +++ b/infiniband-diags/libibnetdisc/src/ibnetdisc_cache.c @@ -183,8 +183,7 @@ static size_t _unmarshall8(uint8_t * inbuf, uint8_t * num) static size_t _unmarshall16(uint8_t * inbuf, uint16_t * num) { - (*num) = (uint64_t) inbuf[0]; - (*num) |= ((uint16_t) inbuf[1] 8); + (*num) = ((uint16_t) inbuf[1] 8) | inbuf[0]; return (sizeof(*num)); } -- 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: [PATCH] opensm/osm_helper.c: Add some missing message names to disp_msg_str
On 10:27 Fri 09 Jul , Hal Rosenstock wrote: Signed-off-by: Hal Rosenstock hal.rosenst...@gmail.com Applied. Thanks. Sasha -- 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: [ANNOUNCE] management tarballs release
On 13:17 Thu 08 Jul , Hal Rosenstock wrote: d3586e7a17bca99fd384a943f00e259e libibumad-1.3.5.tar.gz 754d93f567393d3b9987a65326f40917 libibmad-1.3.5.tar.gz 5c94d6ee49e9c51c801f6634823b5ad5 opensm-3.3.6.tar.gz ba28f6b5323e6067ca019a999eeaf907 infiniband-diags-1.5.6.tar.gz Shouldn't these versions be labeled/tagged in your management git tree ? Would you do that ? I did, but forgot to push a tags to openfabrics free. Fixed now. Sasha -- 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: [PATCH] opensm: event plig-in API fixed to compile with g++
On 10:00 Tue 06 Jul , Roland Dreier wrote: Seems that anyone who cared could already easily write a tiny shim in C and then write the rest of their plugin in C++. Or are there deeper issues than names of methods? I think that it is likely deeper. For instance if C++ stuff will use OpenSM structures, functions, include files, etc.. So this will automatically will add some limitations for using normal C in OpenSM core code. I highly suspect that all those requirements are resulted by using C++ in some third party's *proprietary* plugs. Which is fine in general, but completely unrelated to OpenSM development - I don't think that we should care. Sasha -- 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: [PATCH v3 01/17] opensm: Prepare for routing engine input to path record SL lookup and SL2VL map setup.
Hi Jim, On 13:53 Tue 15 Jun , Jim Schutt wrote: diff --git a/opensm/opensm/osm_opensm.c b/opensm/opensm/osm_opensm.c index d3dc02e..5614240 100644 --- a/opensm/opensm/osm_opensm.c +++ b/opensm/opensm/osm_opensm.c @@ -147,7 +147,8 @@ static void append_routing_engine(osm_opensm_t *osm, r-next = routing_engine; } -static void setup_routing_engine(osm_opensm_t *osm, const char *name) +static struct osm_routing_engine *setup_routing_engine(osm_opensm_t *osm, +const char *name) { struct osm_routing_engine *re; const struct routing_engine_module *m; @@ -158,47 +159,53 @@ static void setup_routing_engine(osm_opensm_t *osm, const char *name) if (!re) { OSM_LOG(osm-log, OSM_LOG_VERBOSE, memory allocation failed\n); - return; + return NULL; } memset(re, 0, sizeof(struct osm_routing_engine)); re-name = m-name; + re-type = osm_routing_engine_type(m-name); if (m-setup(re, osm)) { OSM_LOG(osm-log, OSM_LOG_VERBOSE, setup of routing engine \'%s\' failed\n, name); - return; + free(re); + return NULL; } OSM_LOG(osm-log, OSM_LOG_DEBUG, \'%s\' routing engine set up\n, re-name); - append_routing_engine(osm, re); - return; + if (re-type == OSM_ROUTING_ENGINE_TYPE_MINHOP) + osm-default_routing_engine = re; + return re; } } OSM_LOG(osm-log, OSM_LOG_ERROR, cannot find or setup routing engine \'%s\'\n, name); + return NULL; } static void setup_routing_engines(osm_opensm_t *osm, const char *engine_names) { char *name, *str, *p; + struct osm_routing_engine *re; - if (!engine_names || !*engine_names) { - setup_routing_engine(osm, minhop); - return; + if (engine_names *engine_names) { + str = strdup(engine_names); + name = strtok_r(str, , \t\n, p); + while (name *name) { + re = setup_routing_engine(osm, name); + if (re) + append_routing_engine(osm, re); + name = strtok_r(NULL, , \t\n, p); + } + free(str); } - - str = strdup(engine_names); - name = strtok_r(str, , \t\n, p); - while (name *name) { - setup_routing_engine(osm, name); - name = strtok_r(NULL, , \t\n, p); + if (!osm-default_routing_engine) { + re = setup_routing_engine(osm, minhop); + if (!osm-routing_engine_list re) + append_routing_engine(osm, re); Shouldn't here be: osm-default_routing_engine = re; too? } - free(str); - - if (!osm-routing_engine_list) - setup_routing_engine(osm, minhop); } void osm_opensm_construct(IN osm_opensm_t * p_osm) So that this chunk in osm_ucast_mgr_process() (below) will not break over NULL pointer? - if (p_osm-routing_engine_used == OSM_ROUTING_ENGINE_TYPE_NONE) { + if (!p_osm-routing_engine_used) { /* If configured routing algorithm failed, use default MinHop */ - osm_ucast_mgr_build_lid_matrices(p_mgr); - ucast_mgr_build_lfts(p_mgr); + struct osm_routing_engine *r = p_osm-default_routing_engine; + + r-build_lid_matrices(r-context); + r-ucast_build_fwd_tables(r-context); + p_osm-routing_engine_used = r; osm_ucast_mgr_set_fwd_tables(p_mgr); - p_osm-routing_engine_used = OSM_ROUTING_ENGINE_TYPE_MINHOP; } Sasha -- 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: [PATCH v3 01/17] opensm: Prepare for routing engine input to path record SL lookup and SL2VL map setup.
On 11:57 Wed 07 Jul , Jim Schutt wrote: So I think the end of the above chunk only needs to be - - str = strdup(engine_names); - name = strtok_r(str, , \t\n, p); - while (name *name) { - setup_routing_engine(osm, name); - name = strtok_r(NULL, , \t\n, p); - } + if (!osm-default_routing_engine) + setup_routing_engine(osm, minhop); This makes sense. Don't need to resubmit the patch, I will fix. Sasha -- 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: [PATCH] opensm: Modify OSM_LOG_SYS messages
On 17:38 Tue 29 Jun , Eli Dorfman (Voltaire) wrote: Modify OSM_LOG_SYS messages Signed-off-by: Eli Dorfman e...@voltaire.com Applied. Thanks. Sasha -- 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: [PATCH v6] opensm/osmeventplugin: added new events to monitor SM
Hi Yevgeny, On 13:00 Wed 30 Jun , Yevgeny Kliteynik wrote: Adding new events that allow event plug-in to see when SM starts/finishes heavy sweep and routing configuration, when it updates dump files, when it is no longer master, when SM port is down, and when SA DB is actually dumped at the end of light sweep: OSM_EVENT_ID_HEAVY_SWEEP_START OSM_EVENT_ID_HEAVY_SWEEP_DONE OSM_EVENT_ID_UCAST_ROUTING_DONE OSM_EVENT_ID_STATE_CHANGE OSM_EVENT_ID_SA_DB_DUMPED Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il I'm applying this, Thanks. However I would strongly suggest few improvements - see below. --- Changes since v5: - Added OSM_EVENT_ID_HEAVY_SWEEP_START event. Changes since v4: - OSM_EVENT_ID_SA_DB_DUMPED was still reported during heavy sweep - removed. Changes since v3: - OSM_EVENT_ID_ENTERING_STANDBY and OSM_EVENT_ID_SM_PORT_DOWN replaced by OSM_EVENT_STATE_CHANGE - OSM_EVENT_ID_SA_DB_DUMPED is not reported during heavy sweep, but only if SA DB was actually dumped at the end of light sweep - fixed bug with OSM_EVENT_ID_MAX Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il --- opensm/include/opensm/osm_event_plugin.h |5 + opensm/opensm/osm_state_mgr.c | 20 ++-- opensm/osmeventplugin/src/osmeventplugin.c | 15 +++ 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/opensm/include/opensm/osm_event_plugin.h b/opensm/include/opensm/osm_event_plugin.h index 33d1920..6a99ed9 100644 --- a/opensm/include/opensm/osm_event_plugin.h +++ b/opensm/include/opensm/osm_event_plugin.h @@ -72,6 +72,11 @@ typedef enum { OSM_EVENT_ID_PORT_SELECT, OSM_EVENT_ID_TRAP, OSM_EVENT_ID_SUBNET_UP, + OSM_EVENT_ID_HEAVY_SWEEP_START, + OSM_EVENT_ID_HEAVY_SWEEP_DONE, I see that this one is used to indicate a discovery sweep phase completion. Would it be better to rename this as OSM_EVENT_ID_DISCOVERY_DONE? + OSM_EVENT_ID_UCAST_ROUTING_DONE, + OSM_EVENT_ID_STATE_CHANGE, + OSM_EVENT_ID_SA_DB_DUMPED, OSM_EVENT_ID_MAX } osm_epi_event_id_t; diff --git a/opensm/opensm/osm_state_mgr.c b/opensm/opensm/osm_state_mgr.c index 81c8f54..e7bff46 100644 --- a/opensm/opensm/osm_state_mgr.c +++ b/opensm/opensm/osm_state_mgr.c @@ -1107,8 +1107,10 @@ static void do_sweep(osm_sm_t * sm) if (wait_for_pending_transactions(sm-p_subn-p_osm-stats)) return; if (!sm-p_subn-force_heavy_sweep) { - if (sm-p_subn-opt.sa_db_dump) - osm_sa_db_file_dump(sm-p_subn-p_osm); + if (sm-p_subn-opt.sa_db_dump + !osm_sa_db_file_dump(sm-p_subn-p_osm)) + osm_opensm_report_event(sm-p_subn-p_osm, + OSM_EVENT_ID_SA_DB_DUMPED, NULL); OSM_LOG_MSG_BOX(sm-p_log, OSM_LOG_VERBOSE, LIGHT SWEEP COMPLETE); return; @@ -1151,10 +1153,15 @@ static void do_sweep(osm_sm_t * sm) if (!sm-p_subn-subnet_initialization_error) { OSM_LOG_MSG_BOX(sm-p_log, OSM_LOG_VERBOSE, REROUTE COMPLETE); + osm_opensm_report_event(sm-p_subn-p_osm, + OSM_EVENT_ID_UCAST_ROUTING_DONE, NULL); return; } } + osm_opensm_report_event(sm-p_subn-p_osm, + OSM_EVENT_ID_HEAVY_SWEEP_START, NULL); + /* go to heavy sweep */ repeat_discovery: @@ -1185,6 +1192,8 @@ repeat_discovery: /* Move to DISCOVERING state */ osm_sm_state_mgr_process(sm, OSM_SM_SIGNAL_DISCOVER); + osm_opensm_report_event(sm-p_subn-p_osm, + OSM_EVENT_ID_STATE_CHANGE, NULL); I think, that if we are introducing SM state change event then this should report any state change and not only going to stand-by. I would prefer to see this report call inside osm_sm_state_mgr_process(). return; } @@ -1205,6 +1214,8 @@ repeat_discovery: ENTERING STANDBY STATE); /* notify master SM about us */ osm_send_trap144(sm, 0); + osm_opensm_report_event(sm-p_subn-p_osm, + OSM_EVENT_ID_STATE_CHANGE, NULL); Ditto. Sasha -- 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: [PATCH] opensm/osm_lid_mgr.c: Allow switch lids to be non LMC aligned
On 16:49 Tue 29 Jun , Eli Dorfman (Voltaire) wrote: Fixes a bug of failover between SM's that are running on a switch. Both have lids below LMC start lid (equals to 2^LMC - 1) In case of failover the LID range between 1 and start lid was considered not free and their (switch's) lids were changed. Signed-off-by: Eli Dorfman e...@voltaire.com Applied. Thanks. Sasha -- 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: [PATCH] opensm: event plig-in API fixed to compile with g++
On 11:10 Thu 24 Jun , Yevgeny Kliteynik wrote: Event API should have been able to be used by libraries written both in C and C++. I don't know about such requirement. Personally I would strongly suggest to not mix things without really good reason - we discussed already about extern C removal in a future. The problem is, one of the fields in struct osm_event_plugin is called delete. Changing it to destroy and promoting the API version. This will break any existing plugin now (I know at least couple). I don't think that such change is appropriate for between RCs period. Sasha Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il --- opensm/include/opensm/osm_event_plugin.h|2 +- opensm/opensm/osm_event_plugin.c|4 ++-- opensm/osmeventplugin/libosmeventplugin.ver |2 +- opensm/osmeventplugin/src/osmeventplugin.c |2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/opensm/include/opensm/osm_event_plugin.h b/opensm/include/opensm/osm_event_plugin.h index 0b3464e..aa3fed4 100644 --- a/opensm/include/opensm/osm_event_plugin.h +++ b/opensm/include/opensm/osm_event_plugin.h @@ -145,7 +145,7 @@ typedef struct osm_api_ps_event { typedef struct osm_event_plugin { const char *osm_version; void *(*create) (struct osm_opensm *osm); - void (*delete) (void *plugin_data); + void (*destroy) (void *plugin_data); void (*report) (void *plugin_data, osm_epi_event_id_t event_id, void *event_data); } osm_event_plugin_t; diff --git a/opensm/opensm/osm_event_plugin.c b/opensm/opensm/osm_event_plugin.c index 2d67065..7f61960 100644 --- a/opensm/opensm/osm_event_plugin.c +++ b/opensm/opensm/osm_event_plugin.c @@ -141,8 +141,8 @@ DLOPENFAIL: void osm_epi_destroy(osm_epi_plugin_t * plugin) { if (plugin) { - if (plugin-impl-delete) - plugin-impl-delete(plugin-plugin_data); + if (plugin-impl-destroy) + plugin-impl-destroy(plugin-plugin_data); dlclose(plugin-handle); free(plugin-plugin_name); free(plugin); diff --git a/opensm/osmeventplugin/libosmeventplugin.ver b/opensm/osmeventplugin/libosmeventplugin.ver index f755ff6..0c3a85b 100644 --- a/opensm/osmeventplugin/libosmeventplugin.ver +++ b/opensm/osmeventplugin/libosmeventplugin.ver @@ -6,4 +6,4 @@ # API_REV - advance on any added API # RUNNING_REV - advance any change to the vendor files # AGE - number of backward versions the API still supports -LIBVERSION=1:0:0 +LIBVERSION=2:0:0 diff --git a/opensm/osmeventplugin/src/osmeventplugin.c b/opensm/osmeventplugin/src/osmeventplugin.c index f40f7fe..a82be07 100644 --- a/opensm/osmeventplugin/src/osmeventplugin.c +++ b/opensm/osmeventplugin/src/osmeventplugin.c @@ -207,6 +207,6 @@ static void report(void *_log, osm_epi_event_id_t event_id, void *event_data) osm_event_plugin_t osm_event_plugin = { osm_version:OSM_VERSION, create:construct, - delete:destroy, + destroy:destroy, report:report }; -- 1.5.1.4 -- 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 -- 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: [PATCH] opensm: event plig-in API fixed to compile with g++
On 14:30 Mon 05 Jul , Hal Rosenstock wrote: On Mon, Jul 5, 2010 at 2:11 PM, Sasha Khapyorsky sas...@voltaire.com wrote: On 11:10 Thu 24 Jun , Yevgeny Kliteynik wrote: Event API should have been able to be used by libraries written both in C and C++. I don't know about such requirement. Are you saying it isn't a valid requirement to allow OpenSM plugins to be C++ based ? If so, why not ? I'm saying that there is no requirement for plugin API to support C++ - obviously (following method names) plugin API was never developed for using it in C++. Why not is another question - for instance in order to not deal with C/C++ compatibility issues (such as castings, function names limitation, linking mess, etc.) Sasha -- 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: [PATCH][MINOR] opensm/osm_req.c: In osm_send_trap144, eliminate redundant clear of m_key in smp
On 10:13 Tue 22 Jun , Hal Rosenstock wrote: Already cleared by prior memset Signed-off-by: Hal Rosenstock hal.rosenst...@gmail.com Applied. Thanks. Sasha -- 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: [PATCH] opensm: Fix wrong messages in MC delete flow
On 12:31 Sun 20 Jun , Eli Dorfman (Voltaire) wrote: Fix wrong messages in MC delete and update flows. The requester GID was wrong. Signed-off-by: Eli Dorfman e...@voltaire.com Applied. Thanks. Sasha -- 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: [PATCH][TRIVIAL] infiniband-diags/perfquery.8: Add some missing counters to description
On 07:05 Wed 16 Jun , Hal Rosenstock wrote: Also, updated email address Signed-off-by: Hal Rosenstock hal.rosenst...@gmail.com Applied. Thanks. Sasha -- 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: [PATCH] opensm/osmtest.c: fix bug in getting attr offset
On 11:33 Tue 15 Jun , Yevgeny Kliteynik wrote: Fix bug that was introduced by commit 4fd4ca306f93376963725285f3bf7c87a76055b0 Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il Applied. Thanks. Sasha -- 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: [PATCH] [RESEND] opensm/osm_mcast_mgr.c: Only route MLIDs with more than 1 member
On 08:46 Mon 14 Jun , Hal Rosenstock wrote: rather than just more than 0 members. There is no need to route MLIDs with only 1 member either. MLIDs only need routing when 2 or more members. Single member case is handled locally. Signed-off-by: Hal Rosenstock hal.rosenst...@gmail.com Applied. Thanks. Sasha -- 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: [PATCH v3] opensm/osmeventplugin: added new events to monitor SM
On 14:41 Thu 10 Jun , Yevgeny Kliteynik wrote: Hi Sasha, Adding new events that allow event plug-in to see when SM finishes heavy sweep and routing configuration, when it updates dump files, when it is no longer master, and when SM port is down: OSM_EVENT_ID_HEAVY_SWEEP_DONE OSM_EVENT_ID_UCAST_ROUTING_DONE What is wrong with using Subnet Up event for those purposes? OSM_EVENT_ID_ENTERING_STANDBY OSM_EVENT_ID_SM_PORT_DOWN Instead I would suggest to make state change event. OSM_EVENT_ID_SA_DB_DUMPED Again, Subnet Up indicates that all sweep stuff is done (including dump files). The last event is reported when SA DB is actually dumped. Signed-off-by: Yevgeny Kliteynik klit...@dev.mellanox.co.il --- Changes from V2: - reduced number of events that are reported - rebased to latest master --- opensm/include/opensm/osm_event_plugin.h |7 ++- opensm/opensm/osm_state_mgr.c | 16 +++- opensm/osmeventplugin/src/osmeventplugin.c | 15 +++ 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/opensm/include/opensm/osm_event_plugin.h b/opensm/include/opensm/osm_event_plugin.h index 33d1920..a565123 100644 --- a/opensm/include/opensm/osm_event_plugin.h +++ b/opensm/include/opensm/osm_event_plugin.h @@ -72,7 +72,12 @@ typedef enum { OSM_EVENT_ID_PORT_SELECT, OSM_EVENT_ID_TRAP, OSM_EVENT_ID_SUBNET_UP, - OSM_EVENT_ID_MAX + OSM_EVENT_ID_MAX, Likely you wanted to move OSM_EVENT_ID_MAX to be last in the list. Sasha + OSM_EVENT_ID_HEAVY_SWEEP_DONE, + OSM_EVENT_ID_UCAST_ROUTING_DONE, + OSM_EVENT_ID_ENTERING_STANDBY, + OSM_EVENT_ID_SM_PORT_DOWN, + OSM_EVENT_ID_SA_DB_DUMPED } osm_epi_event_id_t; typedef struct osm_epi_port_id { diff --git a/opensm/opensm/osm_state_mgr.c b/opensm/opensm/osm_state_mgr.c index 81c8f54..3231ae9 100644 --- a/opensm/opensm/osm_state_mgr.c +++ b/opensm/opensm/osm_state_mgr.c @@ -1151,6 +1151,8 @@ static void do_sweep(osm_sm_t * sm) if (!sm-p_subn-subnet_initialization_error) { OSM_LOG_MSG_BOX(sm-p_log, OSM_LOG_VERBOSE, REROUTE COMPLETE); + osm_opensm_report_event(sm-p_subn-p_osm, + OSM_EVENT_ID_UCAST_ROUTING_DONE, NULL); return; } } @@ -1185,6 +1187,8 @@ repeat_discovery: /* Move to DISCOVERING state */ osm_sm_state_mgr_process(sm, OSM_SM_SIGNAL_DISCOVER); + osm_opensm_report_event(sm-p_subn-p_osm, + OSM_EVENT_ID_SM_PORT_DOWN, NULL); return; } @@ -1205,6 +1209,8 @@ repeat_discovery: ENTERING STANDBY STATE); /* notify master SM about us */ osm_send_trap144(sm, 0); + osm_opensm_report_event(sm-p_subn-p_osm, + OSM_EVENT_ID_ENTERING_STANDBY, NULL); return; } @@ -1212,6 +1218,9 @@ repeat_discovery: if (sm-p_subn-force_heavy_sweep) goto repeat_discovery; + osm_opensm_report_event(sm-p_subn-p_osm, + OSM_EVENT_ID_HEAVY_SWEEP_DONE, NULL); + OSM_LOG_MSG_BOX(sm-p_log, OSM_LOG_VERBOSE, HEAVY SWEEP COMPLETE); /* If we are MASTER - get the highest remote_sm, and @@ -1314,6 +1323,8 @@ repeat_discovery: OSM_LOG_MSG_BOX(sm-p_log, OSM_LOG_VERBOSE, SWITCHES CONFIGURED FOR UNICAST); + osm_opensm_report_event(sm-p_subn-p_osm, + OSM_EVENT_ID_UCAST_ROUTING_DONE, NULL); if (!sm-p_subn-opt.disable_multicast) { osm_mcast_mgr_process(sm); @@ -1375,7 +1386,10 @@ repeat_discovery: if (osm_log_is_active(sm-p_log, OSM_LOG_VERBOSE) || sm-p_subn-opt.sa_db_dump) - osm_sa_db_file_dump(sm-p_subn-p_osm); + if (!osm_sa_db_file_dump(sm-p_subn-p_osm)) + osm_opensm_report_event(sm-p_subn-p_osm, + OSM_EVENT_ID_SA_DB_DUMPED, NULL); + } /* diff --git a/opensm/osmeventplugin/src/osmeventplugin.c b/opensm/osmeventplugin/src/osmeventplugin.c index b4d9ce9..af68a5c 100644 --- a/opensm/osmeventplugin/src/osmeventplugin.c +++ b/opensm/osmeventplugin/src/osmeventplugin.c @@ -176,6 +176,21 @@ static void report(void *_log, osm_epi_event_id_t event_id, void *event_data) case OSM_EVENT_ID_SUBNET_UP: fprintf(log-log_file, Subnet up reported\n); break; + case OSM_EVENT_ID_HEAVY_SWEEP_DONE: + fprintf(log-log_file, Heavy sweep completed\n); + break; + case OSM_EVENT_ID_UCAST_ROUTING_DONE: + fprintf(log-log_file, Unicast routing completed\n); + break; +