opensm/osm_helper.c: Fix commentary typo

12x FDR is 168 rather than 158 Gbps

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm: Fix opensm handover/relinquish corner case

When in master state and performing light sweeps, openSM ignores
other subnet managers in master state and fails to perform
handovers or relinquish control.  Handovers and relinquishing
master is only performed after a heavy sweep.  This can result
in two subnet managers being in master state, seeing each other
SM in master state, but both choose to do nothing about it.

This patch initiates a heavy sweep when another master subnet
manager is found during a light sweep.  This is sufficient to
start a handover or relinquish scenario.

Signed-off-by: Albert Chu <chu11@llnl.gov>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm: Reset client reregistration when receiving handover

When in master state and receiving a handover from another SM, reset the
client reregistration bit while reconfguring PortInfo settings.  While
this is normally handled only the first time a master sweep is done,
this is a special case in which it is required, because we do not know how
the other master SM may have configured/setup the fabric.  Most notably,
this is needed when multicast groups are re-created and we wish for
end nodes to re-join the multicast group of the new master SM.

Signed-off-by: Albert Chu <chu11@llnl.gov>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/osm_ucast_ftree.c: Fix some typos

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/opensm.8.in: Fix cut 'n paste error

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/include/iba/ib_types.h: fix comment typos and errors

Signed-off-by: Albert Chu <chu11@llnl.gov>
Signed-off-by: Alex Netes <alexne@mellanox.com>
include/opensm/osm_subnet.h: fix comment typos

Signed-off-by: Albert Chu <chu11@llnl.gov>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/osm_console.c: Add display of FDR10 ports to portstatus_parse

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/man/opensm.8.in: Add description for OSM_LOG_SYS logging flag

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm: osm_subnet.c: Updated patch to add error-reporting to the parsing of opensm.conf

This patch modifies the parse logic as follows:

1. Truncate the line at the first '#' character.
2. If the result is blank, skip to the next line.
3. If the first token in the line can be matched against a known token,
   process it as usual.
4. If the token cannot be matched against a known token, log an error message.

Signed-off-by Mike Heinz <michael.heinz@qlogic.com>
Signed-off-by Alex Netes <alexne@mellanox.com>
opensm: Add support for alias GUIDs

In order to support virtualized environments, alias GUID support
is added. Each virtualized environment can have an alias GUID
used for mapping to that environment.

This patch adds support for alias GUIDs by adding an alias guid
port table and populates it based on sets to SM GUIDInfo attribute
based on SA sets/deletes of GUIDInfoRecord. Base port as well
as alternate (alias) guids are included in this table.

An SM assigned GUID byte is added as a configuration option
where an alias GUID is formed from OpenFabrics OUI
followed by 40 bits xy 00 ab cd ef where xy is the SM assigned guid byte
and ab cd ef is an SM autogenerated 24 bits.

The SM assigned GUID byte should be configured as subnet unique.

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm: Make SA assigned guids persistent across port down/up events

Infrastructure in osm_subnet.[h c] with actual changes in
opensm/osm_sa_guidinfo_record.c

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm: Dump/load SA GUIDInfoRecords

into port alias guid table

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/osm_sa_guidinfo_record.c: Use OSM_VENDOR_ID_OPENIB define rather than IB_OPENIB_OUI

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/osm_sa_path_record.c: Add support for alias GUIDs

Use alias_port_guid_tbl to resolve SA path queries.
Any alias GUIDs in addition to the base port GUID
are present in the table based on SA sets and
deletes of GUIDInfoRecord.

Use this table for any DGID/SGID queries so if alias GUID is
used the alias GUID paths are also determined.

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm: Add multicast support for alias GUIDs

Add mcm_alias_port_tbl to osm_mgrp and use this for port GID/GUIDs.
Move scope_state, proxy_join, and port_gid from osm_mcm_port to
osm_mcm_alias_guid. This is the basis for SA queries. Still use
mcm_port_tbl for multicast routing.

In osm_drop_mgr::drop_mgr_remove_port, remove multicast ports sooner.
Rewrite osm_mgrp_delete_port to be based on mcm alias port table.
Change osm_mgrp_delete_port to take port rather than port guid as parameter.

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/osm_sa_guidinfo_record.c: In del_guidinfo, validate guid not in use

When deleting an alias GUID (by index), validate that the alias GUID
is not in current use (in a multicast group). If it is, issue SA denied
status.

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/osm_sa_multipath_record.c: Add support for alias GUIDs

Similar to osm_sa_path_record.c change for alias GUID support

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/osm_sa_service_record.c: Alias GUID support

In match_service_pkey_with_ports_pkey, use alias rather than base port
GUID list for service port determination

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/osm_sa.c: Change log level of message

for "Dump guidinfo" message

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>