Commit a97b9d3f authored by Jon Paul Maloy's avatar Jon Paul Maloy Committed by David S. Miller

tipc: rename fields in struct tipc_link

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: default avatarErik Hugne <erik.hugne@ericsson.com>
Reviewed-by: default avatarYing Xue <ying.xue@windriver.com>
Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e4bf4f76
...@@ -118,16 +118,16 @@ static void bclink_set_last_sent(struct net *net) ...@@ -118,16 +118,16 @@ static void bclink_set_last_sent(struct net *net)
struct sk_buff *skb = skb_peek(&bcl->backlogq); struct sk_buff *skb = skb_peek(&bcl->backlogq);
if (skb) if (skb)
bcl->fsm_msg_cnt = mod(buf_seqno(skb) - 1); bcl->silent_intv_cnt = mod(buf_seqno(skb) - 1);
else 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) u32 tipc_bclink_get_last_sent(struct net *net)
{ {
struct tipc_net *tn = net_generic(net, tipc_net_id); 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) static void bclink_update_last_sent(struct tipc_node *node, u32 seqno)
...@@ -212,16 +212,16 @@ void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked) ...@@ -212,16 +212,16 @@ void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked)
* or both sent and unsent messages (otherwise) * or both sent and unsent messages (otherwise)
*/ */
if (tn->bclink->bcast_nodes.count) if (tn->bclink->bcast_nodes.count)
acked = tn->bcl->fsm_msg_cnt; acked = tn->bcl->silent_intv_cnt;
else else
acked = tn->bcl->next_out_no; acked = tn->bcl->snd_nxt;
} else { } else {
/* /*
* Bail out if specified sequence number does not correspond * Bail out if specified sequence number does not correspond
* to a message that has been sent and not yet acknowledged * to a message that has been sent and not yet acknowledged
*/ */
if (less(acked, buf_seqno(skb)) || 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)) less_eq(acked, n_ptr->bclink.acked))
goto exit; goto exit;
} }
...@@ -803,9 +803,9 @@ int tipc_nl_add_bc_link(struct net *net, struct tipc_nl_msg *msg) ...@@ -803,9 +803,9 @@ int tipc_nl_add_bc_link(struct net *net, struct tipc_nl_msg *msg)
goto attr_msg_full; goto attr_msg_full;
if (nla_put_string(msg->skb, TIPC_NLA_LINK_NAME, bcl->name)) if (nla_put_string(msg->skb, TIPC_NLA_LINK_NAME, bcl->name))
goto attr_msg_full; 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; 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; goto attr_msg_full;
prop = nla_nest_start(msg->skb, TIPC_NLA_LINK_PROP); prop = nla_nest_start(msg->skb, TIPC_NLA_LINK_PROP);
...@@ -914,7 +914,7 @@ int tipc_bclink_init(struct net *net) ...@@ -914,7 +914,7 @@ int tipc_bclink_init(struct net *net)
__skb_queue_head_init(&bcl->backlogq); __skb_queue_head_init(&bcl->backlogq);
__skb_queue_head_init(&bcl->deferdq); __skb_queue_head_init(&bcl->deferdq);
skb_queue_head_init(&bcl->wakeupq); skb_queue_head_init(&bcl->wakeupq);
bcl->next_out_no = 1; bcl->snd_nxt = 1;
spin_lock_init(&bclink->node.lock); spin_lock_init(&bclink->node.lock);
__skb_queue_head_init(&bclink->arrvq); __skb_queue_head_init(&bclink->arrvq);
skb_queue_head_init(&bclink->inputq); skb_queue_head_init(&bclink->inputq);
......
This diff is collapsed.
...@@ -112,25 +112,25 @@ struct tipc_stats { ...@@ -112,25 +112,25 @@ struct tipc_stats {
* @peer_bearer_id: bearer id used by link's peer endpoint * @peer_bearer_id: bearer id used by link's peer endpoint
* @bearer_id: local bearer id used by link * @bearer_id: local bearer id used by link
* @tolerance: minimum link continuity loss needed to reset link [in ms] * @tolerance: minimum link continuity loss needed to reset link [in ms]
* @cont_intv: link continuity testing interval * @keepalive_intv: link keepalive timer interval
* @abort_limit: # of unacknowledged continuity probes needed to reset link * @abort_limit: # of unacknowledged continuity probes needed to reset link
* @state: current state of link FSM * @state: current state of link FSM
* @fsm_msg_cnt: # of protocol messages link FSM has sent in current state * @silent_intv_cnt: # of timer intervals without any reception from peer
* @proto_msg: template for control messages generated by link * @proto_msg: template for control messages generated by link
* @pmsg: convenience pointer to "proto_msg" field * @pmsg: convenience pointer to "proto_msg" field
* @priority: current link priority * @priority: current link priority
* @net_plane: current link network plane ('A' through 'H') * @net_plane: current link network plane ('A' through 'H')
* @backlog_limit: backlog queue congestion thresholds (indexed by importance) * @backlog_limit: backlog queue congestion thresholds (indexed by importance)
* @exp_msg_count: # of tunnelled messages expected during link changeover * @exp_msg_count: # of tunnelled messages expected during link changeover
* @reset_checkpoint: seq # of last acknowledged message at time of link reset * @reset_rcv_checkpt: seq # of last acknowledged message at time of link reset
* @mtu: current maximum packet size for this link * @mtu: current maximum packet size for this link
* @advertised_mtu: advertised own mtu when link is being established * @advertised_mtu: advertised own mtu when link is being established
* @transmitq: queue for sent, non-acked messages * @transmitq: queue for sent, non-acked messages
* @backlogq: queue for messages waiting to be sent * @backlogq: queue for messages waiting to be sent
* @next_out_no: next sequence number to use for outbound messages * @snt_nxt: next sequence number to use for outbound messages
* @last_retransmitted: sequence number of most recently retransmitted message * @last_retransmitted: sequence number of most recently retransmitted message
* @stale_count: # of identical retransmit requests made by peer * @stale_count: # of identical retransmit requests made by peer
* @next_in_no: next sequence number to expect for inbound messages * @rcv_nxt: next sequence number to expect for inbound messages
* @deferred_queue: deferred queue saved OOS b'cast message received from node * @deferred_queue: deferred queue saved OOS b'cast message received from node
* @unacked_window: # of inbound messages rx'd without ack'ing back to peer * @unacked_window: # of inbound messages rx'd without ack'ing back to peer
* @inputq: buffer queue for messages to be delivered upwards * @inputq: buffer queue for messages to be delivered upwards
...@@ -156,10 +156,10 @@ struct tipc_link { ...@@ -156,10 +156,10 @@ struct tipc_link {
u32 peer_bearer_id; u32 peer_bearer_id;
u32 bearer_id; u32 bearer_id;
u32 tolerance; u32 tolerance;
unsigned long cont_intv; unsigned long keepalive_intv;
u32 abort_limit; u32 abort_limit;
int state; int state;
u32 fsm_msg_cnt; u32 silent_intv_cnt;
struct { struct {
unchar hdr[INT_H_SIZE]; unchar hdr[INT_H_SIZE];
unchar body[TIPC_MAX_IF_NAME]; unchar body[TIPC_MAX_IF_NAME];
...@@ -185,13 +185,13 @@ struct tipc_link { ...@@ -185,13 +185,13 @@ struct tipc_link {
u16 len; u16 len;
u16 limit; u16 limit;
} backlog[5]; } backlog[5];
u16 next_out_no; u16 snd_nxt;
u16 last_retransmitted; u16 last_retransm;
u32 window; u32 window;
u32 stale_count; u32 stale_count;
/* Reception */ /* Reception */
u16 next_in_no; u16 rcv_nxt;
u32 rcv_unacked; u32 rcv_unacked;
struct sk_buff_head deferdq; struct sk_buff_head deferdq;
struct sk_buff_head inputq; struct sk_buff_head inputq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment