diff options
Diffstat (limited to 'net/tipc/bcast.c')
| -rw-r--r-- | net/tipc/bcast.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index 7dc1dc7151ea..fa68d1e9ff4b 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 |
| @@ -414,9 +407,7 @@ int tipc_bclink_send_msg(struct sk_buff *buf) | |||
| 414 | spin_lock_bh(&bc_lock); | 407 | spin_lock_bh(&bc_lock); |
| 415 | 408 | ||
| 416 | res = tipc_link_send_buf(bcl, buf); | 409 | res = tipc_link_send_buf(bcl, buf); |
| 417 | if (unlikely(res == -ELINKCONG)) | 410 | if (likely(res > 0)) |
| 418 | buf_discard(buf); | ||
| 419 | else | ||
| 420 | bclink_set_last_sent(); | 411 | bclink_set_last_sent(); |
| 421 | 412 | ||
| 422 | bcl->stats.queue_sz_counts++; | 413 | bcl->stats.queue_sz_counts++; |
| @@ -434,9 +425,6 @@ int tipc_bclink_send_msg(struct sk_buff *buf) | |||
| 434 | 425 | ||
| 435 | void tipc_bclink_recv_pkt(struct sk_buff *buf) | 426 | void tipc_bclink_recv_pkt(struct sk_buff *buf) |
| 436 | { | 427 | { |
| 437 | #if (TIPC_BCAST_LOSS_RATE) | ||
| 438 | static int rx_count; | ||
| 439 | #endif | ||
| 440 | struct tipc_msg *msg = buf_msg(buf); | 428 | struct tipc_msg *msg = buf_msg(buf); |
| 441 | struct tipc_node *node = tipc_node_find(msg_prevnode(msg)); | 429 | struct tipc_node *node = tipc_node_find(msg_prevnode(msg)); |
| 442 | u32 next_in; | 430 | u32 next_in; |
| @@ -470,14 +458,6 @@ void tipc_bclink_recv_pkt(struct sk_buff *buf) | |||
| 470 | return; | 458 | return; |
| 471 | } | 459 | } |
| 472 | 460 | ||
| 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); | 461 | tipc_node_lock(node); |
| 482 | receive: | 462 | receive: |
| 483 | deferred = node->bclink.deferred_head; | 463 | deferred = node->bclink.deferred_head; |
