]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: clean up socket layer message reception
authorJon Paul Maloy <jon.maloy@ericsson.com>
Wed, 22 Jul 2015 14:11:20 +0000 (10:11 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 26 Jul 2015 23:31:50 +0000 (16:31 -0700)
commitb81b1d4629514b95fe1611196f7bb4fdb822f3ef
treea76895b3294564437b327e95dd1742daebbd56a9
parent3b73a96ebf083c19878a1cef7292758b622d91fa
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>
net/tipc/msg.c
net/tipc/msg.h
net/tipc/socket.c
net/tipc/socket.h