tipc: clean up handling of link congestion
authorJon Paul Maloy <jon.maloy@ericsson.com>
Wed, 25 Mar 2015 16:07:25 +0000 (12:07 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Mar 2015 18:05:56 +0000 (14:05 -0400)
commit3127a0200d4a46cf279bb388cc0f71827cd60699
treec0bf142814ecd5cea45db33cd8706c118ea6e45d
parent1f66d161ab3d8b518903fa6c3f9c1f48d6919e74
tipc: clean up handling of link congestion

After the recent changes in message importance handling it becomes
possible to simplify handling of messages and sockets when we
encounter link congestion.

We merge the function tipc_link_cong() into link_schedule_user(),
and simplify the code of the latter. The code should now be
easier to follow, especially regarding return codes and handling
of the message that caused the situation.

In case the scheduling function is unable to pre-allocate a wakeup
message buffer, it now returns -ENOBUFS, which is a more correct
code than the previously used -EHOSTUNREACH.

Reviewed-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/link.c
net/tipc/msg.h