]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite81704079be80c7b8a38b09f30d4a2331ad3f731
treec0bf142814ecd5cea45db33cd8706c118ea6e45d
parent162f8514b63052dedb09556a07e75bdbab33aff4
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