Lines Matching defs:rs

70  * marked this socket and don't return a rs ref to the rx path.
76 struct rds_sock *rs;
80 rs = rhashtable_lookup(&bind_hash_table, key, ht_parms);
81 if (rs && (sock_flag(rds_rs_to_sk(rs), SOCK_DEAD) ||
82 !refcount_inc_not_zero(&rds_rs_to_sk(rs)->sk_refcnt)))
83 rs = NULL;
87 rdsdebug("returning rs %p for %pI6c:%u\n", rs, addr,
90 return rs;
94 static int rds_add_bound(struct rds_sock *rs, const struct in6_addr *addr,
122 memcpy(rs->rs_bound_key, key, sizeof(rs->rs_bound_key));
123 rs->rs_bound_addr = *addr;
124 net_get_random_once(&rs->rs_hash_initval,
125 sizeof(rs->rs_hash_initval));
126 rs->rs_bound_port = cpu_to_be16(rover);
127 rs->rs_bound_node.next = NULL;
128 rds_sock_addref(rs);
130 &rs->rs_bound_node, ht_parms)) {
131 *port = rs->rs_bound_port;
132 rs->rs_bound_scope_id = scope_id;
134 rdsdebug("rs %p binding to %pI6c:%d\n",
135 rs, addr, (int)ntohs(*port));
138 rs->rs_bound_addr = in6addr_any;
139 rds_sock_put(rs);
148 void rds_remove_bound(struct rds_sock *rs)
151 if (ipv6_addr_any(&rs->rs_bound_addr))
154 rdsdebug("rs %p unbinding from %pI6c:%d\n",
155 rs, &rs->rs_bound_addr,
156 ntohs(rs->rs_bound_port));
158 rhashtable_remove_fast(&bind_hash_table, &rs->rs_bound_node, ht_parms);
159 rds_sock_put(rs);
160 rs->rs_bound_addr = in6addr_any;
166 struct rds_sock *rs = rds_sk_to_rs(sk);
227 if (!ipv6_addr_any(&rs->rs_bound_addr)) {
235 if (!ipv6_addr_any(&rs->rs_conn_addr) && scope_id &&
236 rs->rs_bound_scope_id &&
237 scope_id != rs->rs_bound_scope_id) {
245 if (rs->rs_transport) {
246 trans = rs->rs_transport;
262 rs->rs_transport = trans;
266 ret = rds_add_bound(rs, binding_addr, &port, scope_id);
268 rs->rs_transport = NULL;