[PATCH 30/35] monitor: add connection property options from connect-all

mwilck
2021-01-26T20:36:27Z

From: Martin Wilck <mwilck@suse.com>

This code is simply copied from fabrics_discover(). That's possible
because we simply access the fabric "cfg" variable directly.
These parameters are assumed to be constant over the runtime
of the monitor.

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
monitor.c | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/monitor.c b/monitor.c
index 37c9ace..ecf6706 100644
--- a/monitor.c
+++ b/monitor.c
@@ -669,6 +669,19 @@ static int monitor_parse_opts(const char *desc, int argc, char **argv)
OPT_FLAG("autoconnect", 'A', &mon_cfg.autoconnect, "automatically connect newly discovered controllers"),
OPT_FLAG("startup", 'U', &mon_cfg.start_ctrls, "start discovery controllers on startup"),
OPT_FLAG("persistent", 'p', &cfg.persistent, "persistent discovery connections"),
+ OPT_LIST("hostnqn", 'q', &cfg.hostnqn, "user-defined hostnqn (if default not used)"),
+ OPT_LIST("hostid", 'I', &cfg.hostid, "user-defined hostid (if default not used)"),
+ OPT_INT("keep-alive-tmo", 'k', &cfg.keep_alive_tmo, "keep alive timeout period in seconds"),
+ OPT_INT("reconnect-delay", 'c', &cfg.reconnect_delay, "reconnect timeout period in seconds"),
+ OPT_INT("ctrl-loss-tmo", 'l', &cfg.ctrl_loss_tmo, "controller loss timeout period in seconds"),
+ OPT_INT("tos", 'T', &cfg.tos, "type of service"),
+ OPT_FLAG("hdr_digest", 'g', &cfg.hdr_digest, "enable transport protocol header digest (TCP transport)"),
+ OPT_FLAG("data_digest", 'G', &cfg.data_digest, "enable transport protocol data digest (TCP transport)"),
+ OPT_INT("nr-io-queues", 'i', &cfg.nr_io_queues, "number of io queues to use (default is core count)"),
+ OPT_INT("nr-write-queues", 'W', &cfg.nr_write_queues, "number of write queues to use (default 0)"),
+ OPT_INT("nr-poll-queues", 'P', &cfg.nr_poll_queues, "number of poll queues to use (default 0)"),
+ OPT_INT("queue-size", 'Q', &cfg.queue_size, "number of io queue elements to use (default 128)"),
+ OPT_FLAG("matching", 'm', &cfg.matching_only, "connect only records matching the traddr"),
OPT_FLAG("silent", 'S', &quiet, "log level: silent"),
OPT_FLAG("verbose", 'v', &verbose, "log level: verbose"),
OPT_FLAG("debug", 'D', &debug, "log level: debug"),
--
2.29.2