linux/net/rds/connection.c
<<
>>
Prefs
   1/*
   2 * Copyright (c) 2006 Oracle.  All rights reserved.
   3 *
   4 * This software is available to you under a choice of one of two
   5 * licenses.  You may choose to be licensed under the terms of the GNU
   6 * General Public License (GPL) Version 2, available from the file
   7 * COPYING in the main directory of this source tree, or the
   8 * OpenIB.org BSD license below:
   9 *
  10 *     Redistribution and use in source and binary forms, with or
  11 *     without modification, are permitted provided that the following
  12 *     conditions are met:
  13 *
  14 *      - Redistributions of source code must retain the above
  15 *        copyright notice, this list of conditions and the following
  16 *        disclaimer.
  17 *
  18 *      - Redistributions in binary form must reproduce the above
  19 *        copyright notice, this list of conditions and the following
  20 *        disclaimer in the documentation and/or other materials
  21 *        provided with the distribution.
  22 *
  23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  27 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  30 * SOFTWARE.
  31 *
  32 */
  33#include <linux/kernel.h>
  34#include <linux/list.h>
  35#include <linux/slab.h>
  36#include <linux/export.h>
  37#include <net/inet_hashtables.h>
  38
  39#include "rds.h"
  40#include "loop.h"
  41
  42#define RDS_CONNECTION_HASH_BITS 12
  43#define RDS_CONNECTION_HASH_ENTRIES (1 << RDS_CONNECTION_HASH_BITS)
  44#define RDS_CONNECTION_HASH_MASK (RDS_CONNECTION_HASH_ENTRIES - 1)
  45
  46/* converting this to RCU is a chore for another day.. */
  47static DEFINE_SPINLOCK(rds_conn_lock);
  48static unsigned long rds_conn_count;
  49static struct hlist_head rds_conn_hash[RDS_CONNECTION_HASH_ENTRIES];
  50static struct kmem_cache *rds_conn_slab;
  51
  52static struct hlist_head *rds_conn_bucket(__be32 laddr, __be32 faddr)
  53{
  54        /* Pass NULL, don't need struct net for hash */
  55        unsigned long hash = inet_ehashfn(NULL,
  56                                          be32_to_cpu(laddr), 0,
  57                                          be32_to_cpu(faddr), 0);
  58        return &rds_conn_hash[hash & RDS_CONNECTION_HASH_MASK];
  59}
  60
  61#define rds_conn_info_set(var, test, suffix) do {               \
  62        if (test)                                               \
  63                var |= RDS_INFO_CONNECTION_FLAG_##suffix;       \
  64} while (0)
  65
  66/* rcu read lock must be held or the connection spinlock */
  67static struct rds_connection *rds_conn_lookup(struct hlist_head *head,
  68                                              __be32 laddr, __be32 faddr,
  69                                              struct rds_transport *trans)
  70{
  71        struct rds_connection *conn, *ret = NULL;
  72        struct hlist_node *pos;
  73
  74        hlist_for_each_entry_rcu(conn, pos, head, c_hash_node) {
  75                if (conn->c_faddr == faddr && conn->c_laddr == laddr &&
  76                                conn->c_trans == trans) {
  77                        ret = conn;
  78                        break;
  79                }
  80        }
  81        rdsdebug("returning conn %p for %pI4 -> %pI4\n", ret,
  82                 &laddr, &faddr);
  83        return ret;
  84}
  85
  86/*
  87 * This is called by transports as they're bringing down a connection.
  88 * It clears partial message state so that the transport can start sending
  89 * and receiving over this connection again in the future.  It is up to
  90 * the transport to have serialized this call with its send and recv.
  91 */
  92static void rds_conn_reset(struct rds_connection *conn)
  93{
  94        rdsdebug("connection %pI4 to %pI4 reset\n",
  95          &conn->c_laddr, &conn->c_faddr);
  96
  97        rds_stats_inc(s_conn_reset);
  98        rds_send_reset(conn);
  99        conn->c_flags = 0;
 100
 101        /* Do not clear next_rx_seq here, else we cannot distinguish
 102         * retransmitted packets from new packets, and will hand all
 103         * of them to the application. That is not consistent with the
 104         * reliability guarantees of RDS. */
 105}
 106
 107/*
 108 * There is only every one 'conn' for a given pair of addresses in the
 109 * system at a time.  They contain messages to be retransmitted and so
 110 * span the lifetime of the actual underlying transport connections.
 111 *
 112 * For now they are not garbage collected once they're created.  They
 113 * are torn down as the module is removed, if ever.
 114 */
 115static struct rds_connection *__rds_conn_create(__be32 laddr, __be32 faddr,
 116                                       struct rds_transport *trans, gfp_t gfp,
 117                                       int is_outgoing)
 118{
 119        struct rds_connection *conn, *parent = NULL;
 120        struct hlist_head *head = rds_conn_bucket(laddr, faddr);
 121        struct rds_transport *loop_trans;
 122        unsigned long flags;
 123        int ret;
 124
 125        rcu_read_lock();
 126        conn = rds_conn_lookup(head, laddr, faddr, trans);
 127        if (conn && conn->c_loopback && conn->c_trans != &rds_loop_transport &&
 128            !is_outgoing) {
 129                /* This is a looped back IB connection, and we're
 130                 * called by the code handling the incoming connect.
 131                 * We need a second connection object into which we
 132                 * can stick the other QP. */
 133                parent = conn;
 134                conn = parent->c_passive;
 135        }
 136        rcu_read_unlock();
 137        if (conn)
 138                goto out;
 139
 140        conn = kmem_cache_zalloc(rds_conn_slab, gfp);
 141        if (!conn) {
 142                conn = ERR_PTR(-ENOMEM);
 143                goto out;
 144        }
 145
 146        INIT_HLIST_NODE(&conn->c_hash_node);
 147        conn->c_laddr = laddr;
 148        conn->c_faddr = faddr;
 149        spin_lock_init(&conn->c_lock);
 150        conn->c_next_tx_seq = 1;
 151
 152        init_waitqueue_head(&conn->c_waitq);
 153        INIT_LIST_HEAD(&conn->c_send_queue);
 154        INIT_LIST_HEAD(&conn->c_retrans);
 155
 156        ret = rds_cong_get_maps(conn);
 157        if (ret) {
 158                kmem_cache_free(rds_conn_slab, conn);
 159                conn = ERR_PTR(ret);
 160                goto out;
 161        }
 162
 163        /*
 164         * This is where a connection becomes loopback.  If *any* RDS sockets
 165         * can bind to the destination address then we'd rather the messages
 166         * flow through loopback rather than either transport.
 167         */
 168        loop_trans = rds_trans_get_preferred(faddr);
 169        if (loop_trans) {
 170                rds_trans_put(loop_trans);
 171                conn->c_loopback = 1;
 172                if (is_outgoing && trans->t_prefer_loopback) {
 173                        /* "outgoing" connection - and the transport
 174                         * says it wants the connection handled by the
 175                         * loopback transport. This is what TCP does.
 176                         */
 177                        trans = &rds_loop_transport;
 178                }
 179        }
 180
 181        conn->c_trans = trans;
 182
 183        ret = trans->conn_alloc(conn, gfp);
 184        if (ret) {
 185                kmem_cache_free(rds_conn_slab, conn);
 186                conn = ERR_PTR(ret);
 187                goto out;
 188        }
 189
 190        atomic_set(&conn->c_state, RDS_CONN_DOWN);
 191        conn->c_reconnect_jiffies = 0;
 192        INIT_DELAYED_WORK(&conn->c_send_w, rds_send_worker);
 193        INIT_DELAYED_WORK(&conn->c_recv_w, rds_recv_worker);
 194        INIT_DELAYED_WORK(&conn->c_conn_w, rds_connect_worker);
 195        INIT_WORK(&conn->c_down_w, rds_shutdown_worker);
 196        mutex_init(&conn->c_cm_lock);
 197        conn->c_flags = 0;
 198
 199        rdsdebug("allocated conn %p for %pI4 -> %pI4 over %s %s\n",
 200          conn, &laddr, &faddr,
 201          trans->t_name ? trans->t_name : "[unknown]",
 202          is_outgoing ? "(outgoing)" : "");
 203
 204        /*
 205         * Since we ran without holding the conn lock, someone could
 206         * have created the same conn (either normal or passive) in the
 207         * interim. We check while holding the lock. If we won, we complete
 208         * init and return our conn. If we lost, we rollback and return the
 209         * other one.
 210         */
 211        spin_lock_irqsave(&rds_conn_lock, flags);
 212        if (parent) {
 213                /* Creating passive conn */
 214                if (parent->c_passive) {
 215                        trans->conn_free(conn->c_transport_data);
 216                        kmem_cache_free(rds_conn_slab, conn);
 217                        conn = parent->c_passive;
 218                } else {
 219                        parent->c_passive = conn;
 220                        rds_cong_add_conn(conn);
 221                        rds_conn_count++;
 222                }
 223        } else {
 224                /* Creating normal conn */
 225                struct rds_connection *found;
 226
 227                found = rds_conn_lookup(head, laddr, faddr, trans);
 228                if (found) {
 229                        trans->conn_free(conn->c_transport_data);
 230                        kmem_cache_free(rds_conn_slab, conn);
 231                        conn = found;
 232                } else {
 233                        hlist_add_head_rcu(&conn->c_hash_node, head);
 234                        rds_cong_add_conn(conn);
 235                        rds_conn_count++;
 236                }
 237        }
 238        spin_unlock_irqrestore(&rds_conn_lock, flags);
 239
 240out:
 241        return conn;
 242}
 243
 244struct rds_connection *rds_conn_create(__be32 laddr, __be32 faddr,
 245                                       struct rds_transport *trans, gfp_t gfp)
 246{
 247        return __rds_conn_create(laddr, faddr, trans, gfp, 0);
 248}
 249EXPORT_SYMBOL_GPL(rds_conn_create);
 250
 251struct rds_connection *rds_conn_create_outgoing(__be32 laddr, __be32 faddr,
 252                                       struct rds_transport *trans, gfp_t gfp)
 253{
 254        return __rds_conn_create(laddr, faddr, trans, gfp, 1);
 255}
 256EXPORT_SYMBOL_GPL(rds_conn_create_outgoing);
 257
 258void rds_conn_shutdown(struct rds_connection *conn)
 259{
 260        /* shut it down unless it's down already */
 261        if (!rds_conn_transition(conn, RDS_CONN_DOWN, RDS_CONN_DOWN)) {
 262                /*
 263                 * Quiesce the connection mgmt handlers before we start tearing
 264                 * things down. We don't hold the mutex for the entire
 265                 * duration of the shutdown operation, else we may be
 266                 * deadlocking with the CM handler. Instead, the CM event
 267                 * handler is supposed to check for state DISCONNECTING
 268                 */
 269                mutex_lock(&conn->c_cm_lock);
 270                if (!rds_conn_transition(conn, RDS_CONN_UP, RDS_CONN_DISCONNECTING)
 271                 && !rds_conn_transition(conn, RDS_CONN_ERROR, RDS_CONN_DISCONNECTING)) {
 272                        rds_conn_error(conn, "shutdown called in state %d\n",
 273                                        atomic_read(&conn->c_state));
 274                        mutex_unlock(&conn->c_cm_lock);
 275                        return;
 276                }
 277                mutex_unlock(&conn->c_cm_lock);
 278
 279                wait_event(conn->c_waitq,
 280                           !test_bit(RDS_IN_XMIT, &conn->c_flags));
 281
 282                conn->c_trans->conn_shutdown(conn);
 283                rds_conn_reset(conn);
 284
 285                if (!rds_conn_transition(conn, RDS_CONN_DISCONNECTING, RDS_CONN_DOWN)) {
 286                        /* This can happen - eg when we're in the middle of tearing
 287                         * down the connection, and someone unloads the rds module.
 288                         * Quite reproduceable with loopback connections.
 289                         * Mostly harmless.
 290                         */
 291                        rds_conn_error(conn,
 292                                "%s: failed to transition to state DOWN, "
 293                                "current state is %d\n",
 294                                __func__,
 295                                atomic_read(&conn->c_state));
 296                        return;
 297                }
 298        }
 299
 300        /* Then reconnect if it's still live.
 301         * The passive side of an IB loopback connection is never added
 302         * to the conn hash, so we never trigger a reconnect on this
 303         * conn - the reconnect is always triggered by the active peer. */
 304        cancel_delayed_work_sync(&conn->c_conn_w);
 305        rcu_read_lock();
 306        if (!hlist_unhashed(&conn->c_hash_node)) {
 307                rcu_read_unlock();
 308                rds_queue_reconnect(conn);
 309        } else {
 310                rcu_read_unlock();
 311        }
 312}
 313
 314/*
 315 * Stop and free a connection.
 316 *
 317 * This can only be used in very limited circumstances.  It assumes that once
 318 * the conn has been shutdown that no one else +codennection.c#L302"as been shutdown that no one else +cod2iet/rds/conne id="L316" class="line" name="L316"> 316316" class="line" name="L316"> 316 304            3           rds_conn_shutdown(strucgesconnrds_connection *conn)
 259{
3         3   }
 310        } el3e {
" id="L 311            3    311    n class="   struct  156  3 href="ne3/rds/connection.c#L227" 3d="L232/a> = "allocated conn %p for %pI4 -> %pI4 ion.et/rion.c7;s\n",
 293  3         3   found = ,4" id="L294" claladdr, &c_hash_node)) {
faddrer" cl" class="line" name="L295"> 295  3         3   if (found) gt;c_flags));
faddre="L169" class="line" name="L169"> 169  3         3            300            3           
L304" class="line" name="L304"> 304            3           spin_lock_irqsave(&fadd/a>(&->connflags);
 169  3         3   } else {
c_hash_node)) {
 169  3     } el3           INIT_DELAYED_WORK<_conn_lock" claass="sref">fadd/a>(&_lock" claa>->connflags);
 169  3         3           cancel_delann 311            3            156  3         3   }
 304            3href="net/rds/connection3c#L2333n->connhead 309        spin_unlock_iflu" if">ction.c#L239" id="u" if">ca>->c_hash_node)) {
 309            3/rds/connection.c#L240" 3d="L230" class="line" name="L240"> 240out<3a>:
<34ct if it's still live.
cd f">con.cf="net/tpantose +nnection.cL304" class="line" name="L304"> 304        retu3n (&conn->c_conn_w);
rdslass="line" name="L309"> 309   a href="n3t/rds/connection.c#L243"3id="L34nection.c#L23unhashed(&aeed_work_sync(&conn->c_conn_w);
rdslass="line" name="L309"> 309   a    } el3/rds/connection.c#L244" 3d="L234" class="line" name="L244"> 244st3uct cd " id="LscL304" class="line" name="L304"> 304            3                        3 stru34sref">rcu_read_lock();
 295  3a href="n3t/rds/connection.c#L247"3id="L34rds/connection.c#L297" id="L2nd) gt;c_flags));
cnd_worker" class="srefef">cDS_Cass="line" name="L295"> 295  3a        3n conn =  310   a href="n3t/rds/connection.c#L249"3id="L34nnect" class="sref">rds_queue_reconnass="delonnhead 309   a        3e=EXPORT_SYMBOL_GPL" cla3s="sr34ass="sref">wait_event(->sck" ctemconn" class="srm>sck" ctem96" class="line" name="L296"> 296  3 href="ne3/rds/connection.c#L251" 3d="L235k" class="sref">rcu_read_unlock()f">" id="L_pion.c#L241" id="L)f">" id="L_pio 296  3     retu3f="+code=rds_connection"3class35 id="L312" class="line" name="L312"> 312}
<         3                        3 stru3t c_flags));
 259{
3a href="n3t/rds/connection.c#L254"3id="L35" class="sref">rds_conn_reset(" id="L_pioc_flags));
 296  3 ct  285  3a href="n3t/rds/connection.c#L256"3id="L35sref">rcu_read_lock();
c_flags));
conn_shutdown(conn->c_transport_data);
 230  3href="+co3e=EXPORT_SYMBOL_GPL" cla3s="sr35" class="line" name="L227"> 227  3 href="ne3/rds/connection.c#L258" 3d="L235n-> 315cf="net/>-&gd up here.  Tecyet/rds/15" class="line" name="L315"> 315-&gd by rref">conexit() aftnectll ng
 303/* shut3it do36ref="net/rds/connection.c#L211" id="Live) i2"as >-&gd316" class="line" name="L316"> 316 304            3   (&arref">conremove_ransport_data" clasrref">conremove_rans 309   an class=3comment">               3 * Qu36" class="line" name="L244"> 244st3an class=3comment">               3 * th36nc" class="sref">cancel_delaBUG_O/rds/connection.BUG_O/a>-&g_unhashed(&aass="emptyonn" class="sreass="emptya>->c_conn_w);
 296  3an class=3comment">               3 * du36sref">rcu_read_lock();
<rds_conn_slab, conn);
 231  3an class=3comment">               3 * de36" class="line" name="L227"> 227  3an class=3comment">               3 * ha36n->rds_conn_lock, flags);
 212  3an class=3comment">               3 */spin_unlock_ief">flags"net/rds/connection.c#L236" id="L236" --ass="line" name="L212"> 212  3a        3   rdsdebug(rds_conn_lock, flags);
 239
