kernel-ark/net/tipc
Jon Paul Maloy 02be61a981 tipc: use message to abort connections when losing contact to node
In the current implementation, each 'struct tipc_node' instance keeps
a linked list of those ports/sockets that are connected to the node
represented by that struct. The purpose of this is to let the node
object know which sockets to alert when it loses contact with its peer
node, i.e., which sockets need to have their connections aborted.

This entails an unwanted direct reference from the node structure
back to the port/socket structure, and a need to grab port_lock
when we have to make an upcall to the port. We want to get rid of
this unecessary BH entry point into the socket, and also eliminate
its use of port_lock.

In this commit, we instead let the node struct keep list of "connected
socket" structs, which each represents a connected socket, but is
allocated independently by the node at the moment of connection. If
the node loses contact with its peer node, the list is traversed, and
a "connection abort" message is created for each entry in the list. The
message is sent to it respective connected socket using the ordinary
data path, and the receiving socket aborts its connections upon reception
of the message.

This enables us to get rid of the direct reference from 'struct node' to
´struct port', and another unwanted BH access point to the latter.

Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-23 11:18:33 -07:00
..
addr.c tipc: compress out gratuitous extra carriage returns 2012-04-30 15:53:56 -04:00
addr.h tipc: explicitly include core.h in addr.h 2014-02-13 17:49:13 -05:00
bcast.c tipc: use pseudo message to wake up sockets after link congestion 2014-08-23 11:18:33 -07:00
bcast.h tipc: rename temporarily named functions 2014-07-16 21:38:19 -07:00
bearer.c tipc: improve and extend media address conversion functions 2014-05-14 15:19:48 -04:00
bearer.h tipc: improve and extend media address conversion functions 2014-05-14 15:19:48 -04:00
config.c tipc: convert allocations of global variables associated with bclink 2014-05-05 17:26:45 -04:00
config.h tipc: obsolete the remote management feature 2014-03-27 13:08:36 -04:00
core.c tipc: decrease connection flow control window 2014-05-14 15:19:47 -04:00
core.h tipc: use pseudo message to wake up sockets after link congestion 2014-08-23 11:18:33 -07:00
discover.c tipc: clean up neigbor discovery message reception 2014-05-14 15:19:48 -04:00
discover.h tipc: fix race in disc create/delete 2014-04-22 21:17:53 -04:00
eth_media.c tipc: improve and extend media address conversion functions 2014-05-14 15:19:48 -04:00
ib_media.c tipc: improve and extend media address conversion functions 2014-05-14 15:19:48 -04:00
Kconfig tipc: add InfiniBand media type 2013-04-17 14:18:33 -04:00
link.c tipc: use pseudo message to wake up sockets after link congestion 2014-08-23 11:18:33 -07:00
link.h tipc: use pseudo message to wake up sockets after link congestion 2014-08-23 11:18:33 -07:00
log.c tipc: remove print_buf and deprecated log buffer code 2012-07-13 19:34:43 -04:00
Makefile tipc: purge signal handler infrastructure 2014-05-05 17:26:45 -04:00
msg.c tipc: use pseudo message to wake up sockets after link congestion 2014-08-23 11:18:33 -07:00
msg.h tipc: use pseudo message to wake up sockets after link congestion 2014-08-23 11:18:33 -07:00
name_distr.c tipc: rename temporarily named functions 2014-07-16 21:38:19 -07:00
name_distr.h tipc: make name table distributor use new send function 2014-07-16 21:38:18 -07:00
name_table.c tipc: fix memory leak of publications 2014-04-30 13:31:26 -04:00
name_table.h tipc: cosmetic realignment of function arguments 2013-06-17 15:53:01 -07:00
net.c tipc: same receive code path for connection protocol and data messages 2014-06-27 12:50:56 -07:00
net.h tipc: same receive code path for connection protocol and data messages 2014-06-27 12:50:56 -07:00
netlink.c net: Use netlink_ns_capable to verify the permisions of netlink messages 2014-04-24 13:44:54 -04:00
node_subscr.c tipc: eliminate case of writing to freed memory 2014-06-27 12:50:54 -07:00
node_subscr.h tipc: avoid to asynchronously notify subscriptions 2014-05-05 17:26:44 -04:00
node.c tipc: use message to abort connections when losing contact to node 2014-08-23 11:18:33 -07:00
node.h tipc: use message to abort connections when losing contact to node 2014-08-23 11:18:33 -07:00
port.c tipc: use message to abort connections when losing contact to node 2014-08-23 11:18:33 -07:00
port.h tipc: use pseudo message to wake up sockets after link congestion 2014-08-23 11:18:33 -07:00
ref.c tipc: eliminate redundant lookups in registry 2014-03-12 15:53:49 -04:00
ref.h tipc: eliminate redundant lookups in registry 2014-03-12 15:53:49 -04:00
server.c net: Fix use after free by removing length arg from sk_data_ready callbacks. 2014-04-11 16:15:36 -04:00
server.h tipc: remove all enabled flags from all tipc components 2014-02-22 00:00:15 -05:00
socket.c tipc: use pseudo message to wake up sockets after link congestion 2014-08-23 11:18:33 -07:00
socket.h tipc: use pseudo message to wake up sockets after link congestion 2014-08-23 11:18:33 -07:00
subscr.c tipc: fix spinlock recursion bug for failed subscriptions 2014-03-24 15:36:56 -04:00
subscr.h tipc: cosmetic realignment of function arguments 2013-06-17 15:53:01 -07:00
sysctl.c tipc: change socket buffer overflow control to respect sk_rcvbuf 2013-06-17 15:53:00 -07:00