~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to net/tipc/bcast.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
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
48
 * struct bcbearer_pair - a pair of bearers used by broadcast link
56
49
 * @primary: pointer to primary bearer
414
407
        spin_lock_bh(&bc_lock);
415
408
 
416
409
        res = tipc_link_send_buf(bcl, buf);
417
 
        if (unlikely(res == -ELINKCONG))
418
 
                buf_discard(buf);
419
 
        else
 
410
        if (likely(res > 0))
420
411
                bclink_set_last_sent();
421
412
 
422
413
        bcl->stats.queue_sz_counts++;
434
425
 
435
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
428
        struct tipc_msg *msg = buf_msg(buf);
441
429
        struct tipc_node *node = tipc_node_find(msg_prevnode(msg));
442
430
        u32 next_in;
470
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
461
        tipc_node_lock(node);
482
462
receive:
483
463
        deferred = node->bclink.deferred_head;