Lines Matching full:conn

30 	struct rxrpc_connection *conn = NULL;  in rxrpc_find_service_conn_rcu()  local
48 conn = rb_entry(p, struct rxrpc_connection, service_node); in rxrpc_find_service_conn_rcu()
50 if (conn->proto.index_key < k.index_key) in rxrpc_find_service_conn_rcu()
52 else if (conn->proto.index_key > k.index_key) in rxrpc_find_service_conn_rcu()
56 conn = NULL; in rxrpc_find_service_conn_rcu()
61 _leave(" = %d", conn ? conn->debug_id : -1); in rxrpc_find_service_conn_rcu()
62 return conn; in rxrpc_find_service_conn_rcu()
70 struct rxrpc_connection *conn) in rxrpc_publish_service_conn() argument
73 struct rxrpc_conn_proto k = conn->proto; in rxrpc_publish_service_conn()
93 rb_link_node_rcu(&conn->service_node, parent, pp); in rxrpc_publish_service_conn()
94 rb_insert_color(&conn->service_node, &peer->service_conns); in rxrpc_publish_service_conn()
96 set_bit(RXRPC_CONN_IN_SERVICE_CONNS, &conn->flags); in rxrpc_publish_service_conn()
98 _leave(" = %d [new]", conn->debug_id); in rxrpc_publish_service_conn()
113 _debug("replace conn"); in rxrpc_publish_service_conn()
115 &conn->service_node, in rxrpc_publish_service_conn()
128 struct rxrpc_connection *conn = rxrpc_alloc_connection(gfp); in rxrpc_prealloc_service_connection() local
130 if (conn) { in rxrpc_prealloc_service_connection()
134 conn->state = RXRPC_CONN_SERVICE_PREALLOC; in rxrpc_prealloc_service_connection()
135 refcount_set(&conn->ref, 2); in rxrpc_prealloc_service_connection()
136 conn->bundle = rxrpc_get_bundle(&rxrpc_service_dummy_bundle); in rxrpc_prealloc_service_connection()
140 list_add_tail(&conn->link, &rxnet->service_conns); in rxrpc_prealloc_service_connection()
141 list_add_tail(&conn->proc_link, &rxnet->conn_proc_list); in rxrpc_prealloc_service_connection()
144 trace_rxrpc_conn(conn->debug_id, rxrpc_conn_new_service, in rxrpc_prealloc_service_connection()
145 refcount_read(&conn->ref), in rxrpc_prealloc_service_connection()
149 return conn; in rxrpc_prealloc_service_connection()
157 struct rxrpc_connection *conn, in rxrpc_new_incoming_connection() argument
165 conn->proto.epoch = sp->hdr.epoch; in rxrpc_new_incoming_connection()
166 conn->proto.cid = sp->hdr.cid & RXRPC_CIDMASK; in rxrpc_new_incoming_connection()
167 conn->params.service_id = sp->hdr.serviceId; in rxrpc_new_incoming_connection()
168 conn->service_id = sp->hdr.serviceId; in rxrpc_new_incoming_connection()
169 conn->security_ix = sp->hdr.securityIndex; in rxrpc_new_incoming_connection()
170 conn->out_clientflag = 0; in rxrpc_new_incoming_connection()
171 conn->security = sec; in rxrpc_new_incoming_connection()
172 if (conn->security_ix) in rxrpc_new_incoming_connection()
173 conn->state = RXRPC_CONN_SERVICE_UNSECURED; in rxrpc_new_incoming_connection()
175 conn->state = RXRPC_CONN_SERVICE; in rxrpc_new_incoming_connection()
182 conn->service_id == rx->service_upgrade.from) in rxrpc_new_incoming_connection()
183 conn->service_id = rx->service_upgrade.to; in rxrpc_new_incoming_connection()
186 rxrpc_publish_service_conn(conn->params.peer, conn); in rxrpc_new_incoming_connection()
188 _net("CONNECTION new %d {%x}", conn->debug_id, conn->proto.cid); in rxrpc_new_incoming_connection()
195 void rxrpc_unpublish_service_conn(struct rxrpc_connection *conn) in rxrpc_unpublish_service_conn() argument
197 struct rxrpc_peer *peer = conn->params.peer; in rxrpc_unpublish_service_conn()
200 if (test_and_clear_bit(RXRPC_CONN_IN_SERVICE_CONNS, &conn->flags)) in rxrpc_unpublish_service_conn()
201 rb_erase(&conn->service_node, &peer->service_conns); in rxrpc_unpublish_service_conn()