netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2 net-next v1 0/7] tipc: updates for neighbour monitor
@ 2016-09-12 15:17 Parthasarathy Bhuvaragan
  2016-09-12 15:17 ` [PATCH iproute2 net-next v1 1/7] tipc: remove dead code Parthasarathy Bhuvaragan
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Parthasarathy Bhuvaragan @ 2016-09-12 15:17 UTC (permalink / raw)
  To: netdev; +Cc: tipc-discussion, jon.maloy, maloy

We add configuration support for the new link monitoring attributes.

Parthasarathy Bhuvaragan (7):
  tipc: remove dead code
  tipc: add link monitor set threshold
  tipc: add link monitor get threshold
  tipc: add link monitor summary
  tipc: refractor bearer to facilitate link monitor
  tipc: add link monitor list
  tipc: update man page for link monitor

 man/man8/tipc-link.8 | 104 +++++++++++++
 tipc/bearer.c        |  75 ++++++----
 tipc/bearer.h        |   4 +
 tipc/link.c          | 408 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 4 files changed, 556 insertions(+), 35 deletions(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH iproute2 net-next v1 1/7] tipc: remove dead code
  2016-09-12 15:17 [PATCH iproute2 net-next v1 0/7] tipc: updates for neighbour monitor Parthasarathy Bhuvaragan
@ 2016-09-12 15:17 ` Parthasarathy Bhuvaragan
  2016-09-12 15:17 ` [PATCH iproute2 net-next v1 2/7] tipc: add link monitor set threshold Parthasarathy Bhuvaragan
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Parthasarathy Bhuvaragan @ 2016-09-12 15:17 UTC (permalink / raw)
  To: netdev; +Cc: tipc-discussion, jon.maloy, maloy

remove dead code and a newline.

Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
---
 tipc/link.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/tipc/link.c b/tipc/link.c
index 061b1c534389..8bdc98224d39 100644
--- a/tipc/link.c
+++ b/tipc/link.c
@@ -90,7 +90,6 @@ static int link_get_cb(const struct nlmsghdr *nlh, void *data)
 	return MNL_CB_OK;
 }
 
-
 static int cmd_link_get_prop(struct nlmsghdr *nlh, const struct cmd *cmd,
 			     struct cmdl *cmdl, void *data)
 {
@@ -475,8 +474,6 @@ static int cmd_link_set_prop(struct nlmsghdr *nlh, const struct cmd *cmd,
 	mnl_attr_nest_end(nlh, attrs);
 
 	return msg_doit(nlh, link_get_cb, &prop);
-
-	return 0;
 }
 
 static int cmd_link_set(struct nlmsghdr *nlh, const struct cmd *cmd,
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH iproute2 net-next v1 2/7] tipc: add link monitor set threshold
  2016-09-12 15:17 [PATCH iproute2 net-next v1 0/7] tipc: updates for neighbour monitor Parthasarathy Bhuvaragan
  2016-09-12 15:17 ` [PATCH iproute2 net-next v1 1/7] tipc: remove dead code Parthasarathy Bhuvaragan
@ 2016-09-12 15:17 ` Parthasarathy Bhuvaragan
  2016-09-12 15:17 ` [PATCH iproute2 net-next v1 3/7] tipc: add link monitor get threshold Parthasarathy Bhuvaragan
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Parthasarathy Bhuvaragan @ 2016-09-12 15:17 UTC (permalink / raw)
  To: netdev; +Cc: jon.maloy, tipc-discussion

The command sets the activation threshold for the new
cluster ring supervision.
A sample usage is shown below:
$ tipc link monitor set threshold 4

$ tipc link monitor set -h
Usage: tipc monitor set PPROPERTY

PROPERTIES
 threshold SIZE - Set activation threshold for monitor

Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Tested-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
---
 tipc/link.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 68 insertions(+), 1 deletion(-)

diff --git a/tipc/link.c b/tipc/link.c
index 8bdc98224d39..3469cd302469 100644
--- a/tipc/link.c
+++ b/tipc/link.c
@@ -489,6 +489,71 @@ static int cmd_link_set(struct nlmsghdr *nlh, const struct cmd *cmd,
 	return run_cmd(nlh, cmd, cmds, cmdl, NULL);
 }
 
+static int cmd_link_mon_set_prop(struct nlmsghdr *nlh, const struct cmd *cmd,
+				 struct cmdl *cmdl, void *data)
+{
+	int size;
+	char buf[MNL_SOCKET_BUFFER_SIZE];
+	struct nlattr *attrs;
+
+	if (cmdl->argc != cmdl->optind + 1) {
+		fprintf(stderr, "error, missing value\n");
+		return -EINVAL;
+	}
+	size = atoi(shift_cmdl(cmdl));
+
+	if (!(nlh = msg_init(buf, TIPC_NL_MON_SET))) {
+		fprintf(stderr, "error, message initialisation failed\n");
+		return -1;
+	}
+	attrs = mnl_attr_nest_start(nlh, TIPC_NLA_MON);
+
+	mnl_attr_put_u32(nlh, TIPC_NLA_MON_ACTIVATION_THRESHOLD, size);
+
+	mnl_attr_nest_end(nlh, attrs);
+
+	return msg_doit(nlh, NULL, NULL);
+}
+
+static void cmd_link_mon_set_help(struct cmdl *cmdl)
+{
+	fprintf(stderr, "Usage: %s monitor set PPROPERTY\n\n"
+		"PROPERTIES\n"
+		" threshold SIZE	- Set monitor activation threshold\n",
+		cmdl->argv[0]);
+}
+
+static int cmd_link_mon_set(struct nlmsghdr *nlh, const struct cmd *cmd,
+			    struct cmdl *cmdl, void *data)
+{
+	const struct cmd cmds[] = {
+		{ "threshold",	cmd_link_mon_set_prop,	NULL },
+		{ NULL }
+	};
+
+	return run_cmd(nlh, cmd, cmds, cmdl, NULL);
+}
+
+static void cmd_link_mon_help(struct cmdl *cmdl)
+{
+	fprintf(stderr,
+		"Usage: %s montior COMMAND [ARGS] ...\n\n"
+		"COMMANDS\n"
+		" set                  - Set monitor properties\n",
+		cmdl->argv[0]);
+}
+
+static int cmd_link_mon(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl,
+			void *data)
+{
+	const struct cmd cmds[] = {
+		{ "set",	cmd_link_mon_set,	cmd_link_mon_set_help },
+		{ NULL }
+	};
+
+	return run_cmd(nlh, cmd, cmds, cmdl, NULL);
+}
+
 void cmd_link_help(struct cmdl *cmdl)
 {
 	fprintf(stderr,
@@ -498,7 +563,8 @@ void cmd_link_help(struct cmdl *cmdl)
 		" list                  - List links\n"
 		" get                   - Get various link properties\n"
 		" set                   - Set various link properties\n"
-		" statistics            - Show or reset statistics\n",
+		" statistics            - Show or reset statistics\n"
+		" monitor               - Show or set link supervision\n",
 		cmdl->argv[0]);
 }
 
