aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.c
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2014-11-25 22:41:47 -0500
committerDavid S. Miller <davem@davemloft.net>2014-11-26 12:30:16 -0500
commit7b6f087f98107617e0535a6ed378c561f1ae84d7 (patch)
tree19f87228de36f10323966cb52aeaddb28d914d9e /net/tipc/link.c
parent8965d250c28f588d2a6dca2a0b00e4bb895b58e0 (diff)
tipc: remove retransmission queue
TIPC retransmission queue is intended to record which messages should be retransmitted when bearer is not congested. However, as the retransmission queue becomes useless with the removal of bearer congestion mechanism, it should be removed. Signed-off-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r--net/tipc/link.c35
1 files changed, 1 insertions, 34 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 450ed0ce9071..4b7cbfd57714 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -458,8 +458,6 @@ void tipc_link_reset(struct tipc_link *l_ptr)
458 skb_queue_splice_init(&l_ptr->waiting_sks, &owner->waiting_sks); 458 skb_queue_splice_init(&l_ptr->waiting_sks, &owner->waiting_sks);
459 owner->action_flags |= TIPC_WAKEUP_USERS; 459 owner->action_flags |= TIPC_WAKEUP_USERS;
460 } 460 }
461 l_ptr->retransm_queue_head = 0;
462 l_ptr->retransm_queue_size = 0;
463 l_ptr->last_out = NULL; 461 l_ptr->last_out = NULL;
464 l_ptr->first_out = NULL; 462 l_ptr->first_out = NULL;
465 l_ptr->next_out = NULL; 463 l_ptr->next_out = NULL;
@@ -870,38 +868,9 @@ static void tipc_link_sync_rcv(struct tipc_node *n, struct sk_buff *buf)
870 */ 868 */
871static u32 tipc_link_push_packet(struct tipc_link *l_ptr) 869static u32 tipc_link_push_packet(struct tipc_link *l_ptr)
872{ 870{
873 struct sk_buff *buf = l_ptr->first_out; 871 struct sk_buff *buf = l_ptr->next_out;
874 u32 r_q_size = l_ptr->retransm_queue_size;
875 u32 r_q_head = l_ptr->retransm_queue_head;
876
877 /* Step to position where retransmission failed, if any, */
878 /* consider that buffers may have been released in meantime */
879 if (r_q_size && buf) {
880 u32 last = lesser(mod(r_q_head + r_q_size),
881 link_last_sent(l_ptr));
882 u32 first = buf_seqno(buf);
883
884 while (buf && less(first, r_q_head)) {
885 first = mod(first + 1);
886 buf = buf->next;
887 }
888 l_ptr->retransm_queue_head = r_q_head = first;
889 l_ptr->retransm_queue_size = r_q_size = mod(last - first);
890 }
891
892 /* Continue retransmission now, if there is anything: */
893 if (r_q_size && buf) {
894 msg_set_ack(buf_msg(buf), mod(l_ptr->next_in_no - 1));
895 msg_set_bcast_ack(buf_msg(buf), l_ptr->owner->bclink.last_in);
896 tipc_bearer_send(l_ptr->bearer_id, buf, &l_ptr->media_addr);
897 l_ptr->retransm_queue_head = mod(++r_q_head);
898 l_ptr->retransm_queue_size = --r_q_size;
899 l_ptr->stats.retransmitted++;
900 return 0;
901 }
902 872
903 /* Send one deferred data message, if send window not full: */ 873 /* Send one deferred data message, if send window not full: */
904 buf = l_ptr->next_out;
905 if (buf) { 874 if (buf) {
906 struct tipc_msg *msg = buf_msg(buf); 875 struct tipc_msg *msg = buf_msg(buf);
907 u32 next = msg_seqno(msg); 876 u32 next = msg_seqno(msg);
@@ -1025,8 +994,6 @@ void tipc_link_retransmit(struct tipc_link *l_ptr, struct sk_buff *buf,
1025 retransmits--; 994 retransmits--;
1026 l_ptr->stats.retransmitted++; 995 l_ptr->stats.retransmitted++;
1027 } 996 }
1028
1029 l_ptr->retransm_queue_head = l_ptr->retransm_queue_size = 0;
1030} 997}
1031 998
1032/** 999/**