Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213824
b: refs/heads/master
c: 5b1f7bd
h: refs/heads/master
v: v3
  • Loading branch information
Allan Stephens authored and David S. Miller committed Aug 18, 2010
1 parent 074bdce commit 75ee67a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7e3e5d0950559d1118dccbdff3c765fffcf04fd5
refs/heads/master: 5b1f7bdeb698547cc319c7a302a5acf585227a92
30 changes: 19 additions & 11 deletions trunk/net/tipc/bcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,19 @@ static void bcbuf_decr_acks(struct sk_buff *buf)
}


static void bclink_set_last_sent(void)
{
if (bcl->next_out)
bcl->fsm_msg_cnt = mod(buf_seqno(bcl->next_out) - 1);
else
bcl->fsm_msg_cnt = mod(bcl->next_out_no - 1);
}

u32 tipc_bclink_get_last_sent(void)
{
return bcl->fsm_msg_cnt;
}

/**
* bclink_set_gap - set gap according to contents of current deferred pkt queue
*
Expand Down Expand Up @@ -237,8 +250,10 @@ void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked)

/* Try resolving broadcast link congestion, if necessary */

if (unlikely(bcl->next_out))
if (unlikely(bcl->next_out)) {
tipc_link_push_queue(bcl);
bclink_set_last_sent();
}
if (unlikely(released && !list_empty(&bcl->waiting_ports)))
tipc_link_wakeup_ports(bcl, 0);
spin_unlock_bh(&bc_lock);
Expand Down Expand Up @@ -394,8 +409,10 @@ int tipc_bclink_send_msg(struct sk_buff *buf)
res = tipc_link_send_buf(bcl, buf);
if (unlikely(res == -ELINKCONG))
buf_discard(buf);
else
else {
bcl->stats.sent_info++;
bclink_set_last_sent();
}

if (bcl->out_queue_size > bcl->stats.max_queue_sz)
bcl->stats.max_queue_sz = bcl->out_queue_size;
Expand Down Expand Up @@ -529,15 +546,6 @@ void tipc_bclink_recv_pkt(struct sk_buff *buf)
tipc_node_unlock(node);
}

u32 tipc_bclink_get_last_sent(void)
{
u32 last_sent = mod(bcl->next_out_no - 1);

if (bcl->next_out)
last_sent = mod(buf_seqno(bcl->next_out) - 1);
return last_sent;
}

u32 tipc_bclink_acks_missing(struct tipc_node *n_ptr)
{
return (n_ptr->bclink.supported &&
Expand Down

0 comments on commit 75ee67a

Please sign in to comment.