aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-04-12 14:59:03 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-05-10 16:03:46 -0400
commit7775bcc722ed9993e83401fee9c14008843b83c7 (patch)
treea79f01fa3ba17e16e3d4d3926300638c8d282c3f /net/tipc
parent92138d1f254d58b818e7c3b91a1967cf57d374b5 (diff)
tipc: Remove code to emulate loss of broadcast messages
Eliminates optional code used to test TIPC's ability to recover from lost broadcast messages. This code duplicates functionality already provided by the network stack's QoS option "network emulator". Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/bcast.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 7dc1dc7151ea..08e3216a33d2 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -44,13 +44,6 @@
44 44
45#define BCLINK_WIN_DEFAULT 20 /* bcast link window size (default) */ 45#define BCLINK_WIN_DEFAULT 20 /* bcast link window size (default) */
46 46
47/*
48 * Loss rate for incoming broadcast frames; used to test retransmission code.
49 * Set to N to cause every N'th frame to be discarded; 0 => don't discard any.
50 */
51
52#define TIPC_BCAST_LOSS_RATE 0
53
54/** 47/**
55 * struct bcbearer_pair - a pair of bearers used by broadcast link 48 * struct bcbearer_pair - a pair of bearers used by broadcast link
56 * @primary: pointer to primary bearer 49 * @primary: pointer to primary bearer
@@ -434,9 +427,6 @@ int tipc_bclink_send_msg(struct sk_buff *buf)
434 427
435void tipc_bclink_recv_pkt(struct sk_buff *buf) 428void tipc_bclink_recv_pkt(struct sk_buff *buf)
436{ 429{
437#if (TIPC_BCAST_LOSS_RATE)
438 static int rx_count;
439#endif
440 struct tipc_msg *msg = buf_msg(buf); 430 struct tipc_msg *msg = buf_msg(buf);
441 struct tipc_node *node = tipc_node_find(msg_prevnode(msg)); 431 struct tipc_node *node = tipc_node_find(msg_prevnode(msg));
442 u32 next_in; 432 u32 next_in;
@@ -470,14 +460,6 @@ void tipc_bclink_recv_pkt(struct sk_buff *buf)
470 return; 460 return;
471 } 461 }
472 462
473#if (TIPC_BCAST_LOSS_RATE)
474 if (++rx_count == TIPC_BCAST_LOSS_RATE) {
475 rx_count = 0;
476 buf_discard(buf);
477 return;
478 }
479#endif
480
481 tipc_node_lock(node); 463 tipc_node_lock(node);
482receive: 464receive:
483 deferred = node->bclink.deferred_head; 465 deferred = node->bclink.deferred_head;