diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2015-07-22 10:11:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-26 16:31:50 -0700 |
commit | cda3696d3d26eb798c94de0dab5bd66ddb5627cb (patch) | |
tree | a76895b3294564437b327e95dd1742daebbd56a9 /net/tipc/msg.h | |
parent | bcd3ffd4f6d7c994c93be2ab8598fdfb2952a1f1 (diff) | |
download | linux-cda3696d3d26eb798c94de0dab5bd66ddb5627cb.tar.bz2 |
tipc: clean up socket layer message reception
When a message is received in a socket, one of the call chains
tipc_sk_rcv()->tipc_sk_enqueue()->filter_rcv()(->tipc_sk_proto_rcv())
or
tipc_sk_backlog_rcv()->filter_rcv()(->tipc_sk_proto_rcv())
are followed. At each of these levels we may encounter situations
where the message may need to be rejected, or a new message
produced for transfer back to the sender. Despite recent
improvements, the current code for doing this is perceived
as awkward and hard to follow.
Leveraging the two previous commits in this series, we now
introduce a more uniform handling of such situations. We
let each of the functions in the chain itself produce/reverse
the message to be returned to the sender, but also perform the
actual forwarding. This simplifies the necessary logics within
each function.
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/msg.h')
-rw-r--r-- | net/tipc/msg.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/tipc/msg.h b/net/tipc/msg.h index d0834bc519aa..234fb0531d1d 100644 --- a/net/tipc/msg.h +++ b/net/tipc/msg.h @@ -798,8 +798,7 @@ bool tipc_msg_make_bundle(struct sk_buff **skb, struct tipc_msg *msg, bool tipc_msg_extract(struct sk_buff *skb, struct sk_buff **iskb, int *pos); int tipc_msg_build(struct tipc_msg *mhdr, struct msghdr *m, int offset, int dsz, int mtu, struct sk_buff_head *list); -bool tipc_msg_lookup_dest(struct net *net, struct sk_buff *skb, u32 *dnode, - int *err); +bool tipc_msg_lookup_dest(struct net *net, struct sk_buff *skb, int *err); struct sk_buff *tipc_msg_reassemble(struct sk_buff_head *list); static inline u16 buf_seqno(struct sk_buff *skb) |