diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2014-05-14 05:39:14 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-14 15:19:48 -0400 |
commit | c82910e2a8d6fc9dd321a1f30dd4e89fb779cfe1 (patch) | |
tree | 5f6d454d653fe9c7189481f28972595498e5c888 /net/tipc/net.c | |
parent | 38504c28a201a80d12a6a0f821fecb331cb1f223 (diff) | |
download | linux-stable-c82910e2a8d6fc9dd321a1f30dd4e89fb779cfe1.tar.gz linux-stable-c82910e2a8d6fc9dd321a1f30dd4e89fb779cfe1.tar.bz2 linux-stable-c82910e2a8d6fc9dd321a1f30dd4e89fb779cfe1.zip |
tipc: clean up neigbor discovery message reception
The function tipc_disc_rcv(), which is handling received neighbor
discovery messages, is perceived as messy, and it is hard to verify
its correctness by code inspection. The fact that the task it is set
to resolve is fairly complex does not make the situation better.
In this commit we try to take a more systematic approach to the
problem. We define a decision machine which takes three state flags
as input, and produces three action flags as output. We then walk
through all permutations of the state flags, and for each of them we
describe verbally what is going on, plus that we set zero or more of
the action flags. The action flags indicate what should be done once
the decision machine has finished its job, while the last part of the
function deals with performing those actions.
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>
Diffstat (limited to 'net/tipc/net.c')
0 files changed, 0 insertions, 0 deletions