@@ -510,6 +576,7 @@ int cmd_link(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl,
 		{ "list",	cmd_link_list,	NULL },
 		{ "set",	cmd_link_set,	cmd_link_set_help },
 		{ "statistics", cmd_link_stat,	cmd_link_stat_help },
+		{ "monitor",	cmd_link_mon,	cmd_link_mon_help },
 		{ NULL }
 	};
 
-- 
2.1.4


------------------------------------------------------------------------------

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH iproute2 net-next v1 3/7] tipc: add link monitor get threshold
  2016-09-12 15:17 [PATCH iproute2 net-next v1 0/7] tipc: updates for neighbour monitor Parthasarathy Bhuvaragan
  2016-09-12 15:17 ` [PATCH iproute2 net-next v1 1/7] tipc: remove dead code Parthasarathy Bhuvaragan
  2016-09-12 15:17 ` [PATCH iproute2 net-next v1 2/7] tipc: add link monitor set threshold Parthasarathy Bhuvaragan
@ 2016-09-12 15:17 ` Parthasarathy Bhuvaragan
  2016-09-12 15:17 ` [PATCH iproute2 net-next v1 4/7] tipc: add link monitor summary Parthasarathy Bhuvaragan
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Parthasarathy Bhuvaragan @ 2016-09-12 15:17 UTC (permalink / raw)
  To: netdev; +Cc: jon.maloy, tipc-discussion

The command prints the monitor activation threshold.
A sample usage is shown below:
$ tipc link monitor get threshold
32

$ tipc link monitor get -h
Usage: tipc monitor get PPROPERTY

PROPERTIES
 threshold      - Get monitor activation threshold

Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Tested-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
---
 tipc/link.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 55 insertions(+), 1 deletion(-)

diff --git a/tipc/link.c b/tipc/link.c
index 3469cd302469..3f0c32106772 100644
--- a/tipc/link.c
+++ b/tipc/link.c
@@ -534,12 +534,65 @@ static int cmd_link_mon_set(struct nlmsghdr *nlh, const struct cmd *cmd,
 	return run_cmd(nlh, cmd, cmds, cmdl, NULL);
 }
 
+static void cmd_link_mon_get_help(struct cmdl *cmdl)
+{
+	fprintf(stderr, "Usage: %s monitor get PPROPERTY \n\n"
+		"PROPERTIES\n"
+		" threshold 	- Get monitor activation threshold\n",
+		cmdl->argv[0]);
+}
+
+static int link_mon_get_cb(const struct nlmsghdr *nlh, void *data)
+{
+	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
+	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
+	struct nlattr *attrs[TIPC_NLA_MON_MAX + 1] = {};
+
+	mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
+	if (!info[TIPC_NLA_MON])
+		return MNL_CB_ERROR;
+
+	mnl_attr_parse_nested(info[TIPC_NLA_MON], parse_attrs, attrs);
+	if (!attrs[TIPC_NLA_MON_ACTIVATION_THRESHOLD])
+		return MNL_CB_ERROR;
+
+	printf("%u\n",
+	       mnl_attr_get_u32(attrs[TIPC_NLA_MON_ACTIVATION_THRESHOLD]));
+
+	return MNL_CB_OK;
+}
+
+static int cmd_link_mon_get_prop(struct nlmsghdr *nlh, const struct cmd *cmd,
+				 struct cmdl *cmdl, void *data)
+{
+	char buf[MNL_SOCKET_BUFFER_SIZE];
+
+	if (!(nlh = msg_init(buf, TIPC_NL_MON_GET))) {
+		fprintf(stderr, "error, message initialisation failed\n");
+		return -1;
+	}
+
+	return msg_doit(nlh,	link_mon_get_cb,	NULL);
+}
+
+static int cmd_link_mon_get(struct nlmsghdr *nlh, const struct cmd *cmd,
+			    struct cmdl *cmdl, void *data)
+{
+	const struct cmd cmds[] = {
+		{ "threshold",	cmd_link_mon_get_prop,	NULL},
+		{ NULL }
+	};
+
+	return run_cmd(nlh, cmd, cmds, cmdl, NULL);
+}
+
 static void cmd_link_mon_help(struct cmdl *cmdl)
 {
 	fprintf(stderr,
 		"Usage: %s montior COMMAND [ARGS] ...\n\n"
 		"COMMANDS\n"
-		" set                  - Set monitor properties\n",
+		" set			- Set monitor properties\n"
+		" get			- Get monitor properties\n",
 		cmdl->argv[0]);
 }
 
