Re: [PATCH iproute2] tipc: add peer remove functionality

2016-08-29 Thread Stephen Hemminger
On Mon, 22 Aug 2016 10:18:29 +0200
Richard Alpe  wrote:

> This enables a user to remove an offline peer from the kernel data
> structures. This could for example be useful when deliberately scaling
> in peer nodes in a cloud environment.
> 
> This functionality was first merged in:
> f9dec657e4 (Richard Alpe tipc: add peer remove functionality)
> 
> And later backed out (as the kernel counterpart was held up) in:
> 385caeb13b (Stephen Hemminger Revert "tipc: add peer remove functionality")
> 
> Signed-off-by: Richard Alpe 
> Reviewed-by: Jon Maloy 
> Reviewed-by: Ying Xue 

Applied to net-next branch



[PATCH iproute2] tipc: add peer remove functionality

2016-08-22 Thread Richard Alpe
This enables a user to remove an offline peer from the kernel data
structures. This could for example be useful when deliberately scaling
in peer nodes in a cloud environment.

This functionality was first merged in:
f9dec657e4 (Richard Alpe tipc: add peer remove functionality)

And later backed out (as the kernel counterpart was held up) in:
385caeb13b (Stephen Hemminger Revert "tipc: add peer remove functionality")

Signed-off-by: Richard Alpe 
Reviewed-by: Jon Maloy 
Reviewed-by: Ying Xue 
---
 include/linux/tipc_netlink.h |  1 +
 man/man8/tipc-bearer.8   |  1 +
 man/man8/tipc-link.8 |  1 +
 man/man8/tipc-media.8|  1 +
 man/man8/tipc-nametable.8|  1 +
 man/man8/tipc-node.8 |  1 +
 man/man8/tipc-peer.8 | 52 +
 man/man8/tipc.8  |  1 +
 tipc/Makefile|  2 +-
 tipc/peer.c  | 93 
 tipc/peer.h  | 21 ++
 tipc/tipc.c  |  3 ++
 12 files changed, 177 insertions(+), 1 deletion(-)
 create mode 100644 man/man8/tipc-peer.8
 create mode 100644 tipc/peer.c
 create mode 100644 tipc/peer.h

diff --git a/include/linux/tipc_netlink.h b/include/linux/tipc_netlink.h
index 5f3f6d0..bcb65ef 100644
--- a/include/linux/tipc_netlink.h
+++ b/include/linux/tipc_netlink.h
@@ -59,6 +59,7 @@ enum {
TIPC_NL_MON_SET,
TIPC_NL_MON_GET,
TIPC_NL_MON_PEER_GET,
+   TIPC_NL_PEER_REMOVE,
 
__TIPC_NL_CMD_MAX,
TIPC_NL_CMD_MAX = __TIPC_NL_CMD_MAX - 1
diff --git a/man/man8/tipc-bearer.8 b/man/man8/tipc-bearer.8
index 50a1ed2..565ee01 100644
--- a/man/man8/tipc-bearer.8
+++ b/man/man8/tipc-bearer.8
@@ -218,6 +218,7 @@ Exit status is 0 if command was successful or a positive 
integer upon failure.
 .BR tipc-media (8),
 .BR tipc-nametable (8),
 .BR tipc-node (8),
+.BR tipc-peer (8),
 .BR tipc-socket (8)
 .br
 .SH REPORTING BUGS
diff --git a/man/man8/tipc-link.8 b/man/man8/tipc-link.8
index 3be8c9a..2ee03a0 100644
--- a/man/man8/tipc-link.8
+++ b/man/man8/tipc-link.8
@@ -213,6 +213,7 @@ Exit status is 0 if command was successful or a positive 
integer upon failure.
 .BR tipc-bearer (8),
 .BR tipc-nametable (8),
 .BR tipc-node (8),
+.BR tipc-peer (8),
 .BR tipc-socket (8)
 .br
 .SH REPORTING BUGS
diff --git a/man/man8/tipc-media.8 b/man/man8/tipc-media.8
index 6c6e2b1..4689cb3 100644
--- a/man/man8/tipc-media.8
+++ b/man/man8/tipc-media.8
@@ -74,6 +74,7 @@ Exit status is 0 if command was successful or a positive 
integer upon failure.
 .BR tipc-link (8),
 .BR tipc-nametable (8),
 .BR tipc-node (8),
+.BR tipc-peer (8),
 .BR tipc-socket (8)
 .br
 .SH REPORTING BUGS
diff --git a/man/man8/tipc-nametable.8 b/man/man8/tipc-nametable.8
index d3397f9..4bcefe4 100644
--- a/man/man8/tipc-nametable.8
+++ b/man/man8/tipc-nametable.8
@@ -87,6 +87,7 @@ Exit status is 0 if command was successful or a positive 
integer upon failure.
 .BR tipc-link (8),
 .BR tipc-media (8),
 .BR tipc-node (8),
+.BR tipc-peer (8),
 .BR tipc-socket (8)
 .br
 .SH REPORTING BUGS
diff --git a/man/man8/tipc-node.8 b/man/man8/tipc-node.8
index ef32ec7..a72a409 100644
--- a/man/man8/tipc-node.8
+++ b/man/man8/tipc-node.8
@@ -59,6 +59,7 @@ Exit status is 0 if command was successful or a positive 
integer upon failure.
 .BR tipc-link (8),
 .BR tipc-media (8),
 .BR tipc-nametable (8),
+.BR tipc-peer (8),
 .BR tipc-socket (8)
 .br
 .SH REPORTING BUGS
diff --git a/man/man8/tipc-peer.8 b/man/man8/tipc-peer.8
new file mode 100644
index 000..430651f
--- /dev/null
+++ b/man/man8/tipc-peer.8
@@ -0,0 +1,52 @@
+.TH TIPC-PEER 8 "04 Dec 2015" "iproute2" "Linux"
+
+.\" For consistency, please keep padding right aligned.
+.\" For example '.B "foo " bar' and not '.B foo " bar"'
+
+.SH NAME
+tipc-peer \- modify peer information
+
+.SH SYNOPSIS
+.ad l
+.in +8
+
+.ti -8
+.B tipc peer remove address
+.IR ADDRESS
+
+.SH OPTIONS
+Options (flags) that can be passed anywhere in the command chain.
+.TP
+.BR "\-h" , " --help"
+Show help about last valid command. For example
+.B tipc peer --help
+will show peer help and
+.B tipc --help
+will show general help. The position of the option in the string is irrelevant.
+.SH DESCRIPTION
+
+.SS Peer remove
+Remove an offline peer node from the local data structures. The peer is
+identified by its
+.B address
+
+.SH EXIT STATUS
+Exit status is 0 if command was successful or a positive integer upon failure.
+
+.SH SEE ALSO
+.BR tipc (8),
+.BR tipc-bearer (8),
+.BR tipc-link (8),
+.BR tipc-media (8),
+.BR tipc-nametable (8),
+.BR tipc-node (8),
+.BR tipc-socket (8)
+.br
+.SH REPORTING BUGS
+Report any bugs to the Network Developers mailing list
+.B 
+where the development and maintenance is primarily done.
+You do not have to be subscribed to the list to send a message there.
+
+.SH AUTHOR
+Richard Alpe 
diff --git