diff options
author | Hoang Le <hoang.h.le@dektech.com.au> | 2018-12-19 11:42:19 +0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-19 11:53:10 -0800 |
commit | 055722716c396ac1c7fd36a828250a78db1f22bc (patch) | |
tree | 5a28b99e61dc0a2d4d7a2b7dec9f79124ce189da /net/tipc/link.c | |
parent | 013dc9d55c2ee47bb4a509e10c5cad404059b686 (diff) | |
download | linux-055722716c396ac1c7fd36a828250a78db1f22bc.tar.gz linux-055722716c396ac1c7fd36a828250a78db1f22bc.tar.bz2 linux-055722716c396ac1c7fd36a828250a78db1f22bc.zip |
tipc: fix uninitialized value for broadcast retransmission
When sending broadcast message on high load system, there are a lot of
unnecessary packets restranmission. That issue was caused by missing in
initial criteria for retransmission.
To prevent this happen, just initialize this criteria for retransmission
in next 10 milliseconds.
Fixes: 31c4f4cc32f7 ("tipc: improve broadcast retransmission algorithm")
Acked-by: Ying Xue <ying.xue@windriver.com>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r-- | net/tipc/link.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c index 55c44d867d4b..2792a3cae682 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c @@ -967,6 +967,10 @@ int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list, } __skb_dequeue(list); __skb_queue_tail(transmq, skb); + /* next retransmit attempt */ + if (link_is_bc_sndlink(l)) + TIPC_SKB_CB(skb)->nxt_retr = + jiffies + TIPC_BC_RETR_LIM; __skb_queue_tail(xmitq, _skb); TIPC_SKB_CB(skb)->ackers = l->ackers; l->rcv_unacked = 0; @@ -1014,6 +1018,10 @@ static void tipc_link_advance_backlog(struct tipc_link *l, hdr = buf_msg(skb); l->backlog[msg_importance(hdr)].len--; __skb_queue_tail(&l->transmq, skb); + /* next retransmit attempt */ + if (link_is_bc_sndlink(l)) + TIPC_SKB_CB(skb)->nxt_retr = jiffies + TIPC_BC_RETR_LIM; + __skb_queue_tail(xmitq, _skb); TIPC_SKB_CB(skb)->ackers = l->ackers; msg_set_seqno(hdr, seqno); |