@@ -548,6 +601,7 @@ static int cmd_link_mon(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl
 {
 	const struct cmd cmds[] = {
 		{ "set",	cmd_link_mon_set,	cmd_link_mon_set_help },
+		{ "get",	cmd_link_mon_get,	cmd_link_mon_get_help },
 		{ NULL }
 	};
 
-- 
2.1.4


------------------------------------------------------------------------------

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH iproute2 net-next v1 4/7] tipc: add link monitor summary
  2016-09-12 15:17 [PATCH iproute2 net-next v1 0/7] tipc: updates for neighbour monitor Parthasarathy Bhuvaragan
                   ` (2 preceding siblings ...)
  2016-09-12 15:17 ` [PATCH iproute2 net-next v1 3/7] tipc: add link monitor get threshold Parthasarathy Bhuvaragan
@ 2016-09-12 15:17 ` Parthasarathy Bhuvaragan
  2016-09-12 15:17 ` [PATCH iproute2 net-next v1 5/7] tipc: refractor bearer to facilitate link monitor Parthasarathy Bhuvaragan
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Parthasarathy Bhuvaragan @ 2016-09-12 15:17 UTC (permalink / raw)
  To: netdev; +Cc: tipc-discussion, jon.maloy, maloy

The monitor summary command prints the basic attributes
specific to the local node.
A sample usage is shown below:
$ tipc link monitor summary
bearer eth:data0
    table_generation 15
    cluster_size 8
    algorithm overlapping-ring

bearer eth:data1
    table_generation 15
    cluster_size 8
    algorithm overlapping-ring

$ tipc link monitor summary -h
Usage: tipc monitor summary

Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Tested-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
---
 tipc/link.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 46 insertions(+), 1 deletion(-)

diff --git a/tipc/link.c b/tipc/link.c
index 3f0c32106772..df93409f2173 100644
--- a/tipc/link.c
+++ b/tipc/link.c
@@ -515,6 +515,49 @@ static int cmd_link_mon_set_prop(struct nlmsghdr *nlh, const struct cmd *cmd,
 	return msg_doit(nlh, NULL, NULL);
 }
 
+static int link_mon_summary_cb(const struct nlmsghdr *nlh, void *data)
+{
+	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
+	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
+	struct nlattr *attrs[TIPC_NLA_MON_MAX + 1] = {};
+
+	mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
+	if (!info[TIPC_NLA_MON])
+		return MNL_CB_ERROR;
+
+	mnl_attr_parse_nested(info[TIPC_NLA_MON], parse_attrs, attrs);
+
+	printf("\nbearer %s\n",
+		mnl_attr_get_str(attrs[TIPC_NLA_MON_BEARER_NAME]));
+
+	printf("    table_generation %u\n",
+	       mnl_attr_get_u32(attrs[TIPC_NLA_MON_LISTGEN]));
+	printf("    cluster_size %u\n",
+		mnl_attr_get_u32(attrs[TIPC_NLA_MON_PEERCNT]));
+	printf("    algorithm %s\n",
+		attrs[TIPC_NLA_MON_ACTIVE] ? "overlapping-ring" : "full-mesh");
+
+	return MNL_CB_OK;
+}
+
+static int cmd_link_mon_summary(struct nlmsghdr *nlh, const struct cmd *cmd,
+				struct cmdl *cmdl, void *data)
+{
+	char buf[MNL_SOCKET_BUFFER_SIZE];
+
+	if (help_flag) {
+		fprintf(stderr,	"Usage: %s monitor summary\n", cmdl->argv[0]);
+		return -EINVAL;
+	}
+
+	if (!(nlh = msg_init(buf, TIPC_NL_MON_GET))) {
+		fprintf(stderr, "error, message initialisation failed\n");
+		return -1;
+	}
+
+	return msg_dumpit(nlh, link_mon_summary_cb, NULL);
+}
+
 static void cmd_link_mon_set_help(struct cmdl *cmdl)
 {
 	fprintf(stderr, "Usage: %s monitor set PPROPERTY\n\n"
@@ -592,7 +635,8 @@ static void cmd_link_mon_help(struct cmdl *cmdl)
 		"Usage: %s montior COMMAND [ARGS] ...\n\n"
 		"COMMANDS\n"
 		" set			- Set monitor properties\n"
-		" get			- Get monitor properties\n",
+		" get			- Get monitor properties\n"
+		" summary		- Show local node monitor summary\n",
 		cmdl->argv[0]);
 }
 
@@ -602,6 +646,7 @@ static int cmd_link_mon(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl
 	const struct cmd cmds[] = {
 		{ "set",	cmd_link_mon_set,	cmd_link_mon_set_help },
 		{ "get",	cmd_link_mon_get,	cmd_link_mon_get_help },
+		{ "summary",	cmd_link_mon_summary,	NULL },
 		{ NULL }
 	};
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH iproute2 net-next v1 5/7] tipc: refractor bearer to facilitate link monitor
  2016-09-12 15:17 [PATCH iproute2 net-next v1 0/7] tipc: updates for neighbour monitor Parthasarathy Bhuvaragan
                   ` (3 preceding siblings ...)
  2016-09-12 15:17 ` [PATCH iproute2 net-next v1 4/7] tipc: add link monitor summary Parthasarathy Bhuvaragan
@ 2016-09-12 15:17 ` Parthasarathy Bhuvaragan
  2016-09-12 15:17 ` [PATCH iproute2 net-next v1 6/7] tipc: add link monitor list Parthasarathy Bhuvaragan
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Parthasarathy Bhuvaragan @ 2016-09-12 15:17 UTC (permalink / raw)
  To: netdev; +Cc: jon.maloy, tipc-discussion

In this commit, we:
1. Export print_bearer_media()
2. Move the bearer name handling from nl_add_bearer_name() into
   a new function cmd_get_unique_bearer_name().

These exported functions will be used by link monitor used in
subsequent commits.

Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
---
 tipc/bearer.c | 75 +++++++++++++++++++++++++++++++++++------------------------
 tipc/bearer.h |  4 ++++
 2 files changed, 48 insertions(+), 31 deletions(-)

diff --git a/tipc/bearer.c b/tipc/bearer.c
index 8729dad4a060..810344f672af 100644
--- a/tipc/bearer.c
+++ b/tipc/bearer.c
@@ -45,7 +45,7 @@ static void _print_bearer_opts(void)
 		" window                - Bearer link window\n");
 }
 
