aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.c
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2014-11-25 22:41:46 -0500
committerDavid S. Miller <davem@davemloft.net>2014-11-26 12:30:16 -0500
commit8965d250c28f588d2a6dca2a0b00e4bb895b58e0 (patch)
tree0c6dd29e79aa592b678bc2ff08444105848800ad /net/tipc/link.c
parenta8f48af587b0f257c49dce5b49a62554a4b8627e (diff)
tipc: remove protocol message queue
TIPC protocol message queue is intended to save one protocol message when bearer is congested so that the message stored in the queue can be immediately transmitted when bearer congestion is released. However, as now the protocol queue has no mission any more 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.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 4738cb1bf7c0..450ed0ce9071 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -421,8 +421,6 @@ void tipc_link_purge_queues(struct tipc_link *l_ptr)
421 kfree_skb_list(l_ptr->oldest_deferred_in); 421 kfree_skb_list(l_ptr->oldest_deferred_in);
422 kfree_skb_list(l_ptr->first_out); 422 kfree_skb_list(l_ptr->first_out);
423 tipc_link_reset_fragments(l_ptr); 423 tipc_link_reset_fragments(l_ptr);
424 kfree_skb(l_ptr->proto_msg_queue);
425 l_ptr->proto_msg_queue = NULL;
426} 424}
427 425
428void tipc_link_reset(struct tipc_link *l_ptr) 426void tipc_link_reset(struct tipc_link *l_ptr)
@@ -455,8 +453,6 @@ void tipc_link_reset(struct tipc_link *l_ptr)
455 453
456 /* Clean up all queues: */ 454 /* Clean up all queues: */
457 link_release_outqueue(l_ptr); 455 link_release_outqueue(l_ptr);
458 kfree_skb(l_ptr->proto_msg_queue);
459 l_ptr->proto_msg_queue = NULL;
460 kfree_skb_list(l_ptr->oldest_deferred_in); 456 kfree_skb_list(l_ptr->oldest_deferred_in);
461 if (!skb_queue_empty(&l_ptr->waiting_sks)) { 457 if (!skb_queue_empty(&l_ptr->waiting_sks)) {
462 skb_queue_splice_init(&l_ptr->waiting_sks, &owner->waiting_sks); 458 skb_queue_splice_init(&l_ptr->waiting_sks, &owner->waiting_sks);
@@ -904,18 +900,6 @@ static u32 tipc_link_push_packet(struct tipc_link *l_ptr)
904 return 0; 900 return 0;
905 } 901 }
906 902
907 /* Send deferred protocol message, if any: */
908 buf = l_ptr->proto_msg_queue;
909 if (buf) {
910 msg_set_ack(buf_msg(buf), mod(l_ptr->next_in_no - 1));
911 msg_set_bcast_ack(buf_msg(buf), l_ptr->owner->bclink.last_in);
912 tipc_bearer_send(l_ptr->bearer_id, buf, &l_ptr->media_addr);
913 l_ptr->unacked_window = 0;
914 kfree_skb(buf);
915 l_ptr->proto_msg_queue = NULL;
916 return 0;
917 }
918
919 /* Send one deferred data message, if send window not full: */ 903 /* Send one deferred data message, if send window not full: */
920 buf = l_ptr->next_out; 904 buf = l_ptr->next_out;
921 if (buf) { 905 if (buf) {
@@ -1446,12 +1430,6 @@ void tipc_link_proto_xmit(struct tipc_link *l_ptr, u32 msg_typ, int probe_msg,
1446 u32 msg_size = sizeof(l_ptr->proto_msg); 1430 u32 msg_size = sizeof(l_ptr->proto_msg);
1447 int r_flag; 1431 int r_flag;
1448 1432
1449 /* Discard any previous message that was deferred due to congestion */
1450 if (l_ptr->proto_msg_queue) {
1451 kfree_skb(l_ptr->proto_msg_queue);
1452 l_ptr->proto_msg_queue = NULL;
1453 }
1454
1455 /* Don't send protocol message during link changeover */ 1433 /* Don't send protocol message during link changeover */
1456 if (l_ptr->exp_msg_count) 1434 if (l_ptr->exp_msg_count)
1457 return; 1435 return;