opensm/perfmgr: Add config option to ignore Channel Adapters.

   On many fabrics nodes have monitoring software which can querry counters on
   the nodes (CA's) themselves.  In this case it may be more efficient to keep
   this perfmgr traffic off the subnet.

Signed-off-by: Ira Weiny <weiny2@llnl.gov>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/console: protect against 0 entered for the perfmgr sweep_time

The config file already has a check for 0.  This adds the same check to the
console "perfmgr sweep_time" command.

Signed-off-by: Ira Weiny <weiny2@llnl.gov>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm: perfmgr fix dump_counters

Mark ports in the DB as invalid until data arrives.

Signed-off-by: Ira Weiny <weiny2@llnl.gov>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm: perfmgr delete "inactive" nodes from the DB

When a node drops from the fabric the default behavior was to leave the node
data in the PerfMgr DB.  Add the option (with default set to TRUE) to delete
these "inactive" or missing nodes from the DB.

Signed-off-by: Ira Weiny <weiny2@llnl.gov>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm: perfmgr mark inactive nodes in perfmgr db

When "missing" nodes are not removed by default mark them as inactive.  In
addition, add a console option to remove them.

Signed-off-by: Ira Weiny <weiny2@llnl.gov>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/console: add "print all" to print_counters console command

Signed-off-by: Ira Weiny <weiny2@llnl.gov>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/console; add port option to perfmgr print_counters

Changes since V1:
	My rebase got cross wired for the console help message.  Fix this.

Signed-off-by: Ira Weiny <weiny2@llnl.gov>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/console: add abreviations for perfmgr commands

Add:
   "pm" for "perfmgr"
   "pc" for "print_counters"

Changes since V1:
	My rebase got cross wired for the console help message.  Fix this.

Signed-off-by: Ira Weiny <weiny2@llnl.gov>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/console: Add human readable output for perfmgr data counters

Signed-off-by: Ira Weiny <weiny2@llnl.gov>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/console: add perfmgr "print_errors" (pe) console command.

Only print ports with error counters > 0

Changes since V1:
	My rebase got cross wired for the console help message.  Fix this.

Signed-off-by: Ira Weiny <weiny2@llnl.gov>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/perfmgr: add logging of error counters

The initial performance manager only logged Symbol Error, Receive errors, and
xmit discards.  Additional errors from PortCounters should be logged.

   - Change error codes to use 4C3X, allows future expansion
   - Add perfmgr_log_errors flag (default true), allows users to reduce log
     spamming if they are using an alternate method to collect perfmgr data.

Changes since V1:
	Add help message within generated opensm.conf

Signed-off-by: Ira Weiny <weiny2@llnl.gov>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/perfmgr: fix endian conversion of PortCounters

Signed-off-by: Ira Weiny <weiny2@llnl.gov>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/osm_sa_mad_ctrl.c: Eliminate commented out code line

which would never be used in SA flow

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/osm_trap_rcv.c: Add better logging for traps 257 and 258

More logging for Bad P_Key (trap 257) and Bad Q_Key (trap 258)

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/osm_inform.c: Make log message format consistent for error messages

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/osm_sa_inform_info.c: Fix some error log messages

Make error numbers unique and make log message format consistent for error messages

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/osm_trap_rcv.c: Remove vestigial comment

Signed-off-by: Hal Rosenstock <hal#@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/osm_sa_path_record.c: Add missing end-of-line in the log message

Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/osm_madw.h: Fix a couple of cut 'n paste commentary errors

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Alex Netes <alexne@mellanox.com>
opensm/ib_types.h: Add CapabilityMask2 to notice for trap 144

Per MgtWG RefID #4855

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