-static void _print_bearer_media(void)
+void print_bearer_media(void)
 {
 	fprintf(stderr,
 		"\nMEDIA\n"
@@ -192,14 +192,28 @@ static int nl_add_udp_enable_opts(struct nlmsghdr *nlh, struct opt *opts,
 }
 
 static int nl_add_bearer_name(struct nlmsghdr *nlh, const struct cmd *cmd,
-			   struct cmdl *cmdl, struct opt *opts,
-			   struct tipc_sup_media sup_media[])
+			      struct cmdl *cmdl, struct opt *opts,
+			      const struct tipc_sup_media *sup_media)
+{
+	char bname[TIPC_MAX_BEARER_NAME];
+	int err;
+
+	if ((err = cmd_get_unique_bearer_name(cmd, cmdl, opts, bname, sup_media)))
+		return err;
+
+	mnl_attr_put_strz(nlh, TIPC_NLA_BEARER_NAME, bname);
+	return 0;
+}
+
+int cmd_get_unique_bearer_name(const struct cmd *cmd, struct cmdl *cmdl,
+			       struct opt *opts, char *bname,
+			       const struct tipc_sup_media *sup_media)
 {
-	char id[TIPC_MAX_BEARER_NAME];
 	char *media;
 	char *identifier;
 	struct opt *opt;
-	struct tipc_sup_media *entry;
+	const struct tipc_sup_media *entry;
+
 
 	if (!(opt = get_opt(opts, "media"))) {
 		if (help_flag)
@@ -219,13 +233,12 @@ static int nl_add_bearer_name(struct nlmsghdr *nlh, const struct cmd *cmd,
 				(entry->help)(cmdl, media);
 			else
 				fprintf(stderr, "error, missing bearer %s\n",
-						entry->identifier);
+					entry->identifier);
 			return -EINVAL;
 		}
 
 		identifier = opt->val;
-		snprintf(id, sizeof(id), "%s:%s", media, identifier);
-		mnl_attr_put_strz(nlh, TIPC_NLA_BEARER_NAME, id);
+		snprintf(bname, TIPC_MAX_BEARER_NAME, "%s:%s", media, identifier);
 
 		return 0;
 	}
@@ -270,13 +283,13 @@ static int udp_bearer_add(struct nlmsghdr *nlh, struct opt *opts,
 
 		if ((err = getaddrinfo(ip, remport, &hints, &addr))) {
 			fprintf(stderr, "UDP address error: %s\n",
-					gai_strerror(err));
+				gai_strerror(err));
 			freeaddrinfo(addr);
 			return err;
 		}
 
 		mnl_attr_put(nlh, TIPC_NLA_UDP_REMOTE, addr->ai_addrlen,
-				addr->ai_addr);
+			     addr->ai_addr);
 		freeaddrinfo(addr);
 	} else {
 		fprintf(stderr, "error, missing remoteip\n");
@@ -302,7 +315,7 @@ static int cmd_bearer_add_media(struct nlmsghdr *nlh, const struct cmd *cmd,
 		{ "media",		OPT_KEYVAL,	NULL },
 		{ NULL }
 	};
-	struct tipc_sup_media sup_media[] = {
+	const struct tipc_sup_media sup_media[] = {
 		{ "udp",	"name",		cmd_bearer_add_udp_help},
 		{ NULL, },
 	};
@@ -366,7 +379,7 @@ static void cmd_bearer_enable_help(struct cmdl *cmdl)
 		" domain DOMAIN         - Discovery domain\n"
 		" priority PRIORITY     - Bearer priority\n",
 		cmdl->argv[0]);
-	_print_bearer_media();
+	print_bearer_media();
 }
 
 static int cmd_bearer_enable(struct nlmsghdr *nlh, const struct cmd *cmd,
@@ -389,9 +402,9 @@ static int cmd_bearer_enable(struct nlmsghdr *nlh, const struct cmd *cmd,
 		{ NULL }
 	};
 	struct tipc_sup_media sup_media[] = {
-		{ "udp",	"name",		cmd_bearer_enable_udp_help},
-		{ "eth",	"device",	cmd_bearer_enable_l2_help },
-		{ "ib",		"device",	cmd_bearer_enable_l2_help },
+		{ "udp",        "name",         cmd_bearer_enable_udp_help},
+		{ "eth",        "device",       cmd_bearer_enable_l2_help },
+		{ "ib",         "device",       cmd_bearer_enable_l2_help },
 		{ NULL, },
 	};
 
@@ -449,7 +462,7 @@ static void cmd_bearer_disable_help(struct cmdl *cmdl)
 {
 	fprintf(stderr, "Usage: %s bearer disable media MEDIA ARGS...\n",
 		cmdl->argv[0]);
-	_print_bearer_media();
+	print_bearer_media();
 }
 
 static int cmd_bearer_disable(struct nlmsghdr *nlh, const struct cmd *cmd,
@@ -465,9 +478,9 @@ static int cmd_bearer_disable(struct nlmsghdr *nlh, const struct cmd *cmd,
 		{ NULL }
 	};
 	struct tipc_sup_media sup_media[] = {
-		{ "udp",	"name",		cmd_bearer_disable_udp_help},
-		{ "eth",	"device",	cmd_bearer_disable_l2_help },
-		{ "ib",		"device",	cmd_bearer_disable_l2_help },
+		{ "udp",        "name",         cmd_bearer_disable_udp_help},
+		{ "eth",        "device",       cmd_bearer_disable_l2_help },
+		{ "ib",         "device",       cmd_bearer_disable_l2_help },
 		{ NULL, },
 	};
 
@@ -497,7 +510,7 @@ static void cmd_bearer_set_help(struct cmdl *cmdl)
 	fprintf(stderr, "Usage: %s bearer set OPTION media MEDIA ARGS...\n",
 		cmdl->argv[0]);
 	_print_bearer_opts();
-	_print_bearer_media();
+	print_bearer_media();
 }
 
 static void cmd_bearer_set_udp_help(struct cmdl *cmdl, char *media)
@@ -516,7 +529,7 @@ static void cmd_bearer_set_l2_help(struct cmdl *cmdl, char *media)
 }
 
 static int cmd_bearer_set_prop(struct nlmsghdr *nlh, const struct cmd *cmd,
-			 struct cmdl *cmdl, void *data)
+			       struct cmdl *cmdl, void *data)
 {
 	int err;
 	int val;
@@ -531,9 +544,9 @@ static int cmd_bearer_set_prop(struct nlmsghdr *nlh, const struct cmd *cmd,
 		{ NULL }
 	};
 	struct tipc_sup_media sup_media[] = {
-		{ "udp",	"name",		cmd_bearer_set_udp_help},
-		{ "eth",	"device",	cmd_bearer_set_l2_help },
-		{ "ib",		"device",	cmd_bearer_set_l2_help },
+		{ "udp",        "name",         cmd_bearer_set_udp_help},
+		{ "eth",        "device",       cmd_bearer_set_l2_help },
+		{ "ib",         "device",       cmd_bearer_set_l2_help },
 		{ NULL, },
 	};
 
@@ -592,7 +605,7 @@ static void cmd_bearer_get_help(struct cmdl *cmdl)
 	fprintf(stderr, "Usage: %s bearer get [OPTION] media MEDIA ARGS...\n",
 		cmdl->argv[0]);
 	_print_bearer_opts();
-	_print_bearer_media();
+	print_bearer_media();
 }
 
 static void cmd_bearer_get_udp_help(struct cmdl *cmdl, char *media)
