.gitignore: Ignore m4/ folders

Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
ssa.c: In ssa_upstream_handle_op, start upstream queries when SSA_MSG_DB_UPDATE msg is received and ssa_db is NULL

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
ssa.c: Eliminate passing SSA DB object in internal prepare and ready messages

Don't have the SSA DB yet to pass (it would be the old/current one and
not the one about to come in and be passed in the update message).

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
core.c: Don't pass SSA DB object in prepare message in ssa_extract_db_update_prepare

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
ssa.c: In ssa_upstream_initiate_conn, enable keepalives for consumers (ACMs)

Consumer (ACM) nodes need to detect when the other end of the
connection goes away (e.g. SSA app on other end dies, also
doesn't detect a bounced port making it need to reconnect
and maybe rejoin too).

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
core.c: Fix compile warnings when simulator enabled (--enable-simulator)

src/core.c: In function #core_extract_handler#:
src/core.c:1377: warning: implicit declaration of function #core_orphan_adoption#
src/core.c:1396: warning: implicit declaration of function #core_dump_tree#

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Remove ref_count_obj support and replace with smdb_refcnt

As of the following commit, PRDBs are no longer reference counted:
commit 1b69ad459a0b8878fec889baedeedaa7c6b786ff
Author: Sasha Kotchubievsky <sashakot@mellanox.com>
Date:   Mon Nov 10 15:08:32 2014 +0200

    ssa.c: Decouple access and downstream threads during PRDB update

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

Since then, it is only SMDB which is reference counted. Reference
counting there is only an optimization to determine when
current SMDB is "in use" (in process of being transferred downstream).

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
ssa.c: Reorder parameters to ssa_db_update_init to be consistent with other APIs

svc parameter comes first (before SSA DB parameter)

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
ssa.c: Trivial reorder of local variables in ssa_access_map_callback

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
ssa.c: In ssa_calculate_prdb, add SMDB epoch to PRDB copy failed log message

Also, cosmetic commentary change

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
ssa.c: Cosmetic reformatting of ssa_access_context structure

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
ssa.c: Improved a couple of error log messages dealing with ssa_db struct allocation failures

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
ssa.c: In ssa_downstream_handler, remove epoch from log message when access send DB update message

Epoch is unused (invalid epoch) in such message

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
acm.c: Cosmetic change to warning log message in acm_issue_query

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
ssa.c: When rrecv 0 bytes, also log length supplied in rrecv call

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
core.c: Fix ssa_extract_process_smdb() method

Function logic that was used for working with reference count
object as argument was fixed.

Signed-off-by: Ilya Nelkenbaum <ilyan@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
ssa.c: Don't close upstream connection when IBV_EVENT_CLIENT_REREGISTER occurs

This change allows for SM failover/handover investigation.
The behavior could be changed in the future.

Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
[ssa.c, common.h]: Add log_data1 buffer

It will be used for log printing where two gids need to be
printed.

Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
[ssa.c, core.c]: Add parent_gid field to join query

Old parent will be taken into account in distribution tree
building.

Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Return parent type in response to join request

The parent's node type will be used in SM resiliency feature.
To struct ssa_svc, two new fields are added: primary_type and
secondary_type. At the moment, SSA supports only primary parent
type. secondary_type will be used in future.

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