<3         3   if (! 312}
<         3    && !(rds_conn_create_outggesconn 239
<3         3            239
<3 n class=3                        3  rds_conn_shutdown(struc" id="L_infoonn" class="sref">connrds_connection * 295  3         3           mutex_unnnnnnnnnnn>rds_connection *cinfo cterat=c 295  3 n class=3           return;
 295  3 n class=3   }
 * 259{
3         3    310    href="ne3/rds/connection.c#L279" 3d="L237" class="sref>rds_connection * 239
<3         3   wa>rds_connection * 239
<3         3              !rds_connection * 239
<3         3/rds/connection.c#L282" 3d="L2381t_bit" class>rds_connection *conn)
 239
<3         3   conn>rds_connection *" id="L 239
<3 n class=3    239
<3         3/rds/connection.c#L285" 3d="L238ting normal cunsignhrelot/rf="net/rds/connonnection.c#L239" id="L239" cass="line" name="L311"> 311            3   if (!rcu_read_lock();
f="net/rds/connconn" class="srec9" cass="line" name="L311"> 311    n class=3            227  3an class=3comment">               3     38n->rds_connection *info " id="Lsreflass="line" name="L239"> 239
<3an class=3comment">               3     38" class="line" name="L279"> 279  3an class=3comment">               3     38>rdsdebug( 306   an class=3comment">               3     39" class="line" name="L251"> 251st3         3           rds_conn_crconn" class="srec9" cs= 0href="net/rds/connection.c#L234" id="L234" cs_conn_lookup(connf="net/rds/connconn" class="srec9" c <a>f="net/rds/connARRAY_SIZEonn" class="sreARRAY_SIZEs="sref">rds_conn_create_outg07" onn" class="sref">conn 306   a        3                   "%f="net/rds/connconn" class="srec9" c++href="net/rds/connection.c#L234" id="L234" c++llass="line" name="L310"> 310            3                   "currentnnection * 310            3                   __fu{
 259{
3         3                   atomic_read(&c_flags));
cnd_worker" class="srefef">cDS_Cass="line" name="L306"> 306   an class=3           return;
 306   an class=3   }
atomic_read(&c_flags));
 306   an class=3href="net/rds/connection3c#L2939" class="line" name="L279"> 279  3 href="ne3/rds/connection.c#L300" 3d="L339 class="sref">trans->rds_conn_lock, c_flags));
);
 239
