72 * DOWN -> CONNECTING
73 * CONNECTING -> UP
74 *
75 * Transition to state DISCONNECTING/DOWN:
76 * - Inside the shutdown worker; synchronizes with xmit path
77 * through c_send_lock, and with connection management callbacks
78 * via c_cm_lock.
79 *
80 * For receive callbacks, we rely on the underlying transport
81 * (TCP, IB/RDMA) to provide the necessary synchronisation.
82 */
83 struct rdsv3_workqueue_struct_s *rdsv3_wq;
84
85 void
86 rdsv3_connect_complete(struct rdsv3_connection *conn)
87 {
88 RDSV3_DPRINTF4("rdsv3_connect_complete", "Enter(conn: %p)", conn);
89
90 if (!rdsv3_conn_transition(conn, RDSV3_CONN_CONNECTING,
91 RDSV3_CONN_UP)) {
92 #ifndef __lock_lint
93 RDSV3_DPRINTF2("rdsv3_connect_complete",
94 "%s: Cannot transition to state UP, "
95 "current state is %d",
96 __func__,
97 atomic_get(&conn->c_state));
98 #endif
99 conn->c_state = RDSV3_CONN_ERROR;
100 rdsv3_queue_work(rdsv3_wq, &conn->c_down_w);
101 return;
102 }
103
104 RDSV3_DPRINTF2("rdsv3_connect_complete",
105 "conn %p for %u.%u.%u.%u to %u.%u.%u.%u complete",
106 conn, NIPQUAD(conn->c_laddr), NIPQUAD(conn->c_faddr));
107
108 conn->c_reconnect_jiffies = 0;
109 conn->c_last_connect_jiffies = ddi_get_lbolt();
110
111 set_bit(0, &conn->c_map_queued);
112 rdsv3_queue_delayed_work(rdsv3_wq, &conn->c_send_w, 0);
113 rdsv3_queue_delayed_work(rdsv3_wq, &conn->c_recv_w, 0);
114
115 RDSV3_DPRINTF4("rdsv3_connect_complete", "Return(conn: %p)", conn);
116 }
117
118 /*
|
72 * DOWN -> CONNECTING
73 * CONNECTING -> UP
74 *
75 * Transition to state DISCONNECTING/DOWN:
76 * - Inside the shutdown worker; synchronizes with xmit path
77 * through c_send_lock, and with connection management callbacks
78 * via c_cm_lock.
79 *
80 * For receive callbacks, we rely on the underlying transport
81 * (TCP, IB/RDMA) to provide the necessary synchronisation.
82 */
83 struct rdsv3_workqueue_struct_s *rdsv3_wq;
84
85 void
86 rdsv3_connect_complete(struct rdsv3_connection *conn)
87 {
88 RDSV3_DPRINTF4("rdsv3_connect_complete", "Enter(conn: %p)", conn);
89
90 if (!rdsv3_conn_transition(conn, RDSV3_CONN_CONNECTING,
91 RDSV3_CONN_UP)) {
92 RDSV3_DPRINTF2("rdsv3_connect_complete",
93 "%s: Cannot transition to state UP, "
94 "current state is %d",
95 __func__,
96 atomic_get(&conn->c_state));
97 conn->c_state = RDSV3_CONN_ERROR;
98 rdsv3_queue_work(rdsv3_wq, &conn->c_down_w);
99 return;
100 }
101
102 RDSV3_DPRINTF2("rdsv3_connect_complete",
103 "conn %p for %u.%u.%u.%u to %u.%u.%u.%u complete",
104 conn, NIPQUAD(conn->c_laddr), NIPQUAD(conn->c_faddr));
105
106 conn->c_reconnect_jiffies = 0;
107 conn->c_last_connect_jiffies = ddi_get_lbolt();
108
109 set_bit(0, &conn->c_map_queued);
110 rdsv3_queue_delayed_work(rdsv3_wq, &conn->c_send_w, 0);
111 rdsv3_queue_delayed_work(rdsv3_wq, &conn->c_recv_w, 0);
112
113 RDSV3_DPRINTF4("rdsv3_connect_complete", "Return(conn: %p)", conn);
114 }
115
116 /*
|