Hi Erik, Thanks for your patch, they look good except for the minor comment inline. You may add the tag if you want to for your series. Reviewed-by:Parthasarathy Bhuvaragan <parthasarathy.bhuvara...@ericsson.com>
I added a new option to tipc-pipe as described in: https://github.com/parbhu/tipcutils/commit/0156d7d73be8cad3a9d5d1f69a778be5daf61620 tipc-pipe: add socketpair support with --tee option With this --tee option, you can dump the stdin to a file and can be used as: Start a server as: tipc-pipe --tee -s 9000 2> /dev/null | md5sum Generate random data using /dev/urandom and pipe to tipc-pipe: dd if=/dev/urandom bs=10000 count=1000 | tipc-pipe --tee 9000 2> /dev/null | md5sum Data integrity can be confirmed by verifying the md5sum result. So, you can run generate long session data using /dev/urandom and compare the integrity using md5sum at the end. On 12/23/2016 10:36 PM, Erik Hugne wrote: > for socketpairs using connectionless transport, we cache > the respective node local TIPC portid to use in subsequent > calls to send() in the socket's private data. > > Signed-off-by: Erik Hugne <erik.hu...@gmail.com> > --- > net/tipc/socket.c | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) > > diff --git a/net/tipc/socket.c b/net/tipc/socket.c > index 1a7f7c9..c285f74 100644 > --- a/net/tipc/socket.c > +++ b/net/tipc/socket.c > @@ -2519,6 +2519,17 @@ static int tipc_socketpair(struct socket *sock1, > struct socket *sock2) > struct tipc_sock *tsk2 = tipc_sk(sock2->sk); > struct tipc_sock *tsk1 = tipc_sk(sock1->sk); > > + tsk1->peer.family = AF_TIPC; > + tsk1->peer.addrtype = TIPC_ADDR_ID; > + tsk1->peer.scope = TIPC_NODE_SCOPE; > + tsk1->peer.addr.id.ref = tsk2->portid; > + tsk1->peer.addr.id.node = 0; Please use tipc_own_addr(), instead of hardcoding to 0. With this patch the output of "tipc socket list", make it look as if we are still running in standalone mode (as node address is 0). $ tipc socket list socket 3661056118 connected to <0.0.0:1636075240> socket 1636075240 connected to <0.0.0:3661056118> > + tsk2->peer.family = AF_TIPC; > + tsk2->peer.addrtype = TIPC_ADDR_ID; > + tsk2->peer.scope = TIPC_NODE_SCOPE; > + tsk2->peer.addr.id.ref = tsk1->portid; > + tsk2->peer.addr.id.node = 0; Same as above. /Partha > + > tipc_sk_finish_conn(tsk1, tsk2->portid, 0); > tipc_sk_finish_conn(tsk2, tsk1->portid, 0); > return 0; > @@ -2532,7 +2543,7 @@ static const struct proto_ops msg_ops = { > .release = tipc_release, > .bind = tipc_bind, > .connect = tipc_connect, > - .socketpair = sock_no_socketpair, > + .socketpair = tipc_socketpair, > .accept = sock_no_accept, > .getname = tipc_getname, > .poll = tipc_poll, > @@ -2553,7 +2564,7 @@ static const struct proto_ops packet_ops = { > .release = tipc_release, > .bind = tipc_bind, > .connect = tipc_connect, > - .socketpair = sock_no_socketpair, > + .socketpair = tipc_socketpair, > .accept = tipc_accept, > .getname = tipc_getname, > .poll = tipc_poll, > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ tipc-discussion mailing list tipc-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tipc-discussion