@@ -639,7 +652,7 @@ static int bearer_dump_udp_cb(const struct nlmsghdr *nlh, void *data)
 		struct sockaddr_in6 *ipv6 = (struct sockaddr_in6 *) addr;
 
 		if (!inet_ntop(AF_INET6, &ipv6->sin6_addr, straddr,
-					sizeof(straddr))) {
+			       sizeof(straddr))) {
 			fprintf(stderr, "error, parsing IPv6 addr\n");
 			return MNL_CB_ERROR;
 		}
@@ -705,7 +718,7 @@ static int bearer_get_udp_cb(const struct nlmsghdr *nlh, void *data)
 		switch (cb_data->prop) {
 		case UDP_PROP_IP:
 			if (!inet_ntop(AF_INET6, &ipv6->sin6_addr, straddr,
-						sizeof(straddr))) {
+				       sizeof(straddr))) {
 				fprintf(stderr, "error, parsing IPv6 addr\n");
 				return MNL_CB_ERROR;
 			}
@@ -769,7 +782,7 @@ static int cmd_bearer_get_media(struct nlmsghdr *nlh, const struct cmd *cmd,
 		{ NULL }
 	};
 	struct tipc_sup_media sup_media[] = {
-		{ "udp",	"name",		cmd_bearer_get_udp_help},
+		{ "udp",        "name",         cmd_bearer_get_udp_help},
 		{ NULL, },
 	};
 
@@ -844,9 +857,9 @@ static int cmd_bearer_get_prop(struct nlmsghdr *nlh, const struct cmd *cmd,
 		{ NULL }
 	};
 	struct tipc_sup_media sup_media[] = {
-		{ "udp",	"name",		cmd_bearer_get_udp_help},
-		{ "eth",	"device",	cmd_bearer_get_l2_help },
-		{ "ib",		"device",	cmd_bearer_get_l2_help },
+		{ "udp",        "name",         cmd_bearer_get_udp_help},
+		{ "eth",        "device",       cmd_bearer_get_l2_help },
+		{ "ib",         "device",       cmd_bearer_get_l2_help },
 		{ NULL, },
 	};
 
diff --git a/tipc/bearer.h b/tipc/bearer.h
index 9459d65ebb5f..c0d099630b27 100644
--- a/tipc/bearer.h
+++ b/tipc/bearer.h
@@ -19,4 +19,8 @@ extern int help_flag;
 int cmd_bearer(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl, void *data);
 void cmd_bearer_help(struct cmdl *cmdl);
 
+void print_bearer_media(void);
+int cmd_get_unique_bearer_name(const struct cmd *cmd, struct cmdl *cmdl,
+			       struct opt *opts, char *bname,
+			       const struct tipc_sup_media *sup_media);
 #endif
-- 
2.1.4


------------------------------------------------------------------------------

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH iproute2 net-next v1 6/7] tipc: add link monitor list
  2016-09-12 15:17 [PATCH iproute2 net-next v1 0/7] tipc: updates for neighbour monitor Parthasarathy Bhuvaragan
                   ` (4 preceding siblings ...)
  2016-09-12 15:17 ` [PATCH iproute2 net-next v1 5/7] tipc: refractor bearer to facilitate link monitor Parthasarathy Bhuvaragan