<4     /* Then4recon40" class="line" name="L251"> 251st4an class=4comment">         * The 4assiv40nn_error" class="sref">rds_connnection.c#L205" id="L2"XXX too lazantosmaincain d="L2s.="L304" class="line" name="L304"> 304  4an class=4comment">         * to t4e con40nn_error" class="sref">rds_conn_error(rds_conn_cremconn" class="sremDS_CONf="net/rds/connass=ion.c#L234" id=ass=4" cONf="net/rds/connm>head 310  4an class=4comment">         * conn4- the40string">"current state is %d\nection * 236  4     mutex_unnnnnnnnn{
 259{
4     inc>info copyonn" class="sref">cinc>info copyf">rds_conn_lock, i; 295  4     if (4c_flags));
faddrer" cl" class="line" name="L295"> 295  4         4   rcu_rllllllllllllllllll" id="L2nnnnnnnnnn%d\nection *c_flags));
faddre="L169" c" class="line" name="L248"> 248}
4         4   rrrrrrrrrass="line" name="L312"> 312}
4     } el4e {
 240rcu_rnn%d\nection *(&rds_conn_lock, c_flags));
);
 239
<4     }
 312}
4a href="n4t/rds/connection.c#L313"4id="L41nn_error" claass="line" name="L312"> 312}
4an class=4/rds/connection.c#L314" 4d="L341ss="sref">INIT_DELAYED_WORK<);
 311  4an class=4comment">/*
 285  4an class=4comment"> * Stop and fre4 a co41sref">rcu_read_lock();
));
faddnr4" cs_conn_lookup(totalconn" class="srtotal claass="line" name="L311"> 311  4a    if (4comment"> *
));
rds_connection *info " id="Lsreflass="line" name="L239"> 239
<4an class=4comment"> * This can onl4 be u4ed in ass="line" name="L312"> 312}
4a        4comment"> * the conn has4been 41" class="line" name="L279"> 279  4a    } el4           rds_conn_shutdown(struc" id="L_info="sretion.c#L239" id/a>(struc" id="L_info="sresref">rds_connection * 295  4         4           test_bitrds_connection *cinfo cterat=c 295  4         4           rds_cords_connection * 259{
4         4   }
 310  4     } el4e {
INIT_DELAYED_WORK<)a>(struc" id="L_infoonn" class="sref">conn);
 * 255}
4         4    312}
4 n class=4   struct  156  4 href="ne4/rds/connection.c#L227" 4d="L242/a> =d="Lic ">rds_conn_shutdown(struc" id="L_info=rd=conn_shutdown" clas/a>(struc" id="L_info=rd=connsref">rds_connection * 156  4 n class=4   found =  * 295  4         4   if (found) g">test_bitrds_connection *cinfo cterat=c 295  4     } el4           trans-><_cords_connection * 259{
4         4            310  4         4           spin_lock_irqsave<)a>(struc" id="L_infoonn" class="sref">conn);
 * 248}
4         4   } else {
 313
<4     } el4            244st4         4           rds_conn_shutdown(uot_each_headcuot_each_headrds_connection * 295  4         4           cinfo cterat=c 295  4         4   }
rds_connection * 295  4         4href="net/rds/connection4c#L2343sref">found = rds_connection *conn)
rds*)ass="line" name="L295"> 295  4         4ef="+code=spin_unlock_ir4resto43ss="sref">found) g">test_bif="net/rds/connsizehconn" class="sresizehcref">f="net/rds/connctem_letion.c#L231" id=ctem_letDS_Cass="line" name="L259"> 259{
4     } el4/rds/connection.c#L240" 4d="L240" claass="line" name="L310"> 310  4href="+co4e=out" class="sref">out<4a>:
<44ct if it's="net/rds/connuinc64hconn" class="sreuinc64hcref">f="net/rds/connbufferonn" class="srebufferref"[ref">rds_conn_crctem_letion.c#L231" id=ctem_letDS_C + 7) / 8]ass="line" name="L248"> 248}
4     retu4n rds_connection * 239
<4a href="n4t/rds/connection.c#L243"4id="L44ref">conn>rds_connection * 239
<4a    } el4/rds/connection.c#L244" 4d="L244c#L224" id="L>rds_connection *conn)
 239
<4uct cancel_delasizehconn" class="sresizehcref">f="net/rds/connconn" class="srec9" cass="line" name="L311"> 311  4         4                        4 stru44" class="line" name="L156"> 156  4a href="n4t/rds/connection.c#L247"4id="L44/a> =  306  4a        4n  306  4a        4t/rds/connection.c#L249"4id="L44" class="sref">spin_unlock_iaetction.c#L239" idletcDS_C/a>));
faddnr4" cs_c0ass="line" name="L239"> 239
<4a        4e=EXPORT_SYMBOL_GPL" cla4s="sr44>rdsdebug());
rds_conn_crctem_letion.c#L231" id=ctem_letDS_Cass="line" name="L239"> 239
<4 href="ne4/rds/connection.c#L251" 4d="L245" class="line" name="L251"> 251st4     retu4f="+code=rds_connection"4class45nn_error" clauot;ref">rds_conn_crconn" class="srec9" cs= 0href="net/rds/connection.c#L234" id="L234" cs_conn_lookup(connf="net/rds/connconn" class="srec9" c <a>f="net/rds/connARRAY_SIZEonn" class="sreARRAY_SIZEs="sref">rds_conn_create_outg07" onn" class="sref">conn 306  4         4                        4 stru45string">"%f="net/rds/connconn" class="srec9" c++href="net/rds/connection.c#L234" id="L234" c++llass="line" name="L310"> 310  4a href="n4t/rds/connection.c#L254"4id="L45" class="sref">rds_conn_reset( 310  4act  285  4a href="n4t/rds/connection.c#L256"4id="L45rds/connection.c#L276" id="L2nnnection.c#L205" id="L2"XXX no "  ud="L.="L304" class="line" name="L304"> 304  4href="+co4e=EXPORT_SYMBOL_GPL" cla4s="sr45.c#L277" id="L277" cllllllllllist_unhashed(&avisit=conn" class="srevisit=cDS_Cref="net/rds/connection.c#L309" id="L309" chref="net/rds/conbufferonn" class="srebufferref")ass="line" name="L259"> 259{
4 href="ne4/rds/connection.c#L258" 4d="L245sref">found =  306  4         4"+code=rds_conn_shutdown4 clas45" class="line" name="L279"> 279  4d        4t/rds/connection.c#L260"4id="L45 class="sref">trans-> 304  4     /* shut4it do46ref="net/rds/connection.c#L211" id="""""""""""""""""*ibut wlet="L2ctll ctems hredown ng 304  4     retu4 304  4         4   rds_co{
))_cef">rds_conn_crctem_letion.c#L231" id=ctem_letDS_C lass="line" name="L310"> 310  4an class=4comment">               4 * Qu46string">"current state is %d\nection *cinfo copyf">rdf="net/rds/conncteronn" class="srecterDS_Caf="+code=rds_conbufferonn" class="srebufferref"aNf="net/rds/connctem_letion.c#L231" id=ctem_letDS_C ass="line" name="L306"> 306  4an class=4comment">               4 * th46unlock" class="sref">mutex_unnnnnnnnn href="net/rds/letion.c#L231" id=letDS_C -_cef">rds_conn_crctem_letion.c#L231" id=ctem_letDS_Cass="line" name="L239"> 239
<4an class=4comment">               4 * du46rds/connection.c#L276" id="L2ass="line" name="L313"> 313
<4an class=4comment">               4 * de46.c#L277" id="L277" clllllllll">spin_unlock_iaetction.c#L239" idletcDS_C/a>));
faddnr4" cclass="line" name="L236"> 236  4an class=4comment">               4 * ha46.c#L298" id="L298" class="line" name="L298"> 298  4an class=4comment">               4 */ 299
<4a        4   rdsdebug( 311  4         4   if (! 312}
4         4    && !(rds_conn_createuot_each_headcuot_each_head 311  4         4            239
<4 n class=4                        4   *connconnrds_connection *conn)
 295  4         4           mutex_unnnnnnnnnnn">rds*ef="net/rds/conbufferonn" class="srebufferref")ss="line" name="L295"> 295  4 n class=4           return;
 310  4 n class=4   }
