Lines Matching full:cp

74 void rds_connect_path_complete(struct rds_conn_path *cp, int curr)  in rds_connect_path_complete()  argument
76 if (!rds_conn_path_transition(cp, curr, RDS_CONN_UP)) { in rds_connect_path_complete()
80 atomic_read(&cp->cp_state)); in rds_connect_path_complete()
81 rds_conn_path_drop(cp, false); in rds_connect_path_complete()
86 cp->cp_conn, &cp->cp_conn->c_laddr, &cp->cp_conn->c_faddr); in rds_connect_path_complete()
88 cp->cp_reconnect_jiffies = 0; in rds_connect_path_complete()
89 set_bit(0, &cp->cp_conn->c_map_queued); in rds_connect_path_complete()
91 if (!rds_destroy_pending(cp->cp_conn)) { in rds_connect_path_complete()
92 queue_delayed_work(rds_wq, &cp->cp_send_w, 0); in rds_connect_path_complete()
93 queue_delayed_work(rds_wq, &cp->cp_recv_w, 0); in rds_connect_path_complete()
96 cp->cp_conn->c_proposed_version = RDS_PROTOCOL_VERSION; in rds_connect_path_complete()
124 void rds_queue_reconnect(struct rds_conn_path *cp) in rds_queue_reconnect() argument
127 struct rds_connection *conn = cp->cp_conn; in rds_queue_reconnect()
131 cp->cp_reconnect_jiffies); in rds_queue_reconnect()
138 set_bit(RDS_RECONNECT_PENDING, &cp->cp_flags); in rds_queue_reconnect()
139 if (cp->cp_reconnect_jiffies == 0) { in rds_queue_reconnect()
140 cp->cp_reconnect_jiffies = rds_sysctl_reconnect_min_jiffies; in rds_queue_reconnect()
142 if (!rds_destroy_pending(cp->cp_conn)) in rds_queue_reconnect()
143 queue_delayed_work(rds_wq, &cp->cp_conn_w, 0); in rds_queue_reconnect()
150 rand % cp->cp_reconnect_jiffies, cp->cp_reconnect_jiffies, in rds_queue_reconnect()
153 if (!rds_destroy_pending(cp->cp_conn)) in rds_queue_reconnect()
154 queue_delayed_work(rds_wq, &cp->cp_conn_w, in rds_queue_reconnect()
155 rand % cp->cp_reconnect_jiffies); in rds_queue_reconnect()
158 cp->cp_reconnect_jiffies = min(cp->cp_reconnect_jiffies * 2, in rds_queue_reconnect()
164 struct rds_conn_path *cp = container_of(work, in rds_connect_worker() local
167 struct rds_connection *conn = cp->cp_conn; in rds_connect_worker()
170 if (cp->cp_index > 0 && in rds_connect_worker()
171 rds_addr_cmp(&cp->cp_conn->c_laddr, &cp->cp_conn->c_faddr) >= 0) in rds_connect_worker()
173 clear_bit(RDS_RECONNECT_PENDING, &cp->cp_flags); in rds_connect_worker()
174 ret = rds_conn_path_transition(cp, RDS_CONN_DOWN, RDS_CONN_CONNECTING); in rds_connect_worker()
176 ret = conn->c_trans->conn_path_connect(cp); in rds_connect_worker()
181 if (rds_conn_path_transition(cp, in rds_connect_worker()
184 rds_queue_reconnect(cp); in rds_connect_worker()
186 rds_conn_path_error(cp, "connect failed\n"); in rds_connect_worker()
193 struct rds_conn_path *cp = container_of(work, in rds_send_worker() local
198 if (rds_conn_path_state(cp) == RDS_CONN_UP) { in rds_send_worker()
199 clear_bit(RDS_LL_SEND_FULL, &cp->cp_flags); in rds_send_worker()
200 ret = rds_send_xmit(cp); in rds_send_worker()
202 rdsdebug("conn %p ret %d\n", cp->cp_conn, ret); in rds_send_worker()
206 queue_delayed_work(rds_wq, &cp->cp_send_w, 0); in rds_send_worker()
210 queue_delayed_work(rds_wq, &cp->cp_send_w, 2); in rds_send_worker()
220 struct rds_conn_path *cp = container_of(work, in rds_recv_worker() local
225 if (rds_conn_path_state(cp) == RDS_CONN_UP) { in rds_recv_worker()
226 ret = cp->cp_conn->c_trans->recv_path(cp); in rds_recv_worker()
227 rdsdebug("conn %p ret %d\n", cp->cp_conn, ret); in rds_recv_worker()
231 queue_delayed_work(rds_wq, &cp->cp_recv_w, 0); in rds_recv_worker()
235 queue_delayed_work(rds_wq, &cp->cp_recv_w, 2); in rds_recv_worker()
245 struct rds_conn_path *cp = container_of(work, in rds_shutdown_worker() local
249 rds_conn_shutdown(cp); in rds_shutdown_worker()