aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/bcast.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-01-03 11:13:06 -0500
committerDavid S. Miller <davem@davemloft.net>2017-01-03 11:13:06 -0500
commita88eb6becfa86fd0a05daed27957f5fcfff9f0e0 (patch)
tree06439f0724f3df34e29e8d3fb32432894e6d8ff0 /net/tipc/bcast.c
parentMerge branch 'TPACKET_V3-TX_RING-support' (diff)
parenttipc: reduce risk of user starvation during link congestion (diff)
downloadlinux-dev-a88eb6becfa86fd0a05daed27957f5fcfff9f0e0.tar.xz
linux-dev-a88eb6becfa86fd0a05daed27957f5fcfff9f0e0.zip
Merge branch 'tipc-link-starvation'
Jon Maloy says: ==================== tipc: improve interaction socket-link We fix a very real starvation problem that may occur when a link encounters send buffer congestion. At the same time we make the interaction between the socket and link layer simpler and more consistent. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/bcast.c')
-rw-r--r--net/tipc/bcast.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index aa1babbea385..c35fad3e08e8 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -174,7 +174,7 @@ static void tipc_bcbase_xmit(struct net *net, struct sk_buff_head *xmitq)
* and to identified node local sockets
* @net: the applicable net namespace
* @list: chain of buffers containing message
- * Consumes the buffer chain, except when returning -ELINKCONG
+ * Consumes the buffer chain.
* Returns 0 if success, otherwise errno: -ELINKCONG,-EHOSTUNREACH,-EMSGSIZE
*/
int tipc_bcast_xmit(struct net *net, struct sk_buff_head *list)
@@ -197,7 +197,7 @@ int tipc_bcast_xmit(struct net *net, struct sk_buff_head *list)
tipc_bcast_unlock(net);
/* Don't send to local node if adding to link failed */
- if (unlikely(rc)) {
+ if (unlikely(rc && (rc != -ELINKCONG))) {
__skb_queue_purge(&rcvq);
return rc;
}
@@ -206,7 +206,7 @@ int tipc_bcast_xmit(struct net *net, struct sk_buff_head *list)
tipc_bcbase_xmit(net, &xmitq);
tipc_sk_mcast_rcv(net, &rcvq, &inputq);
__skb_queue_purge(list);
- return 0;
+ return rc;
}
/* tipc_bcast_rcv - receive a broadcast packet, and deliver to rcv link