ssa.c: Reverse order of update flag settings and interthread message sending

to eliminate potential race in checking flags later on

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
ssa.c: Add better handling of connection refusal in client

Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
core.c: In core_process_join, add node type to an existing log message

to help with debug when join fails

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
core.c: In core_process_join, start handling for node type changes

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
core.c: In core_process_join, when in member_map may also be in orphan list

so remove from orphan list as no longer orphaned

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
plugin/ibssa_opts.cfg: Updated prdb_dump comments

to be consistent with distrib/ibssa_opts.cfg

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
distrib/ibssa_opts.cfg: Change log_level from 0 to 1

as it's bit mask
Makes this consistent with plugin/ibssa_opts.cfg

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
distrib.c: Removed no longer used INITIAL_SUBNET_UP_DELAY define

Reported-by: Sasha Kotchubievsky <sashakot@mellanox.com>

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
core.c: Changed INITIAL_SUBNET_UP_DELAY from 1/2 second to 1 second

Needed for Kodiak subnet

Reported-by: Ilya Nelkenbaum <ilyan@mellanox.com>

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
acme.c: Changed acm_mode to ssa in gen_opts_temp

as we mostly want to run in SSA mode not ACM mode
easier for Kodiak and other installations

We will come back to revisit this later depending
on whether this is released or ACM with provider model is released.

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
plugin/core: Change from ibssa_opts.cfg to ibssa_core_opts.cfg

so no confusion with distribution layer

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
acm/acme.c: Improve PR verification

Currently if running 'ib_acme' with '-v' flag,
the only verification that is done, is checking
if the same path record exists in SA.

The verification is improved by adding comparison
of path record parameters (currently only 'mtu' and
'rate' are checked, but more parameters will be added
in future).

This verification improvement is needed for better and
more precise testings on Kodiak cluster.

Signed-off-by: Ilya Nelkenbaum <ilyan@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
ssa.c: Add ibv_get_device_list and ibv_query_port error info to log messages

Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
acm.c: Add ibv_get_device_list and ibv_query_port error info to log messages

Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
ssa.c: In ssa_access_handler, update access map on (ACM) client reconnection

Handle reconnection of ACM client in following scenario:
ibacm
...
pkill -9 ibacm
ibacm

Also, better handling of subsequent reset of "uninvolved" port in
SSA distribution tree
Same scenario as above with ibportstate reset of "uninvolved" port

When the downstream thread accepts connection for PRDB, it sends
SSA_CONN_DONE message to access thread. The client (ACM) GID is looked up
in the access map. When found, if the rsocket in the connection done message
is different from that in the map, it (the consumer entry in the map)
is updated to the new connection information (both rsock and LID).

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
ssa.c: Fix calloc return value checking in ssa_open_dev

Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
plugin/core.c: Add handling memory allocation failure for lft_change objects

Signed-off-by: Ilya Nelkenbaum <ilyan@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
plugin/ssa_comparison.c: Add handling of memory allocation failures

In case of  memory allocation failure that is not critical
for program execution, a proper message is written to
log and the program continues.

Signed-off-by: Ilya Nelkenbaum <ilyan@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
core.c: Increased INITIAL_SUBNET_UP_DELAY again

This time from 1 sec to 2 sec

Needed for 200 node Kodiak experiment

Found by Lenny and Sasha

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
ibssa _opts.cfg: Cosmetic change to a couple of comment lines

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