1219820Sjeff/* 2219820Sjeff * Copyright (c) 2004-2008 Voltaire, Inc. All rights reserved. 3219820Sjeff * Copyright (c) 2002-2008 Mellanox Technologies LTD. All rights reserved. 4219820Sjeff * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. 5219820Sjeff * Copyright (c) 2008 Xsigo Systems Inc. All rights reserved. 6219820Sjeff * 7219820Sjeff * This software is available to you under a choice of one of two 8219820Sjeff * licenses. You may choose to be licensed under the terms of the GNU 9219820Sjeff * General Public License (GPL) Version 2, available from the file 10219820Sjeff * COPYING in the main directory of this source tree, or the 11219820Sjeff * OpenIB.org BSD license below: 12219820Sjeff * 13219820Sjeff * Redistribution and use in source and binary forms, with or 14219820Sjeff * without modification, are permitted provided that the following 15219820Sjeff * conditions are met: 16219820Sjeff * 17219820Sjeff * - Redistributions of source code must retain the above 18219820Sjeff * copyright notice, this list of conditions and the following 19219820Sjeff * disclaimer. 20219820Sjeff * 21219820Sjeff * - Redistributions in binary form must reproduce the above 22219820Sjeff * copyright notice, this list of conditions and the following 23219820Sjeff * disclaimer in the documentation and/or other materials 24219820Sjeff * provided with the distribution. 25219820Sjeff * 26219820Sjeff * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 27219820Sjeff * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 28219820Sjeff * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 29219820Sjeff * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 30219820Sjeff * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 31219820Sjeff * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 32219820Sjeff * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 33219820Sjeff * SOFTWARE. 34219820Sjeff * 35219820Sjeff */ 36219820Sjeff 37219820Sjeff/* 38219820Sjeff * Abstract: 39219820Sjeff * Declaration of osm_subn_t. 40219820Sjeff * This object represents an IBA subnet. 41219820Sjeff * This object is part of the OpenSM family of objects. 42219820Sjeff */ 43219820Sjeff 44219820Sjeff#ifndef _OSM_SUBNET_H_ 45219820Sjeff#define _OSM_SUBNET_H_ 46219820Sjeff 47219820Sjeff#include <iba/ib_types.h> 48219820Sjeff#include <complib/cl_qmap.h> 49219820Sjeff#include <complib/cl_map.h> 50219820Sjeff#include <complib/cl_ptr_vector.h> 51219820Sjeff#include <complib/cl_list.h> 52219820Sjeff#include <opensm/osm_base.h> 53219820Sjeff#include <opensm/osm_prefix_route.h> 54219820Sjeff#include <stdio.h> 55219820Sjeff 56219820Sjeff#ifdef __cplusplus 57219820Sjeff# define BEGIN_C_DECLS extern "C" { 58219820Sjeff# define END_C_DECLS } 59219820Sjeff#else /* !__cplusplus */ 60219820Sjeff# define BEGIN_C_DECLS 61219820Sjeff# define END_C_DECLS 62219820Sjeff#endif /* __cplusplus */ 63219820Sjeff 64219820SjeffBEGIN_C_DECLS 65219820Sjeff#define OSM_SUBNET_VECTOR_MIN_SIZE 0 66219820Sjeff#define OSM_SUBNET_VECTOR_GROW_SIZE 1 67219820Sjeff#define OSM_SUBNET_VECTOR_CAPACITY 256 68219820Sjeffstruct osm_opensm; 69219820Sjeffstruct osm_qos_policy; 70219820Sjeff 71219820Sjeff/****h* OpenSM/Subnet 72219820Sjeff* NAME 73219820Sjeff* Subnet 74219820Sjeff* 75219820Sjeff* DESCRIPTION 76219820Sjeff* The Subnet object encapsulates the information needed by the 77219820Sjeff* OpenSM to manage a subnet. The OpenSM allocates one Subnet object 78219820Sjeff* per IBA subnet. 79219820Sjeff* 80219820Sjeff* The Subnet object is not thread safe, thus callers must provide 81219820Sjeff* serialization. 82219820Sjeff* 83219820Sjeff* This object is essentially a container for the various components 84219820Sjeff* of a subnet. Callers may directly access the member variables. 85219820Sjeff* 86219820Sjeff* AUTHOR 87219820Sjeff* Steve King, Intel 88219820Sjeff* 89219820Sjeff*********/ 90219820Sjeff 91219820Sjeff/****s* OpenSM: Subnet/osm_qos_options_t 92219820Sjeff* NAME 93219820Sjeff* osm_qos_options_t 94219820Sjeff* 95219820Sjeff* DESCRIPTION 96219820Sjeff* Subnet QoS options structure. This structure contains the various 97219820Sjeff* QoS specific configuration parameters for the subnet. 98219820Sjeff* 99219820Sjeff* SYNOPSIS 100219820Sjeff*/ 101219820Sjefftypedef struct osm_qos_options { 102219820Sjeff unsigned max_vls; 103219820Sjeff int high_limit; 104219820Sjeff char *vlarb_high; 105219820Sjeff char *vlarb_low; 106219820Sjeff char *sl2vl; 107219820Sjeff} osm_qos_options_t; 108219820Sjeff/* 109219820Sjeff* FIELDS 110219820Sjeff* 111219820Sjeff* max_vls 112219820Sjeff* The number of maximum VLs on the Subnet (0 == use default) 113219820Sjeff* 114219820Sjeff* high_limit 115219820Sjeff* The limit of High Priority component of VL Arbitration 116219820Sjeff* table (IBA 7.6.9) (-1 == use default) 117219820Sjeff* 118219820Sjeff* vlarb_high 119219820Sjeff* High priority VL Arbitration table template. (NULL == use default) 120219820Sjeff* 121219820Sjeff* vlarb_low 122219820Sjeff* Low priority VL Arbitration table template. (NULL == use default) 123219820Sjeff* 124219820Sjeff* sl2vl 125219820Sjeff* SL2VL Mapping table (IBA 7.6.6) template. (NULL == use default) 126219820Sjeff* 127219820Sjeff*********/ 128219820Sjeff 129219820Sjeff/****s* OpenSM: Subnet/osm_subn_opt_t 130219820Sjeff* NAME 131219820Sjeff* osm_subn_opt_t 132219820Sjeff* 133219820Sjeff* DESCRIPTION 134219820Sjeff* Subnet options structure. This structure contains the various 135219820Sjeff* site specific configuration parameters for the subnet. 136219820Sjeff* 137219820Sjeff* SYNOPSIS 138219820Sjeff*/ 139219820Sjefftypedef struct osm_subn_opt { 140219820Sjeff char *config_file; 141219820Sjeff ib_net64_t guid; 142219820Sjeff ib_net64_t m_key; 143219820Sjeff ib_net64_t sm_key; 144219820Sjeff ib_net64_t sa_key; 145219820Sjeff ib_net64_t subnet_prefix; 146219820Sjeff ib_net16_t m_key_lease_period; 147219820Sjeff uint32_t sweep_interval; 148219820Sjeff uint32_t max_wire_smps; 149219820Sjeff uint32_t transaction_timeout; 150219820Sjeff uint8_t sm_priority; 151219820Sjeff uint8_t lmc; 152219820Sjeff boolean_t lmc_esp0; 153219820Sjeff uint8_t max_op_vls; 154219820Sjeff uint8_t force_link_speed; 155219820Sjeff boolean_t reassign_lids; 156219820Sjeff boolean_t ignore_other_sm; 157219820Sjeff boolean_t single_thread; 158219820Sjeff boolean_t disable_multicast; 159219820Sjeff boolean_t force_log_flush; 160219820Sjeff uint8_t subnet_timeout; 161219820Sjeff uint8_t packet_life_time; 162219820Sjeff uint8_t vl_stall_count; 163219820Sjeff uint8_t leaf_vl_stall_count; 164219820Sjeff uint8_t head_of_queue_lifetime; 165219820Sjeff uint8_t leaf_head_of_queue_lifetime; 166219820Sjeff uint8_t local_phy_errors_threshold; 167219820Sjeff uint8_t overrun_errors_threshold; 168219820Sjeff uint32_t sminfo_polling_timeout; 169219820Sjeff uint32_t polling_retry_number; 170219820Sjeff uint32_t max_msg_fifo_timeout; 171219820Sjeff boolean_t force_heavy_sweep; 172219820Sjeff uint8_t log_flags; 173219820Sjeff char *dump_files_dir; 174219820Sjeff char *log_file; 175219820Sjeff unsigned long log_max_size; 176219820Sjeff char *partition_config_file; 177219820Sjeff boolean_t no_partition_enforcement; 178219820Sjeff boolean_t qos; 179219820Sjeff char *qos_policy_file; 180219820Sjeff boolean_t accum_log_file; 181219820Sjeff char *console; 182219820Sjeff uint16_t console_port; 183219820Sjeff char *port_prof_ignore_file; 184219820Sjeff boolean_t port_profile_switch_nodes; 185219820Sjeff boolean_t sweep_on_trap; 186219820Sjeff char *routing_engine_names; 187219820Sjeff boolean_t use_ucast_cache; 188219820Sjeff boolean_t connect_roots; 189219820Sjeff char *lid_matrix_dump_file; 190219820Sjeff char *lfts_file; 191219820Sjeff char *root_guid_file; 192219820Sjeff char *cn_guid_file; 193219820Sjeff char *ids_guid_file; 194219820Sjeff char *guid_routing_order_file; 195219820Sjeff char *sa_db_file; 196219820Sjeff boolean_t exit_on_fatal; 197219820Sjeff boolean_t honor_guid2lid_file; 198219820Sjeff boolean_t daemon; 199219820Sjeff boolean_t sm_inactive; 200219820Sjeff boolean_t babbling_port_policy; 201219820Sjeff osm_qos_options_t qos_options; 202219820Sjeff osm_qos_options_t qos_ca_options; 203219820Sjeff osm_qos_options_t qos_sw0_options; 204219820Sjeff osm_qos_options_t qos_swe_options; 205219820Sjeff osm_qos_options_t qos_rtr_options; 206219820Sjeff boolean_t enable_quirks; 207219820Sjeff boolean_t no_clients_rereg; 208219820Sjeff#ifdef ENABLE_OSM_PERF_MGR 209219820Sjeff boolean_t perfmgr; 210219820Sjeff boolean_t perfmgr_redir; 211219820Sjeff uint16_t perfmgr_sweep_time_s; 212219820Sjeff uint32_t perfmgr_max_outstanding_queries; 213219820Sjeff char *event_db_dump_file; 214219820Sjeff#endif /* ENABLE_OSM_PERF_MGR */ 215219820Sjeff char *event_plugin_name; 216219820Sjeff char *node_name_map_name; 217219820Sjeff char *prefix_routes_file; 218219820Sjeff boolean_t consolidate_ipv6_snm_req; 219219820Sjeff} osm_subn_opt_t; 220219820Sjeff/* 221219820Sjeff* FIELDS 222219820Sjeff* 223219820Sjeff* config_file 224219820Sjeff* The name of the config file. 225219820Sjeff* 226219820Sjeff* guid 227219820Sjeff* The port guid that the SM is binding to. 228219820Sjeff* 229219820Sjeff* m_key 230219820Sjeff* M_Key value sent to all ports qualifying all Set(PortInfo). 231219820Sjeff* 232219820Sjeff* sm_key 233219820Sjeff* SM_Key value of the SM used for SM authentication. 234219820Sjeff* 235219820Sjeff* sa_key 236219820Sjeff* SM_Key value to qualify rcv SA queries as "trusted". 237219820Sjeff* 238219820Sjeff* subnet_prefix 239219820Sjeff* Subnet prefix used on this subnet. 240219820Sjeff* 241219820Sjeff* m_key_lease_period 242219820Sjeff* The lease period used for the M_Key on this subnet. 243219820Sjeff* 244219820Sjeff* sweep_interval 245219820Sjeff* The number of seconds between subnet sweeps. A value of 0 246219820Sjeff* disables sweeping. 247219820Sjeff* 248219820Sjeff* max_wire_smps 249219820Sjeff* The maximum number of SMPs sent in parallel. Default is 4. 250219820Sjeff* 251219820Sjeff* transaction_timeout 252219820Sjeff* The maximum time in milliseconds allowed for a transaction 253219820Sjeff* to complete. Default is 200. 254219820Sjeff* 255219820Sjeff* sm_priority 256219820Sjeff* The priority of this SM as specified by the user. This 257219820Sjeff* value is made available in the SMInfo attribute. 258219820Sjeff* 259219820Sjeff* lmc 260219820Sjeff* The LMC value used on this subnet. 261219820Sjeff* 262219820Sjeff* lmc_esp0 263219820Sjeff* Whether LMC value used on subnet should be used for 264219820Sjeff* enhanced switch port 0 or not. If TRUE, it is used. 265219820Sjeff* Otherwise (the default), LMC is set to 0 for ESP0. 266219820Sjeff* 267219820Sjeff* max_op_vls 268219820Sjeff* Limit the maximal operational VLs. default is 1. 269219820Sjeff* 270219820Sjeff* reassign_lids 271219820Sjeff* If TRUE cause all lids to be re-assigend. 272219820Sjeff* Otherwise (the default), 273219820Sjeff* OpenSM always tries to preserve as LIDs as much as possible. 274219820Sjeff* 275219820Sjeff* ignore_other_sm_option 276219820Sjeff* This flag is TRUE if other SMs on the subnet should be ignored. 277219820Sjeff* 278219820Sjeff* disable_multicast 279219820Sjeff* This flag is TRUE if OpenSM should disable multicast support. 280219820Sjeff* 281219820Sjeff* max_msg_fifo_timeout 282219820Sjeff* The maximal time a message can stay in the incoming message 283219820Sjeff* queue. If there is more than one message in the queue and the 284219820Sjeff* last message stayed in the queue more than this value the SA 285219820Sjeff* request will be immediately returned with a BUSY status. 286219820Sjeff* 287219820Sjeff* subnet_timeout 288219820Sjeff* The subnet_timeout that will be set for all the ports in the 289219820Sjeff* design SubnSet(PortInfo.vl_stall_life)) 290219820Sjeff* 291219820Sjeff* vl_stall_count 292219820Sjeff* The number of sequential packets dropped that cause the port 293219820Sjeff* to enter the VLStalled state. 294219820Sjeff* 295219820Sjeff* leaf_vl_stall_count 296219820Sjeff* The number of sequential packets dropped that cause the port 297219820Sjeff* to enter the VLStalled state. This is for switch ports driving 298219820Sjeff* a CA or router port. 299219820Sjeff* 300219820Sjeff* head_of_queue_lifetime 301219820Sjeff* The maximal time a packet can live at the head of a VL queue 302219820Sjeff* on any port not driving a CA or router port. 303219820Sjeff* 304219820Sjeff* leaf_head_of_queue_lifetime 305219820Sjeff* The maximal time a packet can live at the head of a VL queue 306219820Sjeff* on switch ports driving a CA or router. 307219820Sjeff* 308219820Sjeff* local_phy_errors_threshold 309219820Sjeff* Threshold of local phy errors for sending Trap 129 310219820Sjeff* 311219820Sjeff* overrun_errors_threshold 312219820Sjeff* Threshold of credits overrun errors for sending Trap 129 313219820Sjeff* 314219820Sjeff* sminfo_polling_timeout 315219820Sjeff* Specifies the polling timeout (in milliseconds) - the timeout 316219820Sjeff* between one poll to another. 317219820Sjeff* 318219820Sjeff* packet_life_time 319219820Sjeff* The maximal time a packet can stay in a switch. 320219820Sjeff* The value is send to all switches as 321219820Sjeff* SubnSet(SwitchInfo.life_state) 322219820Sjeff* 323219820Sjeff* dump_files_dir 324219820Sjeff* The directory to be used for opensm-subnet.lst, opensm.fdbs, 325219820Sjeff* opensm.mcfdbs, and default log file (the latter for Windows, 326219820Sjeff* not Linux). 327219820Sjeff* 328219820Sjeff* log_file 329219820Sjeff* Name of the log file (or NULL) for stdout. 330219820Sjeff* 331219820Sjeff* log_max_size 332219820Sjeff* This option defines maximal log file size in MB. When 333219820Sjeff* specified the log file will be truncated upon reaching 334219820Sjeff* this limit. 335219820Sjeff* 336219820Sjeff* qos 337219820Sjeff* Boolean that specifies whether the OpenSM QoS functionality 338219820Sjeff* should be off or on. 339219820Sjeff* 340219820Sjeff* qos_policy_file 341219820Sjeff* Name of the QoS policy file. 342219820Sjeff* 343219820Sjeff* accum_log_file 344219820Sjeff* If TRUE (default) - the log file will be accumulated. 345219820Sjeff* If FALSE - the log file will be erased before starting 346219820Sjeff* current opensm run. 347219820Sjeff* 348219820Sjeff* port_prof_ignore_file 349219820Sjeff* Name of file with port guids to be ignored by port profiling. 350219820Sjeff* 351219820Sjeff* port_profile_switch_nodes 352219820Sjeff* If TRUE will count the number of switch nodes routed through 353219820Sjeff* the link. If FALSE - only CA/RT nodes are counted. 354219820Sjeff* 355219820Sjeff* sweep_on_trap 356219820Sjeff* Received traps will initiate a new sweep. 357219820Sjeff* 358219820Sjeff* routing_engine_names 359219820Sjeff* Name of routing engine(s) to use. 360219820Sjeff* 361219820Sjeff* connect_roots 362219820Sjeff* The option which will enforce root to root connectivity with 363219820Sjeff* up/down routing engine (even if this violates "pure" deadlock 364219820Sjeff* free up/down algorithm) 365219820Sjeff* 366219820Sjeff* use_ucast_cache 367219820Sjeff* When TRUE enables unicast routing cache. 368219820Sjeff* 369219820Sjeff* lid_matrix_dump_file 370219820Sjeff* Name of the lid matrix dump file from where switch 371219820Sjeff* lid matrices (min hops tables) will be loaded 372219820Sjeff* 373219820Sjeff* lfts_file 374219820Sjeff* Name of the unicast LFTs routing file from where switch 375219820Sjeff* forwarding tables will be loaded 376219820Sjeff* 377219820Sjeff* root_guid_file 378219820Sjeff* Name of the file that contains list of root guids that 379219820Sjeff* will be used by fat-tree or up/dn routing (provided by User) 380219820Sjeff* 381219820Sjeff* cn_guid_file 382219820Sjeff* Name of the file that contains list of compute node guids that 383219820Sjeff* will be used by fat-tree routing (provided by User) 384219820Sjeff* 385219820Sjeff* ids_guid_file 386219820Sjeff* Name of the file that contains list of ids which should be 387219820Sjeff* used by Up/Down algorithm instead of node GUIDs 388219820Sjeff* 389219820Sjeff* guid_routing_order_file 390219820Sjeff* Name of the file that contains list of guids for routing order 391219820Sjeff* that will be used by minhop and up/dn routing (provided by User). 392219820Sjeff* 393219820Sjeff* sa_db_file 394219820Sjeff* Name of the SA database file. 395219820Sjeff* 396219820Sjeff* exit_on_fatal 397219820Sjeff* If TRUE (default) - SM will exit on fatal subnet initialization 398219820Sjeff* issues. 399219820Sjeff* If FALSE - SM will not exit. 400219820Sjeff* Fatal initialization issues: 401219820Sjeff* a. SM recognizes 2 different nodes with the same guid, or 402219820Sjeff* 12x link with lane reversal badly configured. 403219820Sjeff* 404219820Sjeff* honor_guid2lid_file 405219820Sjeff* Always honor the guid2lid file if it exists and is valid. This 406219820Sjeff* means that the file will be honored when SM is coming out of 407219820Sjeff* STANDBY. By default this is FALSE. 408219820Sjeff* 409219820Sjeff* daemon 410219820Sjeff* OpenSM will run in daemon mode. 411219820Sjeff* 412219820Sjeff* sm_inactive 413219820Sjeff* OpenSM will start with SM in not active state. 414219820Sjeff* 415219820Sjeff* babbling_port_policy 416219820Sjeff* OpenSM will enforce its "babbling" port policy. 417219820Sjeff* 418219820Sjeff* perfmgr 419219820Sjeff* Enable or disable the performance manager 420219820Sjeff* 421219820Sjeff* perfmgr_redir 422219820Sjeff* Enable or disable the saving of redirection by PerfMgr 423219820Sjeff* 424219820Sjeff* perfmgr_sweep_time_s 425219820Sjeff* Define the period (in seconds) of PerfMgr sweeps 426219820Sjeff* 427219820Sjeff* event_db_dump_file 428219820Sjeff* File to dump the event database to 429219820Sjeff* 430219820Sjeff* event_db_plugin 431219820Sjeff* Specify the name of the event plugin 432219820Sjeff* 433219820Sjeff* qos_options 434219820Sjeff* Default set of QoS options 435219820Sjeff* 436219820Sjeff* qos_ca_options 437219820Sjeff* QoS options for CA ports 438219820Sjeff* 439219820Sjeff* qos_sw0_options 440219820Sjeff* QoS options for switches' port 0 441219820Sjeff* 442219820Sjeff* qos_swe_options 443219820Sjeff* QoS options for switches' external ports 444219820Sjeff* 445219820Sjeff* qos_rtr_options 446219820Sjeff* QoS options for router ports 447219820Sjeff* 448219820Sjeff* enable_quirks 449219820Sjeff* Enable high risk new features and not fully qualified 450219820Sjeff* hardware specific work arounds 451219820Sjeff* 452219820Sjeff* no_clients_rereg 453219820Sjeff* When TRUE disables clients reregistration request. 454219820Sjeff* 455219820Sjeff* SEE ALSO 456219820Sjeff* Subnet object 457219820Sjeff*********/ 458219820Sjeff 459219820Sjeff/****s* OpenSM: Subnet/osm_subn_t 460219820Sjeff* NAME 461219820Sjeff* osm_subn_t 462219820Sjeff* 463219820Sjeff* DESCRIPTION 464219820Sjeff* Subnet structure. Callers may directly access member components, 465219820Sjeff* after grabbing a lock. 466219820Sjeff* 467219820Sjeff* TO DO 468219820Sjeff* This structure should probably be volatile. 469219820Sjeff* 470219820Sjeff* SYNOPSIS 471219820Sjeff*/ 472219820Sjefftypedef struct osm_subn { 473219820Sjeff struct osm_opensm *p_osm; 474219820Sjeff cl_qmap_t sw_guid_tbl; 475219820Sjeff cl_qmap_t node_guid_tbl; 476219820Sjeff cl_qmap_t port_guid_tbl; 477219820Sjeff cl_qmap_t rtr_guid_tbl; 478219820Sjeff cl_qlist_t prefix_routes_list; 479219820Sjeff cl_qmap_t prtn_pkey_tbl; 480219820Sjeff cl_qmap_t sm_guid_tbl; 481219820Sjeff cl_qlist_t sa_sr_list; 482219820Sjeff cl_qlist_t sa_infr_list; 483219820Sjeff cl_ptr_vector_t port_lid_tbl; 484219820Sjeff ib_net16_t master_sm_base_lid; 485219820Sjeff ib_net16_t sm_base_lid; 486219820Sjeff ib_net64_t sm_port_guid; 487219820Sjeff uint8_t sm_state; 488219820Sjeff osm_subn_opt_t opt; 489219820Sjeff struct osm_qos_policy *p_qos_policy; 490219820Sjeff uint16_t max_ucast_lid_ho; 491219820Sjeff uint16_t max_mcast_lid_ho; 492219820Sjeff uint8_t min_ca_mtu; 493219820Sjeff uint8_t min_ca_rate; 494219820Sjeff boolean_t ignore_existing_lfts; 495219820Sjeff boolean_t subnet_initialization_error; 496219820Sjeff boolean_t force_heavy_sweep; 497219820Sjeff boolean_t force_reroute; 498219820Sjeff boolean_t in_sweep_hop_0; 499219820Sjeff boolean_t first_time_master_sweep; 500219820Sjeff boolean_t coming_out_of_standby; 501219820Sjeff unsigned need_update; 502219820Sjeff void *mgroups[IB_LID_MCAST_END_HO - IB_LID_MCAST_START_HO + 1]; 503219820Sjeff} osm_subn_t; 504219820Sjeff/* 505219820Sjeff* FIELDS 506219820Sjeff* sw_guid_tbl 507219820Sjeff* Container of pointers to all Switch objects in the subent. 508219820Sjeff* Indexed by node GUID. 509219820Sjeff* 510219820Sjeff* node_guid_tbl 511219820Sjeff* Container of pointers to all Node objects in the subent. 512219820Sjeff* Indexed by node GUID. 513219820Sjeff* 514219820Sjeff* port_guid_tbl 515219820Sjeff* Container of pointers to all Port objects in the subent. 516219820Sjeff* Indexed by port GUID - network order! 517219820Sjeff* 518219820Sjeff* rtr_guid_tbl 519219820Sjeff* Container of pointers to all Router objects in the subent. 520219820Sjeff* Indexed by node GUID. 521219820Sjeff* 522219820Sjeff* prtn_pkey_tbl 523219820Sjeff* Container of pointers to all Partition objects in the subnet. 524219820Sjeff* Indexed by P_KEY. 525219820Sjeff* 526219820Sjeff* sm_guid_tbl 527219820Sjeff* Container of pointers to SM objects representing other SMs 528219820Sjeff* on the subnet. 529219820Sjeff* 530219820Sjeff* port_lid_tbl 531219820Sjeff* Container of pointers to all Port objects in the subent. 532219820Sjeff* Indexed by port LID. 533219820Sjeff* 534219820Sjeff* master_sm_base_lid 535219820Sjeff* The base LID owned by the subnet's master SM. 536219820Sjeff* 537219820Sjeff* sm_base_lid 538219820Sjeff* The base LID of the local port where the SM is. 539219820Sjeff* 540219820Sjeff* sm_port_guid 541219820Sjeff* This SM's own port GUID. 542219820Sjeff* 543219820Sjeff* sm_state 544219820Sjeff* The high-level state of the SM. This value is made available 545219820Sjeff* in the SMInfo attribute. 546219820Sjeff* 547219820Sjeff* opt 548219820Sjeff* Subnet options structure contains site specific configuration. 549219820Sjeff* 550219820Sjeff* p_qos_policy 551219820Sjeff* Subnet QoS policy structure. 552219820Sjeff* 553219820Sjeff* max_ucast_lid_ho 554219820Sjeff* The minimal max unicast lid reported by all switches 555219820Sjeff* 556219820Sjeff* max_mcast_lid_ho 557219820Sjeff* The minimal max multicast lid reported by all switches 558219820Sjeff* 559219820Sjeff* min_ca_mtu 560219820Sjeff* The minimal MTU reported by all CAs ports on the subnet 561219820Sjeff* 562219820Sjeff* min_ca_rate 563219820Sjeff* The minimal rate reported by all CA ports on the subnet 564219820Sjeff* 565219820Sjeff* ignore_existing_lfts 566219820Sjeff* This flag is a dynamic flag to instruct the LFT assignment to 567219820Sjeff* ignore existing legal LFT settings. 568219820Sjeff* The value will be set according to : 569219820Sjeff* - Any change to the list of switches will set it to high 570219820Sjeff* - Coming out of STANDBY it will be cleared (other SM worked) 571219820Sjeff* - Set to FALSE upon end of all lft assignments. 572219820Sjeff* 573219820Sjeff* subnet_initalization_error 574219820Sjeff* Similar to the force_heavy_sweep flag. If TRUE - means that 575219820Sjeff* we had errors during initialization (due to SubnSet requests 576219820Sjeff* that failed). We want to declare the subnet as unhealthy, and 577219820Sjeff* force another heavy sweep. 578219820Sjeff* 579219820Sjeff* force_heavy_sweep 580219820Sjeff* If TRUE - we want to force a heavy sweep. This can be done 581219820Sjeff* either due to receiving of trap - meaning there is some change 582219820Sjeff* on the subnet, or we received a handover from a remote sm. 583219820Sjeff* In this case we want to sweep and reconfigure the entire 584219820Sjeff* subnet. This will cause another heavy sweep to occure when 585219820Sjeff* the current sweep is done. 586219820Sjeff* 587219820Sjeff* force_reroute 588219820Sjeff* If TRUE - we want to force switches in the fabric to be 589219820Sjeff* rerouted. 590219820Sjeff* 591219820Sjeff* in_sweep_hop_0 592219820Sjeff* When in_sweep_hop_0 flag is set to TRUE - this means we are 593219820Sjeff* in sweep_hop_0 - meaning we do not want to continue beyond 594219820Sjeff* the current node. 595219820Sjeff* This is relevant for the case of SM on switch, since in the 596219820Sjeff* switch info we need to signal somehow not to continue 597219820Sjeff* the sweeping. 598219820Sjeff* 599219820Sjeff* first_time_master_sweep 600219820Sjeff* This flag is used for the PortInfo setting. On the first 601219820Sjeff* sweep as master (meaning after moving from Standby|Discovering 602219820Sjeff* state), the SM must send a PortInfoSet to all ports. After 603219820Sjeff* that - we want to minimize the number of PortInfoSet requests 604219820Sjeff* sent, and to send only requests that change the value from 605219820Sjeff* what is updated in the port (or send a first request if this 606219820Sjeff* is a new port). We will set this flag to TRUE when entering 607219820Sjeff* the master state, and set it back to FALSE at the end of the 608219820Sjeff* drop manager. This is done since at the end of the drop manager 609219820Sjeff* we have updated all the ports that are reachable, and from now 610219820Sjeff* on these are the only ports we have data of. We don't want 611219820Sjeff* to send extra set requests to these ports anymore. 612219820Sjeff* 613219820Sjeff* coming_out_of_standby 614219820Sjeff* TRUE on the first sweep after the SM was in standby. 615219820Sjeff* Used for nulling any cache of LID and Routing. 616219820Sjeff* The flag is set true if the SM state was standby and now 617219820Sjeff* changed to MASTER it is reset at the end of the sweep. 618219820Sjeff* 619219820Sjeff* need_update 620219820Sjeff* This flag should be on during first non-master heavy 621219820Sjeff* (including pre-master discovery stage) 622219820Sjeff* 623219820Sjeff* mgroups 624219820Sjeff* Array of pointers to all Multicast Group objects in the subnet. 625219820Sjeff* Indexed by MLID offset from base MLID. 626219820Sjeff* 627219820Sjeff* SEE ALSO 628219820Sjeff* Subnet object 629219820Sjeff*********/ 630219820Sjeff 631219820Sjeff/****f* OpenSM: Subnet/osm_subn_construct 632219820Sjeff* NAME 633219820Sjeff* osm_subn_construct 634219820Sjeff* 635219820Sjeff* DESCRIPTION 636219820Sjeff* This function constructs a Subnet object. 637219820Sjeff* 638219820Sjeff* SYNOPSIS 639219820Sjeff*/ 640219820Sjeffvoid osm_subn_construct(IN osm_subn_t * const p_subn); 641219820Sjeff/* 642219820Sjeff* PARAMETERS 643219820Sjeff* p_subn 644219820Sjeff* [in] Pointer to a Subnet object to construct. 645219820Sjeff* 646219820Sjeff* RETURN VALUE 647219820Sjeff* This function does not return a value. 648219820Sjeff* 649219820Sjeff* NOTES 650219820Sjeff* Allows calling osm_subn_init, and osm_subn_destroy. 651219820Sjeff* 652219820Sjeff* Calling osm_subn_construct is a prerequisite to calling any other 653219820Sjeff* method except osm_subn_init. 654219820Sjeff* 655219820Sjeff* SEE ALSO 656219820Sjeff* Subnet object, osm_subn_init, osm_subn_destroy 657219820Sjeff*********/ 658219820Sjeff 659219820Sjeff/****f* OpenSM: Subnet/osm_subn_destroy 660219820Sjeff* NAME 661219820Sjeff* osm_subn_destroy 662219820Sjeff* 663219820Sjeff* DESCRIPTION 664219820Sjeff* The osm_subn_destroy function destroys a subnet, releasing 665219820Sjeff* all resources. 666219820Sjeff* 667219820Sjeff* SYNOPSIS 668219820Sjeff*/ 669219820Sjeffvoid osm_subn_destroy(IN osm_subn_t * const p_subn); 670219820Sjeff/* 671219820Sjeff* PARAMETERS 672219820Sjeff* p_subn 673219820Sjeff* [in] Pointer to a Subnet object to destroy. 674219820Sjeff* 675219820Sjeff* RETURN VALUE 676219820Sjeff* This function does not return a value. 677219820Sjeff* 678219820Sjeff* NOTES 679219820Sjeff* Performs any necessary cleanup of the specified Subnet object. 680219820Sjeff* Further operations should not be attempted on the destroyed object. 681219820Sjeff* This function should only be called after a call to osm_subn_construct 682219820Sjeff* or osm_subn_init. 683219820Sjeff* 684219820Sjeff* SEE ALSO 685219820Sjeff* Subnet object, osm_subn_construct, osm_subn_init 686219820Sjeff*********/ 687219820Sjeff 688219820Sjeff/****f* OpenSM: Subnet/osm_subn_init 689219820Sjeff* NAME 690219820Sjeff* osm_subn_init 691219820Sjeff* 692219820Sjeff* DESCRIPTION 693219820Sjeff* The osm_subn_init function initializes a Subnet object for use. 694219820Sjeff* 695219820Sjeff* SYNOPSIS 696219820Sjeff*/ 697219820Sjeffib_api_status_t 698219820Sjeffosm_subn_init(IN osm_subn_t * const p_subn, 699219820Sjeff IN struct osm_opensm *const p_osm, 700219820Sjeff IN const osm_subn_opt_t * const p_opt); 701219820Sjeff/* 702219820Sjeff* PARAMETERS 703219820Sjeff* p_subn 704219820Sjeff* [in] Pointer to an osm_subn_t object to initialize. 705219820Sjeff* 706219820Sjeff* p_opt 707219820Sjeff* [in] Pointer to the subnet options structure. 708219820Sjeff* 709219820Sjeff* RETURN VALUES 710219820Sjeff* IB_SUCCESS if the Subnet object was initialized successfully. 711219820Sjeff* 712219820Sjeff* NOTES 713219820Sjeff* Allows calling other Subnet methods. 714219820Sjeff* 715219820Sjeff* SEE ALSO 716219820Sjeff* Subnet object, osm_subn_construct, osm_subn_destroy 717219820Sjeff*********/ 718219820Sjeff 719219820Sjeff/* 720219820Sjeff Forward references. 721219820Sjeff*/ 722219820Sjeffstruct osm_mad_addr; 723219820Sjeffstruct osm_log; 724219820Sjeffstruct osm_switch; 725219820Sjeffstruct osm_physp; 726219820Sjeffstruct osm_port; 727219820Sjeffstruct osm_mgrp; 728219820Sjeff 729219820Sjeff/****f* OpenSM: Helper/osm_get_gid_by_mad_addr 730219820Sjeff* NAME 731219820Sjeff* osm_get_gid_by_mad_addr 732219820Sjeff* 733219820Sjeff* DESCRIPTION 734219820Sjeff* Looks for the requester gid in the mad address. 735219820Sjeff* 736219820Sjeff* Note: This code is not thread safe. Need to grab the lock before 737219820Sjeff* calling it. 738219820Sjeff* 739219820Sjeff* SYNOPSIS 740219820Sjeff*/ 741219820Sjeffib_api_status_t 742219820Sjeffosm_get_gid_by_mad_addr(IN struct osm_log *p_log, 743219820Sjeff IN const osm_subn_t * p_subn, 744219820Sjeff IN const struct osm_mad_addr *p_mad_addr, 745219820Sjeff OUT ib_gid_t * p_gid); 746219820Sjeff/* 747219820Sjeff* PARAMETERS 748219820Sjeff* p_log 749219820Sjeff* [in] Pointer to a log object. 750219820Sjeff* 751219820Sjeff* p_subn 752219820Sjeff* [in] Pointer to subnet object. 753219820Sjeff* 754219820Sjeff* p_mad_addr 755219820Sjeff* [in] Pointer to mad address object. 756219820Sjeff* 757219820Sjeff* p_gid 758219820Sjeff* [out] Pointer to the GID structure to fill in. 759219820Sjeff* 760219820Sjeff* RETURN VALUES 761219820Sjeff* IB_SUCCESS if able to find the GID by address given. 762219820Sjeff* 763219820Sjeff* NOTES 764219820Sjeff* 765219820Sjeff* SEE ALSO 766219820Sjeff*********/ 767219820Sjeff 768219820Sjeff/****f* OpenSM: Helper/osm_get_physp_by_mad_addr 769219820Sjeff* NAME 770219820Sjeff* osm_get_physp_by_mad_addr 771219820Sjeff* 772219820Sjeff* DESCRIPTION 773219820Sjeff* Looks for the requester physical port in the mad address. 774219820Sjeff* 775219820Sjeff* Note: This code is not thread safe. Need to grab the lock before 776219820Sjeff* calling it. 777219820Sjeff* 778219820Sjeff* SYNOPSIS 779219820Sjeff*/ 780219820Sjeffstruct osm_physp *osm_get_physp_by_mad_addr(IN struct osm_log *p_log, 781219820Sjeff IN const osm_subn_t * p_subn, 782219820Sjeff IN struct osm_mad_addr 783219820Sjeff *p_mad_addr); 784219820Sjeff/* 785219820Sjeff* PARAMETERS 786219820Sjeff* p_log 787219820Sjeff* [in] Pointer to a log object. 788219820Sjeff* 789219820Sjeff* p_subn 790219820Sjeff* [in] Pointer to subnet object. 791219820Sjeff* 792219820Sjeff* p_mad_addr 793219820Sjeff* [in] Pointer to mad address object. 794219820Sjeff* 795219820Sjeff* RETURN VALUES 796219820Sjeff* Pointer to requester physical port object if found. Null otherwise. 797219820Sjeff* 798219820Sjeff* NOTES 799219820Sjeff* 800219820Sjeff* SEE ALSO 801219820Sjeff*********/ 802219820Sjeff 803219820Sjeff/****f* OpenSM: Helper/osm_get_port_by_mad_addr 804219820Sjeff* NAME 805219820Sjeff* osm_get_port_by_mad_addr 806219820Sjeff* 807219820Sjeff* DESCRIPTION 808219820Sjeff* Looks for the requester port in the mad address. 809219820Sjeff* 810219820Sjeff* Note: This code is not thread safe. Need to grab the lock before 811219820Sjeff* calling it. 812219820Sjeff* 813219820Sjeff* SYNOPSIS 814219820Sjeff*/ 815219820Sjeffstruct osm_port *osm_get_port_by_mad_addr(IN struct osm_log *p_log, 816219820Sjeff IN const osm_subn_t * p_subn, 817219820Sjeff IN struct osm_mad_addr *p_mad_addr); 818219820Sjeff/* 819219820Sjeff* PARAMETERS 820219820Sjeff* p_log 821219820Sjeff* [in] Pointer to a log object. 822219820Sjeff* 823219820Sjeff* p_subn 824219820Sjeff* [in] Pointer to subnet object. 825219820Sjeff* 826219820Sjeff* p_mad_addr 827219820Sjeff* [in] Pointer to mad address object. 828219820Sjeff* 829219820Sjeff* RETURN VALUES 830219820Sjeff* Pointer to requester port object if found. Null otherwise. 831219820Sjeff* 832219820Sjeff* NOTES 833219820Sjeff* 834219820Sjeff* SEE ALSO 835219820Sjeff*********/ 836219820Sjeff 837219820Sjeff/****f* OpenSM: Subnet/osm_get_switch_by_guid 838219820Sjeff* NAME 839219820Sjeff* osm_get_switch_by_guid 840219820Sjeff* 841219820Sjeff* DESCRIPTION 842219820Sjeff* Looks for the given switch guid in the subnet table of switches by guid. 843219820Sjeff* NOTE: this code is not thread safe. Need to grab the lock before 844219820Sjeff* calling it. 845219820Sjeff* 846219820Sjeff* SYNOPSIS 847219820Sjeff*/ 848219820Sjeffstruct osm_switch *osm_get_switch_by_guid(IN const osm_subn_t * p_subn, 849219820Sjeff IN uint64_t guid); 850219820Sjeff/* 851219820Sjeff* PARAMETERS 852219820Sjeff* p_subn 853219820Sjeff* [in] Pointer to an osm_subn_t object 854219820Sjeff* 855219820Sjeff* guid 856219820Sjeff* [in] The node guid in host order 857219820Sjeff* 858219820Sjeff* RETURN VALUES 859219820Sjeff* The switch structure pointer if found. NULL otherwise. 860219820Sjeff* 861219820Sjeff* SEE ALSO 862219820Sjeff* Subnet object, osm_subn_construct, osm_subn_destroy, 863219820Sjeff* osm_switch_t 864219820Sjeff*********/ 865219820Sjeff 866219820Sjeff/****f* OpenSM: Subnet/osm_get_node_by_guid 867219820Sjeff* NAME 868219820Sjeff* osm_get_node_by_guid 869219820Sjeff* 870219820Sjeff* DESCRIPTION 871219820Sjeff* The looks for the given node giud in the subnet table of nodes by guid. 872219820Sjeff* NOTE: this code is not thread safe. Need to grab the lock before 873219820Sjeff* calling it. 874219820Sjeff* 875219820Sjeff* SYNOPSIS 876219820Sjeff*/ 877219820Sjeffstruct osm_node *osm_get_node_by_guid(IN osm_subn_t const *p_subn, 878219820Sjeff IN uint64_t guid); 879219820Sjeff/* 880219820Sjeff* PARAMETERS 881219820Sjeff* p_subn 882219820Sjeff* [in] Pointer to an osm_subn_t object 883219820Sjeff* 884219820Sjeff* guid 885219820Sjeff* [in] The node guid in host order 886219820Sjeff* 887219820Sjeff* RETURN VALUES 888219820Sjeff* The node structure pointer if found. NULL otherwise. 889219820Sjeff* 890219820Sjeff* SEE ALSO 891219820Sjeff* Subnet object, osm_subn_construct, osm_subn_destroy, 892219820Sjeff* osm_node_t 893219820Sjeff*********/ 894219820Sjeff 895219820Sjeff/****f* OpenSM: Subnet/osm_get_port_by_guid 896219820Sjeff* NAME 897219820Sjeff* osm_get_port_by_guid 898219820Sjeff* 899219820Sjeff* DESCRIPTION 900219820Sjeff* The looks for the given port guid in the subnet table of ports by guid. 901219820Sjeff* NOTE: this code is not thread safe. Need to grab the lock before 902219820Sjeff* calling it. 903219820Sjeff* 904219820Sjeff* SYNOPSIS 905219820Sjeff*/ 906219820Sjeffstruct osm_port *osm_get_port_by_guid(IN osm_subn_t const *p_subn, 907219820Sjeff IN ib_net64_t guid); 908219820Sjeff/* 909219820Sjeff* PARAMETERS 910219820Sjeff* p_subn 911219820Sjeff* [in] Pointer to an osm_subn_t object 912219820Sjeff* 913219820Sjeff* guid 914219820Sjeff* [in] The port guid in network order 915219820Sjeff* 916219820Sjeff* RETURN VALUES 917219820Sjeff* The port structure pointer if found. NULL otherwise. 918219820Sjeff* 919219820Sjeff* SEE ALSO 920219820Sjeff* Subnet object, osm_subn_construct, osm_subn_destroy, 921219820Sjeff* osm_port_t 922219820Sjeff*********/ 923219820Sjeff 924219820Sjeff/****f* OpenSM: Subnet/osm_get_mgrp_by_mlid 925219820Sjeff* NAME 926219820Sjeff* osm_get_mgrp_by_mlid 927219820Sjeff* 928219820Sjeff* DESCRIPTION 929219820Sjeff* The looks for the given multicast group in the subnet table by mlid. 930219820Sjeff* NOTE: this code is not thread safe. Need to grab the lock before 931219820Sjeff* calling it. 932219820Sjeff* 933219820Sjeff* SYNOPSIS 934219820Sjeff*/ 935219820Sjeffstatic inline 936219820Sjeffstruct osm_mgrp *osm_get_mgrp_by_mlid(osm_subn_t const *p_subn, ib_net16_t mlid) 937219820Sjeff{ 938219820Sjeff return p_subn->mgroups[cl_ntoh16(mlid) - IB_LID_MCAST_START_HO]; 939219820Sjeff} 940219820Sjeff/* 941219820Sjeff* PARAMETERS 942219820Sjeff* p_subn 943219820Sjeff* [in] Pointer to an osm_subn_t object 944219820Sjeff* 945219820Sjeff* mlid 946219820Sjeff* [in] The multicast group mlid in network order 947219820Sjeff* 948219820Sjeff* RETURN VALUES 949219820Sjeff* The multicast group structure pointer if found. NULL otherwise. 950219820Sjeff*********/ 951219820Sjeff 952219820Sjeff/****f* OpenSM: Helper/osm_get_physp_by_mad_addr 953219820Sjeff* NAME 954219820Sjeff* osm_get_physp_by_mad_addr 955219820Sjeff* 956219820Sjeff* DESCRIPTION 957219820Sjeff* Looks for the requester physical port in the mad address. 958219820Sjeff* 959219820Sjeff* Note: This code is not thread safe. Need to grab the lock before 960219820Sjeff* calling it. 961219820Sjeff* 962219820Sjeff* SYNOPSIS 963219820Sjeff*/ 964219820Sjeffstruct osm_physp *osm_get_physp_by_mad_addr(IN struct osm_log *p_log, 965219820Sjeff IN const osm_subn_t * p_subn, 966219820Sjeff IN struct osm_mad_addr 967219820Sjeff *p_mad_addr); 968219820Sjeff/* 969219820Sjeff* PARAMETERS 970219820Sjeff* p_log 971219820Sjeff* [in] Pointer to a log object. 972219820Sjeff* 973219820Sjeff* p_subn 974219820Sjeff* [in] Pointer to subnet object. 975219820Sjeff* 976219820Sjeff* p_mad_addr 977219820Sjeff* [in] Pointer to mad address object. 978219820Sjeff* 979219820Sjeff* RETURN VALUES 980219820Sjeff* Pointer to requester physical port object if found. Null otherwise. 981219820Sjeff* 982219820Sjeff* NOTES 983219820Sjeff* 984219820Sjeff* SEE ALSO 985219820Sjeff*********/ 986219820Sjeff 987219820Sjeff/****f* OpenSM: Subnet/osm_subn_set_default_opt 988219820Sjeff* NAME 989219820Sjeff* osm_subn_set_default_opt 990219820Sjeff* 991219820Sjeff* DESCRIPTION 992219820Sjeff* The osm_subn_set_default_opt function sets the default options. 993219820Sjeff* 994219820Sjeff* SYNOPSIS 995219820Sjeff*/ 996219820Sjeffvoid osm_subn_set_default_opt(IN osm_subn_opt_t * const p_opt); 997219820Sjeff/* 998219820Sjeff* PARAMETERS 999219820Sjeff* 1000219820Sjeff* p_opt 1001219820Sjeff* [in] Pointer to the subnet options structure. 1002219820Sjeff* 1003219820Sjeff* RETURN VALUES 1004219820Sjeff* None 1005219820Sjeff* 1006219820Sjeff* NOTES 1007219820Sjeff* 1008219820Sjeff* SEE ALSO 1009219820Sjeff* Subnet object, osm_subn_construct, osm_subn_destroy 1010219820Sjeff*********/ 1011219820Sjeff 1012219820Sjeff/****f* OpenSM: Subnet/osm_subn_parse_conf_file 1013219820Sjeff* NAME 1014219820Sjeff* osm_subn_parse_conf_file 1015219820Sjeff* 1016219820Sjeff* DESCRIPTION 1017219820Sjeff* The osm_subn_parse_conf_file function parses the configuration file 1018219820Sjeff* and sets the defaults accordingly. 1019219820Sjeff* 1020219820Sjeff* SYNOPSIS 1021219820Sjeff*/ 1022219820Sjeffint osm_subn_parse_conf_file(char *conf_file, osm_subn_opt_t * const p_opt); 1023219820Sjeff/* 1024219820Sjeff* PARAMETERS 1025219820Sjeff* 1026219820Sjeff* p_opt 1027219820Sjeff* [in] Pointer to the subnet options structure. 1028219820Sjeff* 1029219820Sjeff* RETURN VALUES 1030219820Sjeff* 0 on success, positive value if file doesn't exist, 1031219820Sjeff* negative value otherwise 1032219820Sjeff*********/ 1033219820Sjeff 1034219820Sjeff/****f* OpenSM: Subnet/osm_subn_rescan_conf_files 1035219820Sjeff* NAME 1036219820Sjeff* osm_subn_rescan_conf_files 1037219820Sjeff* 1038219820Sjeff* DESCRIPTION 1039219820Sjeff* The osm_subn_rescan_conf_files function parses the configuration 1040219820Sjeff* files and update selected subnet options 1041219820Sjeff* 1042219820Sjeff* SYNOPSIS 1043219820Sjeff*/ 1044219820Sjeffint osm_subn_rescan_conf_files(IN osm_subn_t * const p_subn); 1045219820Sjeff/* 1046219820Sjeff* PARAMETERS 1047219820Sjeff* 1048219820Sjeff* p_subn 1049219820Sjeff* [in] Pointer to the subnet structure. 1050219820Sjeff* 1051219820Sjeff* RETURN VALUES 1052219820Sjeff* 0 on success, positive value if file doesn't exist, 1053219820Sjeff* negative value otherwise 1054219820Sjeff* 1055219820Sjeff*********/ 1056219820Sjeff 1057219820Sjeff/****f* OpenSM: Subnet/osm_subn_output_conf 1058219820Sjeff* NAME 1059219820Sjeff* osm_subn_output_conf 1060219820Sjeff* 1061219820Sjeff* DESCRIPTION 1062219820Sjeff* Output configuration info 1063219820Sjeff* 1064219820Sjeff* SYNOPSIS 1065219820Sjeff*/ 1066219820Sjeffint osm_subn_output_conf(FILE *out, IN osm_subn_opt_t * const p_opt); 1067219820Sjeff/* 1068219820Sjeff* PARAMETERS 1069219820Sjeff* 1070219820Sjeff* out 1071219820Sjeff* [in] File stream to output to. 1072219820Sjeff* 1073219820Sjeff* p_opt 1074219820Sjeff* [in] Pointer to the subnet options structure. 1075219820Sjeff* 1076219820Sjeff* RETURN VALUES 1077219820Sjeff* 0 on success, negative value otherwise 1078219820Sjeff*********/ 1079219820Sjeff 1080219820Sjeff/****f* OpenSM: Subnet/osm_subn_write_conf_file 1081219820Sjeff* NAME 1082219820Sjeff* osm_subn_write_conf_file 1083219820Sjeff* 1084219820Sjeff* DESCRIPTION 1085219820Sjeff* Write the configuration file into the cache 1086219820Sjeff* 1087219820Sjeff* SYNOPSIS 1088219820Sjeff*/ 1089219820Sjeffint osm_subn_write_conf_file(char *file_name, IN osm_subn_opt_t * const p_opt); 1090219820Sjeff/* 1091219820Sjeff* PARAMETERS 1092219820Sjeff* 1093219820Sjeff* p_opt 1094219820Sjeff* [in] Pointer to the subnet options structure. 1095219820Sjeff* 1096219820Sjeff* RETURN VALUES 1097219820Sjeff* 0 on success, negative value otherwise 1098219820Sjeff* 1099219820Sjeff* NOTES 1100219820Sjeff* Assumes the conf file is part of the cache dir which defaults to 1101219820Sjeff* OSM_DEFAULT_CACHE_DIR or OSM_CACHE_DIR the name is opensm.opts 1102219820Sjeff*********/ 1103219820Sjeffint osm_subn_verify_config(osm_subn_opt_t * const p_opt); 1104219820Sjeff 1105219820SjeffEND_C_DECLS 1106219820Sjeff#endif /* _OSM_SUBNET_H_ */ 1107