@ 2016-09-12 15:17 ` Parthasarathy Bhuvaragan
  2016-09-12 15:17 ` [PATCH iproute2 net-next v1 7/7] tipc: update man page for link monitor Parthasarathy Bhuvaragan
  2016-09-20 16:39 ` [PATCH iproute2 net-next v1 0/7] tipc: updates for neighbour monitor Stephen Hemminger
  7 siblings, 0 replies; 9+ messages in thread
From: Parthasarathy Bhuvaragan @ 2016-09-12 15:17 UTC (permalink / raw)
  To: netdev; +Cc: jon.maloy, tipc-discussion

In this commit, we list the monitor attributes. By default it lists
the attributes for all bearers, otherwise the specified bearer.

A sample usage is shown below:
$ tipc link monitor list

bearer eth:data0
node          status monitored generation applied_node_status [non_applied_node:status]
1.1.1         up     direct    16         UU []
1.1.2         up     direct    16         UU []
1.1.3         up     direct    16         UU []

bearer eth:data1
node          status monitored generation applied_node_status [non_applied_node:status]
1.1.1         up     direct    2          UU []
1.1.2         up     direct    3          UU []
1.1.3         up     direct    3          UU []

$ tipc link monitor list media eth device data0

bearer eth:data0
node          status monitored generation applied_node_status [non_applied_node:status]
1.1.1         up     direct    16         UU []
1.1.2         up     direct    16         UU []
1.1.3         up     direct    16         UU []

$ tipc link monitor list -h
Usage: tipc monitor list [ media MEDIA ARGS...]

MEDIA
 udp                   - User Datagram Protocol
 ib                    - Infiniband
 eth                   - Ethernet

Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Tested-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
---
 tipc/link.c | 237 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 237 insertions(+)

diff --git a/tipc/link.c b/tipc/link.c
index df93409f2173..0b5c0491a35f 100644
--- a/tipc/link.c
+++ b/tipc/link.c
@@ -22,6 +22,7 @@
 #include "cmdl.h"
 #include "msg.h"
 #include "link.h"
+#include "bearer.h"
 
 static int link_list_cb(const struct nlmsghdr *nlh, void *data)
 {
@@ -558,6 +559,240 @@ static int cmd_link_mon_summary(struct nlmsghdr *nlh, const struct cmd *cmd,
 	return msg_dumpit(nlh, link_mon_summary_cb, NULL);
 }
 
+#define STATUS_WIDTH 7
+#define MAX_NODE_WIDTH 14 /* 255.4095.4095 */
+#define MAX_DOM_GEN_WIDTH 11 /* 65535 */
+#define DIRECTLY_MON_WIDTH 10
+
+#define APPL_NODE_STATUS_WIDTH 5
+
+static int map_get(uint64_t up_map, int i)
+{
+	return (up_map & (1 << i)) >> i;
+}
+
+/* print the applied members, since we know the the members
+ * are listed in ascending order, we print only the state */
+static void link_mon_print_applied(uint16_t applied, uint64_t up_map)
+{
+	int i;
+	char state;
+
+	for (i = 0; i < applied; i++) {
+		/* print the delimiter for every -n- entry */
+		if (i && !(i % APPL_NODE_STATUS_WIDTH))
+			printf(",");
+
+		state = map_get(up_map, i) ? 'U' : 'D';
+		printf("%c", state);
+	}
+}
+
+/* print the non applied members, since we dont know
+ * the members, we print them along with the state */
+static void link_mon_print_non_applied(uint16_t applied, uint16_t member_cnt,
+				       uint64_t up_map,  uint32_t *members)
+{
+	int i;
+	char state;
+
+	printf(" [");
+	for (i = applied; i < member_cnt; i++) {
+		char addr_str[16];
+
+		/* print the delimiter for every entry */
+		if (i != applied)
+			printf(",");
+
+		sprintf(addr_str, "%u.%u.%u:", tipc_zone(members[i]),
+			tipc_cluster(members[i]), tipc_node(members[i]));
+		state = map_get(up_map, i) ? 'U' : 'D';
+		printf("%s%c", addr_str, state);
+	}
+	printf("]");
+}
+
+static void link_mon_print_peer_state(const uint32_t addr, const char *status,
+				      const char *monitored,
+				      const uint32_t dom_gen)
+{
+	char addr_str[16];
+
+	sprintf(addr_str, "%u.%u.%u", tipc_zone(addr), tipc_cluster(addr),
+		tipc_node(addr));
+
+	printf("%-*s", MAX_NODE_WIDTH, addr_str);
+	printf("%-*s", STATUS_WIDTH, status);
+	printf("%-*s", DIRECTLY_MON_WIDTH, monitored);
+	printf("%-*u", MAX_DOM_GEN_WIDTH, dom_gen);
+}
+
+static int link_mon_peer_list_cb(const struct nlmsghdr *nlh, void *data)
+{
+	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
+	struct nlattr *attrs[TIPC_NLA_MON_PEER_MAX + 1] = {};
+	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
+	uint16_t member_cnt;
+	uint32_t applied;
+	uint32_t dom_gen;
+	uint64_t up_map;
+	char status[16];
+	char monitored[16];
+
+	mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
+	if (!info[TIPC_NLA_MON_PEER])
+		return MNL_CB_ERROR;
+
+	mnl_attr_parse_nested(info[TIPC_NLA_MON_PEER], parse_attrs, attrs);
+
+	(attrs[TIPC_NLA_MON_PEER_LOCAL] || attrs[TIPC_NLA_MON_PEER_HEAD]) ?
+		strcpy(monitored, "direct") :
+		strcpy(monitored, "indirect");
+
+	attrs[TIPC_NLA_MON_PEER_UP] ?
+		strcpy(status, "up") :
+		strcpy(status, "down");
+
+	dom_gen = attrs[TIPC_NLA_MON_PEER_DOMGEN] ?
+		mnl_attr_get_u32(attrs[TIPC_NLA_MON_PEER_DOMGEN]) : 0;
+
+	link_mon_print_peer_state(mnl_attr_get_u32(attrs[TIPC_NLA_MON_PEER_ADDR]),
+				  status, monitored, dom_gen);
+
+	applied = mnl_attr_get_u32(attrs[TIPC_NLA_MON_PEER_APPLIED]);
+
+	if (!applied)
+		goto exit;
+
+	up_map = mnl_attr_get_u64(attrs[TIPC_NLA_MON_PEER_UPMAP]);
+
+	member_cnt = mnl_attr_get_payload_len(attrs[TIPC_NLA_MON_PEER_MEMBERS]);
+
+	/* each tipc address occupies 4 bytes of payload, hence compensate it */
+	member_cnt /= sizeof(uint32_t);
+
+	link_mon_print_applied(applied, up_map);
+
+	link_mon_print_non_applied(applied, member_cnt, up_map,
+				   mnl_attr_get_payload(attrs[TIPC_NLA_MON_PEER_MEMBERS]));
+
+exit:
+	printf("\n");
+
+	return MNL_CB_OK;
+}
+
+static int link_mon_peer_list(uint32_t mon_ref)
+{
+	struct nlmsghdr *nlh;
+	char buf[MNL_SOCKET_BUFFER_SIZE];
+	struct nlattr *nest;
+
+	if (!(nlh = msg_init(buf, TIPC_NL_MON_PEER_GET))) {
+		fprintf(stderr, "error, message initialisation failed\n");
+		return -1;
+	}
+
+	nest = mnl_attr_nest_start(nlh, TIPC_NLA_MON);
+	mnl_attr_put_u32(nlh, TIPC_NLA_MON_REF, mon_ref);
+	mnl_attr_nest_end(nlh, nest);
+
+	return msg_dumpit(nlh, link_mon_peer_list_cb, NULL);
+}
+
+static int link_mon_list_cb(const struct nlmsghdr *nlh, void *data)
+{
+	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
+	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
+	struct nlattr *attrs[TIPC_NLA_MON_MAX + 1] = {};
+	char *req_bearer = data;
+	const char *bname;
+	const char *title = "node          status monitored generation "
+			    "applied_node_status [non_applied_node:status]";
+
+	mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
+	if (!info[TIPC_NLA_MON])
+		return MNL_CB_ERROR;
+
+	mnl_attr_parse_nested(info[TIPC_NLA_MON], parse_attrs, attrs);
+
+	bname = mnl_attr_get_str(attrs[TIPC_NLA_MON_BEARER_NAME]);
+
+	if (*req_bearer && (strcmp(req_bearer, bname) != 0))
+		return MNL_CB_OK;
+
+	printf("\nbearer %s\n", bname);
+	printf("%s\n", title);
+
+	if (mnl_attr_get_u32(attrs[TIPC_NLA_MON_PEERCNT]))
+		link_mon_peer_list(mnl_attr_get_u32(attrs[TIPC_NLA_MON_REF]));
+
+	return MNL_CB_OK;
+}
+
+static void cmd_link_mon_list_help(struct cmdl *cmdl)
+{
+	fprintf(stderr, "Usage: %s monitor list [ media MEDIA ARGS...] \n\n",
+		cmdl->argv[0]);
+	print_bearer_media();
+}
+
+static void cmd_link_mon_list_l2_help(struct cmdl *cmdl, char *media)
+{
+	fprintf(stderr,
+		"Usage: %s monitor list media %s device DEVICE [OPTIONS]\n",
+		cmdl->argv[0], media);
+}
+
+static void cmd_link_mon_list_udp_help(struct cmdl *cmdl, char *media)
+{
+	fprintf(stderr,
+		"Usage: %s monitor list media udp name NAME \n\n",
+		cmdl->argv[0]);
+}
+
+static int cmd_link_mon_list(struct nlmsghdr *nlh, const struct cmd *cmd,
+			     struct cmdl *cmdl, void *data)
+{
+	char buf[MNL_SOCKET_BUFFER_SIZE];
+	char bname[TIPC_MAX_BEARER_NAME] = {0};
+	struct opt opts[] = {
+		{ "media",	OPT_KEYVAL,	NULL },
+		{ "device",	OPT_KEYVAL,	NULL },
+		{ "name",	OPT_KEYVAL,	NULL },
+		{ NULL }
+	};
+	struct tipc_sup_media sup_media[] = {
+		{ "udp",        "name",         cmd_link_mon_list_udp_help},
+		{ "eth",        "device",       cmd_link_mon_list_l2_help },
+		{ "ib",         "device",       cmd_link_mon_list_l2_help },
+		{ NULL, },
+	};
+
+	int err;
+
+	if (parse_opts(opts, cmdl) < 0)
+		return -EINVAL;
+
+	if (get_opt(opts, "media")) {
+		if ((err = cmd_get_unique_bearer_name(cmd, cmdl, opts, bname,
+						      sup_media)))
+			return err;
+	}
+
+	if (help_flag) {
+		cmd->help(cmdl);
+		return -EINVAL;
+	}
+
+	if (!(nlh = msg_init(buf, TIPC_NL_MON_GET))) {
+		fprintf(stderr, "error, message initialisation failed\n");
+		return -1;
+	}
+
+	return msg_dumpit(nlh, link_mon_list_cb, bname);
+}
+
 static void cmd_link_mon_set_help(struct cmdl *cmdl)
 {
 	fprintf(stderr, "Usage: %s monitor set PPROPERTY\n\n"
@@ -636,6 +871,7 @@ static void cmd_link_mon_help(struct cmdl *cmdl)
 		"COMMANDS\n"
 		" set			- Set monitor properties\n"
 		" get			- Get monitor properties\n"
+		" list			- List all cluster members\n"
 		" summary		- Show local node monitor summary\n",
 		cmdl->argv[0]);
 }
@@ -646,6 +882,7 @@ static int cmd_link_mon(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl
 	const struct cmd cmds[] = {
 		{ "set",	cmd_link_mon_set,	cmd_link_mon_set_help },
 		{ "get",	cmd_link_mon_get,	cmd_link_mon_get_help },
+		{ "list",	cmd_link_mon_list,	cmd_link_mon_list_help },
 		{ "summary",	cmd_link_mon_summary,	NULL },
 		{ NULL }
 	};
-- 
2.1.4


------------------------------------------------------------------------------

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH iproute2 net-next v1 7/7] tipc: update man page for link monitor
  2016-09-12 15:17 [PATCH iproute2 net-next v1 0/7] tipc: updates for neighbour monitor Parthasarathy Bhuvaragan
                   ` (5 preceding siblings ...)
  2016-09-12 15:17 ` [PATCH iproute2 net-next v1 6/7] tipc: add link monitor list Parthasarathy Bhuvaragan
@ 2016-09-12 15:17 ` Parthasarathy Bhuvaragan
  2016-09-20 16:39 ` [PATCH iproute2 net-next v1 0/7] tipc: updates for neighbour monitor Stephen Hemminger
  7 siblings, 0 replies; 9+ messages in thread
From: Parthasarathy Bhuvaragan @ 2016-09-12 15:17 UTC (permalink / raw)
  To: netdev; +Cc: jon.maloy, tipc-discussion

Add description for the new link monitor commands.

Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
---
 man/man8/tipc-link.8 | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 104 insertions(+)

diff --git a/man/man8/tipc-link.8 b/man/man8/tipc-link.8
index 2ee03a0bd96e..fee283e5cfff 100644
--- a/man/man8/tipc-link.8
+++ b/man/man8/tipc-link.8
@@ -39,6 +39,29 @@ tipc-link \- show links or modify link properties
 .B tipc link list
 .br
 
+.ti -8
+.B tipc link monitor set
+.RB "{ " "threshold" " } "
+
+.ti -8
+.B tipc link monitor get
+.RB "{ " "threshold" " } "
+
+.ti -8
+.B tipc link monitor summary
+.br
+
+.ti -8
+.B tipc link monitor list
+.br
+.RB "[ " "media " " { " eth " | " ib " } " device
+.IR "DEVICE" " ]"
+.RB "|"
+.br
+.RB "[ " "media udp name"
+.IR NAME " ]"
+.br
+
 .SH OPTIONS
 Options (flags) that can be passed anywhere in the command chain.
 .TP
@@ -204,6 +227,87 @@ The link window controls how many unacknowledged messages a link endpoint can
 have in its transmit queue before TIPC's congestion control mechanism is
 activated.
 
+.SS Monitor properties
+
+.TP
+.B threshold
+.br
+The threshold specifies the cluster size exceeding which the link monitoring
+algorithm will switch from "full-mesh" to "overlapping-ring".
+If set of 0 the overlapping-ring monitoring is always on and if set to a
+value larger than anticipated cluster size the overlapping-ring is disabled.
+The default value is 32.
+
+.SS Monitor information
+
+.TP
+.B table_generation
+.br
+Represents the event count in a node's local monitoring list. It steps every
+time something changes in the local monitor list, including changes in the
+local domain.
+
+.TP
+.B cluster_size
+.br
+Represents the current count of cluster members.
+
+.TP
+.B algorithm
+.br
+The current supervision algorithm used for neighbour monitoring for the bearer.
+Possible values are full-mesh or overlapping-ring.
+
+.TP
+.B status
+.br
+The node status derived by the local node.
+Possible status are up or down.
+
+.TP
+.B monitored
+.br
+Represent the type of monitoring chosen by the local node.
+Possible values are direct or indirect.
+
+.TP
+.B generation
+.br
+Represents the domain generation which is the event count in a node's local
+domain. Every time something changes (peer add/remove/up/down) the domain
+generation is stepped and a new version of node record is sent to inform
+the neighbors about this change. The domain generation helps the receiver
+of a domain record to know if it should ignore or process the record.
+
+.TP
+.B applied_node_status
+.br
+The node status reported by the peer node for the succeeding peers in
+the node list. The Node list is a circular list of ascending addresses
+starting with the local node.
+Possible status are: U or D. The status U implies up and D down.
+
+.TP
+.B [non_applied_node:status]
+.br
+Represents the nodes and their status as reported by the peer node.
+These nodes were not applied to the monitoring list for this peer node.
+They are usually transient and occur during the cluster startup phase
+or network reconfiguration.
+Possible status are: U or D. The status U implies up and D down.
+
+.SH EXAMPLES
+.PP
+tipc link monitor list
+.RS 4
+Shows the link monitoring information for cluster members on device data0.
+.RE
+.PP
+tipc link monitor summary
+.RS 4
+The monitor summary command prints the basic attributes.
+.RE
+
 .SH EXIT STATUS
 Exit status is 0 if command was successful or a positive integer upon failure.
 
-- 
2.1.4


------------------------------------------------------------------------------

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH iproute2 net-next v1 0/7] tipc: updates for neighbour monitor
  2016-09-12 15:17 [PATCH iproute2 net-next v1 0/7] tipc: updates for neighbour monitor Parthasarathy Bhuvaragan
                   ` (6 preceding siblings ...)
  2016-09-12 15:17 ` [PATCH iproute2 net-next v1 7/7] tipc: update man page for link monitor Parthasarathy Bhuvaragan
@ 2016-09-20 16:39 ` Stephen Hemminger
  7 siblings, 0 replies; 9+ messages in thread