info ef="+code= 311  4 n class=4    306  4 href="ne4/rds/connection.c#L279" 4d="L247" class="sref">spin_unlock_ieinfoonn" class="srecinfosref/a>));
faddnext_tx_seasrefs_conn_lookup(lags" class="sref">c_flags));
faddrdnext_tx_searef"ass="line" name="L311"> 311  4         4   rdsdebug(faddnext_rx_seasrefs_conn_lookup(lags" class="sref">c_flags));
faddrdnext_rx_searef"ass="line" name="L311"> 311  4         4              !faddr" cl" cls_conn_lookup(lags" class="sref">c_flags));
faddrer" cl" class="line" name="L311"> 311  4         4/rds/connection.c#L282" 4d="L248n->faddf" cl" cls_conn_lookup(lags" class="sref">c_flags));
faddre="L169" cass="line" name="L311"> 311  4         4   connef">cancel_delastrncpyonn" class="srestrncpyDS_Cref="net/rds/conninfoonn" class="srecinfosref/a>));
c_flags));
conn_shutdown( 295  4 n class=4   "currentsizeof"ef="net/rds/conninfoonn" class="srecinfosref/a>));
 296  4         4/rds/connection.c#L285" 4d="L248nc" class="sref">cancel_delaeinfoonn" class="srecinfosref/a>));
 239
<4         4   if (! 156  4 n class=4           c_flags));
 295  4 n class=4comment">               4     48sref">found =  311  4an class=4comment">               4     48" class="sref"nnection.c#L205" id="L2"XXX Future: returnnectid="Le raectredownnectse funky b 304  4an class=4comment">               4     48>rdsdebug( 304  4an class=4comment">               4     49st_bit" class="sref">test_bitc_flags));
 304  4a        4           rds_co(CONNECTINGtion.c#L239" idCONNECTING9" class="line" name="L311"> 311  4a        4                   connef">cancel_delaariconn 304  4an class=4                   "currenttest_bitc_flags));
 304  4a        4                   __fu(CONNECTEDtion.c#L239" idCONNECTED9" class="line" name="L311"> 311  4a        4                    311  4an class=4           return;
 312}
4an class=4   }
 306  4an class=4href="net/rds/connection4c#L2949" clad="Lic ">rds_conn_shutdown(strucinfoonn" class="sref">connrds_connection * 295  4 href="ne4/rds/connection.c#L300" 4d="L349 class="sref">trans->rds_connection *cinfo cterat=c 295  5     /* Then5recon50st_bit" class="sref">test_bitrds_connection * 259{
5an class=5comment">         * The 5assiv50nn_erass="line" name="L310"> 310  5an class=5comment">         * to t5e con50ref">connef">cancel_delaaricuot_each_headcuot_each_head 310  5a3 class=5c                  "current state is %d\nection *connconn 310  5a4 class=5c                  mutex_unnnnnnnnnsizeof">rds_connection *info ef="+code= 296  5      312}
5     if (5 227  5         5    *connconnrdass="line" name="L259"> 259{
5a8       5 ref="net/rds/connection5ue_re5onnectass="line" name="L310"> 310  5a9       5 rds/connection.c#L300" 5ectio50>rdsdebug(conn);
(class="srefc311Letion.c#L239" idclass="srefc311Lesref"fnnection.c#L>rding">"ef">conn)
"04" cla"ss="line" name="L310"> 310  5         5   rcu_rnn%d">mutex_unnnnnnnnnsizeof">rds_connection *conn)
 295  5     }
 311  5a href="n5t/rds/connection.c#L313"5id="L51nn_error" clalist_unhashed(&aariconnconn);
 259{
5an class=5/rds/connection.c#L314" 5d="L351string">"currentreturnn-href="net/rds/c/NOMEMe=rds_conn_creatNOMEM9" cass="line" name="L311"> 311  5an class=5comment">/*
 285  5an class=5comment"> * Stop and fre5 a co51sref">rcu_read_lock();
info register_fu;info register_fu;conn 311  5a    if (5comment"> *
info register_fu;info register_fu; 310  5an class=5comment"> * This can onl5 be u51sref">found = (struc" id="L_info="sresreflass="line" name="L311"> 311  5a8       5comment"> * the conn has5been 51" class="sref">spin_unlock_ief">info register_fu;info register_fu; 310  5a9       5           trans-><_co(struc" id="L_info=rd=conn_shutdown" clas/a>(struc" id="L_info=rd=connsreflass="line" name="L311"> 311  5         5            251st5         5            239
<5         5   }
 313
<5     } el5e {
 244st5         5   rds_conn_shutdown(strucexit_shutdown" clas/a>(strucexitsref"">rdass="line" name="L259"> 259{
5 n class=5   struct  310  5 href="ne5/rds/connection.c#L227" 5d="L252/a> = loopcexit_shutdown" clas/a>(loopcexitsref"lass="line" name="L311"> 311  5 n class=5    306  5         5   if (spin_unlock_iWARN_O/rds/connection.WARN_O/sref"_unhashed(&ahass="emptyonn" class="srehass="emptya>-&g_conn_shutdown(struc07" onn" class="sref">conn 311  5 9       5            240-&g_conn_shutdown(strucse=conn" class="sref">conn);
 311  5         5            311  5         5   } else {
connef">cancel_delaaricinfo=deregister_fu;info deregister_fu;conn 311  5     } el5           INIT_DELAYED_WORK<)a>(info=deregister_fu;info deregister_fu; 310  5         5           mutex_unnnnnnnnnn="+code=rds_con/a>(struc" id="L_info="sretion.c#L239" id/a>(struc" id="L_info="sresreflass="line" name="L311"> 311  5         5           rcu_read_lock();
info deregister_fu;info deregister_fu; 310  5         5   }
(struc" id="L_info=rd=connsreflass="line" name="L311"> 311  5         5href="net/rds/connection5c#L2353d in ass="line" name="L312"> 312}
5         5ef="+code=spin_unlock_ir5resto53" class="line" name="L279"> 279  5     } el5/rds/connection.c#L240" 5d="L250" cla"nnection.c#L205" id="L204" class="line" name="L304"> 304  5href="+co5e=out" class="sref">out<5a>:
<54ref="net/rds/connection.c#L2* Force a dis04"> 3004" class="line" name="L304"> 304  5h        5n  304  5a href="n5t/rds/connection.c#L243"5id="L54ref">">rds_conn_shutdown(strucdrop_shutdown" clas/a>(strucdropsref">rds_connection *conn)
 259{
5a    } el5/rds/connection.c#L244" 5d="L254c#L22ass="line" name="L310"> 310  5uct cancel_delaatomicLs=conn" class="sreatomicLs=cDS_Crt;c_flags));
 311  5         5                        5 stru54sref">rcu_read_lock();
c_worflags" class="sref">c_worfa>-&g_conn_shutdown(waass="sref">fadd/a>(waDS_Caft;c_flags));
 311  5         5t/rds/connection.c#L247"5id="L54rds/cass="line" name="L312"> 312}
5a        5n (rds_conn_createstrucdrop_shutdown" clas/a>(strucdropsreflass="line" name="L311"> 311  5         5t/rds/connection.c#L249"5id="L54" class="line" name="L279"> 279  5a        5e=EXPORT_SYMBOL_GPL" cla5s="sr54" cla"nnection.c#L205" id="L204" class="line" name="L304"> 304  5 href="ne5/rds/connection.c#L251" 5d="L255ref="net/rds/connection.c#L2* If ng 304 30."plemay have ssreduled a04" class="line" name="L304"> 304  5         5f="+code=rds_connection"5class55side of an IB loopback conneL delayed re04"> 30 however -connecis case wleshould notconterfere.04" class="line" name="L304"> 304  5  href="n5                        5 stru55strinof an IB loopback conneL304" class="line" name="L304"> 304  5a href="n5t/rds/connection.c#L254"5id="L55" cla">rds_conn_shutdown(struc04"> 30_ifddown_shutdown" clas/a>(struc04"> 30_ifddownsref">rds_connection *conn)
 259{
5act  310  5a href="n5t/rds/connection.c#L256"5id="L55rds/connectio{
connconnrds_conn_crection.c#L259" id="L259" clal=_conn_lookup(RDS_CONN_DOW/rds/connection.RDS_CONN_DOW/ds/cot; 310  5a        5e=EXPORT_SYMBOL_GPL" cla5s="sr55.c#L277" id="L277_unhashed(&atest_andLs=c_bc_flags));
 259{
5a        5/rds/connection.c#L258" 5d="L255sref">found = ();
c_delayed_worflags" class="sref">c_delayed_worfa>-&g_conn_shutdown(waass="sref">fadd/a>(waDS_Caft;c_flags));
 248}
5         5"+code=rds_conn_shutdown5 clas55" claass="line" name="L312"> 312}
5d        5t/rds/connection.c#L260"5id="L55 clashref="net/rds/c/a>(rds_conn_createstruc04"> 30_ifddown_shutdown" clas/a>(struc04"> 30_ifddownsreflass="line" name="L248"> 248}
5     /* shut5it do56" class="line" name="L251"> 251st5     retu5 304  5         5    304 304  5  href="n5comment">               5 * Qu56strinof an IB loopback conneL304" class="line" name="L304"> 304  5an class=5comment">               5 * th56nc" c">rdss="line" name="L304"> 304  5a href="n5comment">               5 * du56rds/cef">rds_conn_cr__/a>(strucerror_shutdown" clas__/a>(strucerrorsref">rds_connection *conn)
 259{
5an class=5comment">               5 * de56.c#L2ass="line" name="L310"> 310  5an class=5comment">               5 * ha56.c#L298" id="f="net/rds/connva_ass=ion.c#L234" id=va_ass=c#L29ef">cancel_delaap_shutdown" clasap9" cass="line" name="L311"> 311  5an class=5comment">               5 */ 279  5a        5   rdsdebug(rds_conn_crap_shutdown" clasap9" ca href="net/rds/com/s/connection.c#fm/" cllass="line" name="L248"> 248}
5         5   if (!rds_conn_crfm/s/connection.c#fm/" cl,/ef">rds_conn_crap_shutdown" clasap9" class="line" name="L248"> 248}
5     retu5    && !->rds_conn_crap_shutdown" clasap9" class="line" name="L248"> 248}
5         5            239
<5 n class=5                        5  INIT_DELAYED_WORK<)a>(strucdrop_shutdown" clas/a>(strucdropsref"ef">rds_conn_crection.c#L259" id="L259" claass="line" name="L248"> 248}
5 n class=5            312}
5 n class=5           return;
LXR backunitya>-&,necis experik coal vers4lxr@retux.noa>-&.
lxr.retux.no kindly hosted by s="line" http://www.redpill-retpro.no">Redpill Letpro ASDS_Cafprovider of Letux/s4"sulting and operat4