diff options
Diffstat (limited to 'net/tipc')
| -rw-r--r-- | net/tipc/link.c | 35 | ||||
| -rw-r--r-- | net/tipc/link.h | 4 |
2 files changed, 1 insertions, 38 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 | */ |
| 871 | static u32 tipc_link_push_packet(struct tipc_link *l_ptr) | 869 | static 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 | /** |
diff --git a/net/tipc/link.h b/net/tipc/link.h index fb3f99b6e928..cc816aacb16e 100644 --- a/net/tipc/link.h +++ b/net/tipc/link.h | |||
| @@ -130,8 +130,6 @@ struct tipc_stats { | |||
| 130 | * @oldest_deferred_in: ptr to first inbound message in queue | 130 | * @oldest_deferred_in: ptr to first inbound message in queue |
| 131 | * @newest_deferred_in: ptr to last inbound message in queue | 131 | * @newest_deferred_in: ptr to last inbound message in queue |
| 132 | * @unacked_window: # of inbound messages rx'd without ack'ing back to peer | 132 | * @unacked_window: # of inbound messages rx'd without ack'ing back to peer |
| 133 | * @retransm_queue_size: number of messages to retransmit | ||
| 134 | * @retransm_queue_head: sequence number of first message to retransmit | ||
| 135 | * @next_out: ptr to first unsent outbound message in queue | 133 | * @next_out: ptr to first unsent outbound message in queue |
| 136 | * @waiting_sks: linked list of sockets waiting for link congestion to abate | 134 | * @waiting_sks: linked list of sockets waiting for link congestion to abate |
| 137 | * @long_msg_seq_no: next identifier to use for outbound fragmented messages | 135 | * @long_msg_seq_no: next identifier to use for outbound fragmented messages |
| @@ -190,8 +188,6 @@ struct tipc_link { | |||
| 190 | u32 unacked_window; | 188 | u32 unacked_window; |
| 191 | 189 | ||
| 192 | /* Congestion handling */ | 190 | /* Congestion handling */ |
| 193 | u32 retransm_queue_size; | ||
| 194 | u32 retransm_queue_head; | ||
| 195 | struct sk_buff *next_out; | 191 | struct sk_buff *next_out; |
| 196 | struct sk_buff_head waiting_sks; | 192 | struct sk_buff_head waiting_sks; |
| 197 | 193 | ||