From: Stephen Hemminger @ 2016-09-20 16:39 UTC (permalink / raw)
  To: Parthasarathy Bhuvaragan; +Cc: netdev, tipc-discussion, jon.maloy, maloy

On Mon, 12 Sep 2016 17:17:14 +0200
Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com> wrote:

> We add configuration support for the new link monitoring attributes.
> 
> Parthasarathy Bhuvaragan (7):
>   tipc: remove dead code
>   tipc: add link monitor set threshold
>   tipc: add link monitor get threshold
>   tipc: add link monitor summary
>   tipc: refractor bearer to facilitate link monitor
>   tipc: add link monitor list
>   tipc: update man page for link monitor
> 
>  man/man8/tipc-link.8 | 104 +++++++++++++
>  tipc/bearer.c        |  75 ++++++----
>  tipc/bearer.h        |   4 +
>  tipc/link.c          | 408 ++++++++++++++++++++++++++++++++++++++++++++++++++-
>  4 files changed, 556 insertions(+), 35 deletions(-)
> 

Applied, then I did a style scrub on tipc/link.c

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-09-20 16:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-12 15:17 [PATCH iproute2 net-next v1 0/7] tipc: updates for neighbour monitor Parthasarathy Bhuvaragan
2016-09-12 15:17 ` [PATCH iproute2 net-next v1 1/7] tipc: remove dead code Parthasarathy Bhuvaragan
2016-09-12 15:17 ` [PATCH iproute2 net-next v1 2/7] tipc: add link monitor set threshold Parthasarathy Bhuvaragan
2016-09-12 15:17 ` [PATCH iproute2 net-next v1 3/7] tipc: add link monitor get threshold Parthasarathy Bhuvaragan
2016-09-12 15:17 ` [PATCH iproute2 net-next v1 4/7] tipc: add link monitor summary Parthasarathy Bhuvaragan
2016-09-12 15:17 ` [PATCH iproute2 net-next v1 5/7] tipc: refractor bearer to facilitate link monitor Parthasarathy Bhuvaragan
2016-09-12 15:17 ` [PATCH iproute2 net-next v1 6/7] tipc: add link monitor list Parthasarathy Bhuvaragan
2016-09-12 15:17 ` [PATCH iproute2 net-next v1 7/7] tipc: update man page for link monitor Parthasarathy Bhuvaragan
2016-09-20 16:39 ` [PATCH iproute2 net-next v1 0/7] tipc: updates for neighbour monitor Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).