Skip to content

Commit

Permalink
tipc: rename fields in struct tipc_link
Browse files Browse the repository at this point in the history
We rename some fields in struct tipc_link, in order to give them more
descriptive names:

next_in_no -> rcv_nxt
next_out_no-> snd_nxt
fsm_msg_cnt-> silent_intv_cnt
cont_intv  -> keepalive_intv
last_retransmitted -> last_retransm

There are no functional changes in this commit.

Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jon Paul Maloy authored and David S. Miller committed May 14, 2015
1 parent e4bf4f7 commit a97b9d3
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 96 deletions.
18 changes: 9 additions & 9 deletions net/tipc/bcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,16 @@ static void bclink_set_last_sent(struct net *net)
struct sk_buff *skb = skb_peek(&bcl->backlogq);

if (skb)
bcl->fsm_msg_cnt = mod(buf_seqno(skb) - 1);
bcl->silent_intv_cnt = mod(buf_seqno(skb) - 1);
else
bcl->fsm_msg_cnt = mod(bcl->next_out_no - 1);
bcl->silent_intv_cnt = mod(bcl->snd_nxt - 1);
}

u32 tipc_bclink_get_last_sent(struct net *net)
{
struct tipc_net *tn = net_generic(net, tipc_net_id);

return tn->bcl->fsm_msg_cnt;
return tn->bcl->silent_intv_cnt;
}

static void bclink_update_last_sent(struct tipc_node *node, u32 seqno)
Expand Down Expand Up @@ -212,16 +212,16 @@ void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked)
* or both sent and unsent messages (otherwise)
*/
if (tn->bclink->bcast_nodes.count)
acked = tn->bcl->fsm_msg_cnt;
acked = tn->bcl->silent_intv_cnt;
else
acked = tn->bcl->next_out_no;
acked = tn->bcl->snd_nxt;
} else {
/*
* Bail out if specified sequence number does not correspond
* to a message that has been sent and not yet acknowledged
*/
if (less(acked, buf_seqno(skb)) ||
less(tn->bcl->fsm_msg_cnt, acked) ||
less(tn->bcl->silent_intv_cnt, acked) ||
less_eq(acked, n_ptr->bclink.acked))
goto exit;
}
Expand Down Expand Up @@ -803,9 +803,9 @@ int tipc_nl_add_bc_link(struct net *net, struct tipc_nl_msg *msg)
goto attr_msg_full;
if (nla_put_string(msg->skb, TIPC_NLA_LINK_NAME, bcl->name))
goto attr_msg_full;
if (nla_put_u32(msg->skb, TIPC_NLA_LINK_RX, bcl->next_in_no))
if (nla_put_u32(msg->skb, TIPC_NLA_LINK_RX, bcl->rcv_nxt))
goto attr_msg_full;
if (nla_put_u32(msg->skb, TIPC_NLA_LINK_TX, bcl->next_out_no))
if (nla_put_u32(msg->skb, TIPC_NLA_LINK_TX, bcl->snd_nxt))
goto attr_msg_full;

prop = nla_nest_start(msg->skb, TIPC_NLA_LINK_PROP);
Expand Down Expand Up @@ -914,7 +914,7 @@ int tipc_bclink_init(struct net *net)
__skb_queue_head_init(&bcl->backlogq);
__skb_queue_head_init(&bcl->deferdq);
skb_queue_head_init(&bcl->wakeupq);
bcl->next_out_no = 1;
bcl->snd_nxt = 1;
spin_lock_init(&bclink->node.lock);
__skb_queue_head_init(&bclink->arrvq);
skb_queue_head_init(&bclink->inputq);
Expand Down
Loading

0 comments on commit a97b9d3

Please sign in to comment.