aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>2016-11-01 09:02:41 -0400
committerDavid S. Miller <davem@davemloft.net>2016-11-01 11:53:24 -0400
commit360aab6b49b93937bafd45034d33e7d44148fe82 (patch)
tree8c32130962a9ca48468f0cdcd8a14b84d74a60ad /net/tipc
parentd6fb7e9c9946578667283805b9a73f318e3a0554 (diff)
tipc: remove probing_intv from tipc_sock
Until now, probing_intv is a variable in struct tipc_sock but is always set to a constant CONN_PROBING_INTERVAL. The socket connection is probed based on this value. In this commit, we remove this variable and setup the socket timer based on the constant CONN_PROBING_INTERVAL. There is no functional change in this commit. Acked-by: Ying Xue <ying.xue@windriver.com> Acked-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/socket.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 7b6a1847cf8a..1b1aa941cd06 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -67,7 +67,6 @@
67 * @publications: list of publications for port 67 * @publications: list of publications for port
68 * @pub_count: total # of publications port has made during its lifetime 68 * @pub_count: total # of publications port has made during its lifetime
69 * @probing_state: 69 * @probing_state:
70 * @probing_intv:
71 * @conn_timeout: the time we can wait for an unresponded setup request 70 * @conn_timeout: the time we can wait for an unresponded setup request
72 * @dupl_rcvcnt: number of bytes counted twice, in both backlog and rcv queue 71 * @dupl_rcvcnt: number of bytes counted twice, in both backlog and rcv queue
73 * @link_cong: non-zero if owner must sleep because of link congestion 72 * @link_cong: non-zero if owner must sleep because of link congestion
@@ -89,7 +88,6 @@ struct tipc_sock {
89 struct list_head publications; 88 struct list_head publications;
90 u32 pub_count; 89 u32 pub_count;
91 u32 probing_state; 90 u32 probing_state;
92 unsigned long probing_intv;
93 uint conn_timeout; 91 uint conn_timeout;
94 atomic_t dupl_rcvcnt; 92 atomic_t dupl_rcvcnt;
95 bool link_cong; 93 bool link_cong;
@@ -1153,9 +1151,8 @@ static void tipc_sk_finish_conn(struct tipc_sock *tsk, u32 peer_port,
1153 msg_set_lookup_scope(msg, 0); 1151 msg_set_lookup_scope(msg, 0);
1154 msg_set_hdr_sz(msg, SHORT_H_SIZE); 1152 msg_set_hdr_sz(msg, SHORT_H_SIZE);
1155 1153
1156 tsk->probing_intv = CONN_PROBING_INTERVAL;
1157 tsk->probing_state = TIPC_CONN_OK; 1154 tsk->probing_state = TIPC_CONN_OK;
1158 sk_reset_timer(sk, &sk->sk_timer, jiffies + tsk->probing_intv); 1155 sk_reset_timer(sk, &sk->sk_timer, jiffies + CONN_PROBING_INTERVAL);
1159 tipc_node_add_conn(net, peer_node, tsk->portid, peer_port); 1156 tipc_node_add_conn(net, peer_node, tsk->portid, peer_port);
1160 tsk->max_pkt = tipc_node_get_mtu(net, peer_node, tsk->portid); 1157 tsk->max_pkt = tipc_node_get_mtu(net, peer_node, tsk->portid);
1161 tsk->peer_caps = tipc_node_get_capabilities(net, peer_node); 1158 tsk->peer_caps = tipc_node_get_capabilities(net, peer_node);
@@ -2240,13 +2237,15 @@ static void tipc_sk_timeout(unsigned long data)
2240 sk_reset_timer(sk, &sk->sk_timer, (HZ / 20)); 2237 sk_reset_timer(sk, &sk->sk_timer, (HZ / 20));
2241 } 2238 }
2242 2239
2243 } else { 2240 bh_unlock_sock(sk);
2244 skb = tipc_msg_create(CONN_MANAGER, CONN_PROBE, 2241 goto exit;
2245 INT_H_SIZE, 0, peer_node, own_node,
2246 peer_port, tsk->portid, TIPC_OK);
2247 tsk->probing_state = TIPC_CONN_PROBING;
2248 sk_reset_timer(sk, &sk->sk_timer, jiffies + tsk->probing_intv);
2249 } 2242 }
2243
2244 skb = tipc_msg_create(CONN_MANAGER, CONN_PROBE,
2245 INT_H_SIZE, 0, peer_node, own_node,
2246 peer_port, tsk->portid, TIPC_OK);
2247 tsk->probing_state = TIPC_CONN_PROBING;
2248 sk_reset_timer(sk, &sk->sk_timer, jiffies + CONN_PROBING_INTERVAL);
2250 bh_unlock_sock(sk); 2249 bh_unlock_sock(sk);
2251 if (skb) 2250 if (skb)
2252 tipc_node_xmit_skb(sock_net(sk), skb, peer_node, tsk->portid); 2251 tipc_node_xmit_skb(sock_net(sk), skb, peer_node, tsk->portid);