tipc: change reception of tunnelled failover packets
authorJon Paul Maloy <jon.maloy@ericsson.com>
Thu, 13 Feb 2014 22:29:11 +0000 (17:29 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Feb 2014 22:57:06 +0000 (17:57 -0500)
commitf006c9c70fda4676157e00caa2efa74646709d72
treec2322f4588d384427812068086d7cb6511d39e84
parent1dab3d5ac22217241ca5c5bb7d0132602b465938
tipc: change reception of tunnelled failover packets

When a link is reset, and there is a redundant link available, all
sender sockets will steer their subsequent traffic through the
remaining link. In order to guarantee preserved packet order and
cardinality during the transition, we tunnel the failing link's send
queue through the remaining link before we allow any sockets to use it.

In this commit, we change the algorithm for receiving failover
("ORIGINAL_MSG") packets in tipc_link_tunnel_rcv(), at the same time
delegating it to a new subfuncton, tipc_link_failover_rcv(). Instead
of directly returning an extracted inner packet to the packet reception
loop in tipc_rcv(), we first check if it is a message fragment, in which
case we append it to the reset link's fragment chain. If the fragment
chain is complete, we return the whole chain instead of the individual
buffer, eliminating any need for the tipc_rcv() loop to do reassembly of
tunneled packets.

This change makes it possible to further simplify tipc_link_tunnel_rcv(),
as well as the calling tipc_rcv() loop. We will do that in later
commits. It also makes it possible to identify a single spot in the code
where we can tell that a failover procedure is finished, something that
is useful when we are deleting links after a failover. This will also
be done in a later commit.

Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/link.c
This page took 0.024606 seconds and 5 git commands to generate.