summaryrefslogtreecommitdiffstats
path: root/net/tipc/socket.h
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2014-03-12 11:31:10 -0400
committerDavid S. Miller <davem@davemloft.net>2014-03-12 15:53:49 -0400
commit24be34b5a0c9114541891d29dff1152bb1a8df34 (patch)
treefe5d550eb2328dfaea278a6b8c70dadf0deab4c6 /net/tipc/socket.h
parent8826cde655fb5ca3b35a112c851c90b3dccbb7b8 (diff)
downloadlinux-24be34b5a0c9114541891d29dff1152bb1a8df34.tar.gz
linux-24be34b5a0c9114541891d29dff1152bb1a8df34.tar.bz2
linux-24be34b5a0c9114541891d29dff1152bb1a8df34.zip
tipc: eliminate upcall function pointers between port and socket
Due to the original one-to-many relation between port and user API layers, upcalls to the API have been performed via function pointers, installed in struct tipc_port at creation. Since this relation now always is one-to-one, we can instead use ordinary function calls. We remove the function pointers 'dispatcher' and ´wakeup' from struct tipc_port, and replace them with calls to the renamed functions tipc_sk_rcv() and tipc_sk_wakeup(). At the same time we change the name and signature of the functions tipc_createport() and tipc_deleteport() to reflect their new role as mere initialization/destruction functions. Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Erik Hugne <erik.hugne@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/socket.h')
-rw-r--r--net/tipc/socket.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/tipc/socket.h b/net/tipc/socket.h
index f1cd54a68817..a02d0bb0e2ab 100644
--- a/net/tipc/socket.h
+++ b/net/tipc/socket.h
@@ -67,4 +67,11 @@ static inline struct sock *tipc_port_to_sk(const struct tipc_port *port)
return &(container_of(port, struct tipc_sock, port))->sk;
}
+static inline void tipc_sk_wakeup(struct sock *sk)
+{
+ sk->sk_write_space(sk);
+}
+
+u32 tipc_sk_rcv(struct sock *sk, struct sk_buff *buf);
+
#endif