connection.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604
  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. #include "rds.h"
  39. #include "loop.h"
  40. #define RDS_CONNECTION_HASH_BITS 12
  41. #define RDS_CONNECTION_HASH_ENTRIES (1 << RDS_CONNECTION_HASH_BITS)
  42. #define RDS_CONNECTION_HASH_MASK (RDS_CONNECTION_HASH_ENTRIES - 1)
  43. /* converting this to RCU is a chore for another day.. */
  44. static DEFINE_SPINLOCK(rds_conn_lock);
  45. static unsigned long rds_conn_count;
  46. static struct hlist_head rds_conn_hash[RDS_CONNECTION_HASH_ENTRIES];
  47. static struct kmem_cache *rds_conn_slab;
  48. static struct hlist_head *rds_conn_bucket(__be32 laddr, __be32 faddr)
  49. {
  50. static u32 rds_hash_secret __read_mostly;
  51. unsigned long hash;
  52. net_get_random_once(&rds_hash_secret, sizeof(rds_hash_secret));
  53. /* Pass NULL, don't need struct net for hash */
  54. hash = __inet_ehashfn(be32_to_cpu(laddr), 0,
  55. be32_to_cpu(faddr), 0,
  56. rds_hash_secret);
  57. return &rds_conn_hash[hash & RDS_CONNECTION_HASH_MASK];
  58. }
  59. #define rds_conn_info_set(var, test, suffix) do { \
  60. if (test) \
  61. var |= RDS_INFO_CONNECTION_FLAG_##suffix; \
  62. } while (0)
  63. /* rcu read lock must be held or the connection spinlock */
  64. static struct rds_connection *rds_conn_lookup(struct net *net,
  65. struct hlist_head *head,
  66. __be32 laddr, __be32 faddr,
  67. struct rds_transport *trans)
  68. {
  69. struct rds_connection *conn, *ret = NULL;
  70. hlist_for_each_entry_rcu(conn, head, c_hash_node) {
  71. if (conn->c_faddr == faddr && conn->c_laddr == laddr &&
  72. conn->c_trans == trans && net == rds_conn_net(conn)) {
  73. ret = conn;
  74. break;
  75. }
  76. }
  77. rdsdebug("returning conn %p for %pI4 -> %pI4\n", ret,
  78. &laddr, &faddr);
  79. return ret;
  80. }
  81. /*
  82. * This is called by transports as they're bringing down a connection.
  83. * It clears partial message state so that the transport can start sending
  84. * and receiving over this connection again in the future. It is up to
  85. * the transport to have serialized this call with its send and recv.
  86. */
  87. static void rds_conn_reset(struct rds_connection *conn)
  88. {
  89. rdsdebug("connection %pI4 to %pI4 reset\n",
  90. &conn->c_laddr, &conn->c_faddr);
  91. rds_stats_inc(s_conn_reset);
  92. rds_send_reset(conn);
  93. conn->c_flags = 0;
  94. /* Do not clear next_rx_seq here, else we cannot distinguish
  95. * retransmitted packets from new packets, and will hand all
  96. * of them to the application. That is not consistent with the
  97. * reliability guarantees of RDS. */
  98. }
  99. /*
  100. * There is only every one 'conn' for a given pair of addresses in the
  101. * system at a time. They contain messages to be retransmitted and so
  102. * span the lifetime of the actual underlying transport connections.
  103. *
  104. * For now they are not garbage collected once they're created. They
  105. * are torn down as the module is removed, if ever.
  106. */
  107. static struct rds_connection *__rds_conn_create(struct net *net,
  108. __be32 laddr, __be32 faddr,
  109. struct rds_transport *trans, gfp_t gfp,
  110. int is_outgoing)
  111. {
  112. struct rds_connection *conn, *parent = NULL;
  113. struct hlist_head *head = rds_conn_bucket(laddr, faddr);
  114. struct rds_transport *loop_trans;
  115. unsigned long flags;
  116. int ret;
  117. struct rds_transport *otrans = trans;
  118. if (!is_outgoing && otrans->t_type == RDS_TRANS_TCP)
  119. goto new_conn;
  120. rcu_read_lock();
  121. conn = rds_conn_lookup(net, head, laddr, faddr, trans);
  122. if (conn && conn->c_loopback && conn->c_trans != &rds_loop_transport &&
  123. laddr == faddr && !is_outgoing) {
  124. /* This is a looped back IB connection, and we're
  125. * called by the code handling the incoming connect.
  126. * We need a second connection object into which we
  127. * can stick the other QP. */
  128. parent = conn;
  129. conn = parent->c_passive;
  130. }
  131. rcu_read_unlock();
  132. if (conn)
  133. goto out;
  134. new_conn:
  135. conn = kmem_cache_zalloc(rds_conn_slab, gfp);
  136. if (!conn) {
  137. conn = ERR_PTR(-ENOMEM);
  138. goto out;
  139. }
  140. INIT_HLIST_NODE(&conn->c_hash_node);
  141. conn->c_laddr = laddr;
  142. conn->c_faddr = faddr;
  143. spin_lock_init(&conn->c_lock);
  144. conn->c_next_tx_seq = 1;
  145. rds_conn_net_set(conn, net);
  146. init_waitqueue_head(&conn->c_waitq);
  147. INIT_LIST_HEAD(&conn->c_send_queue);
  148. INIT_LIST_HEAD(&conn->c_retrans);
  149. ret = rds_cong_get_maps(conn);
  150. if (ret) {
  151. kmem_cache_free(rds_conn_slab, conn);
  152. conn = ERR_PTR(ret);
  153. goto out;
  154. }
  155. /*
  156. * This is where a connection becomes loopback. If *any* RDS sockets
  157. * can bind to the destination address then we'd rather the messages
  158. * flow through loopback rather than either transport.
  159. */
  160. loop_trans = rds_trans_get_preferred(net, faddr);
  161. if (loop_trans) {
  162. rds_trans_put(loop_trans);
  163. conn->c_loopback = 1;
  164. if (is_outgoing && trans->t_prefer_loopback) {
  165. /* "outgoing" connection - and the transport
  166. * says it wants the connection handled by the
  167. * loopback transport. This is what TCP does.
  168. */
  169. trans = &rds_loop_transport;
  170. }
  171. }
  172. if (trans == NULL) {
  173. kmem_cache_free(rds_conn_slab, conn);
  174. conn = ERR_PTR(-ENODEV);
  175. goto out;
  176. }
  177. conn->c_trans = trans;
  178. ret = trans->conn_alloc(conn, gfp);
  179. if (ret) {
  180. kmem_cache_free(rds_conn_slab, conn);
  181. conn = ERR_PTR(ret);
  182. goto out;
  183. }
  184. atomic_set(&conn->c_state, RDS_CONN_DOWN);
  185. conn->c_send_gen = 0;
  186. conn->c_reconnect_jiffies = 0;
  187. INIT_DELAYED_WORK(&conn->c_send_w, rds_send_worker);
  188. INIT_DELAYED_WORK(&conn->c_recv_w, rds_recv_worker);
  189. INIT_DELAYED_WORK(&conn->c_conn_w, rds_connect_worker);
  190. INIT_WORK(&conn->c_down_w, rds_shutdown_worker);
  191. mutex_init(&conn->c_cm_lock);
  192. conn->c_flags = 0;
  193. rdsdebug("allocated conn %p for %pI4 -> %pI4 over %s %s\n",
  194. conn, &laddr, &faddr,
  195. trans->t_name ? trans->t_name : "[unknown]",
  196. is_outgoing ? "(outgoing)" : "");
  197. /*
  198. * Since we ran without holding the conn lock, someone could
  199. * have created the same conn (either normal or passive) in the
  200. * interim. We check while holding the lock. If we won, we complete
  201. * init and return our conn. If we lost, we rollback and return the
  202. * other one.
  203. */
  204. spin_lock_irqsave(&rds_conn_lock, flags);
  205. if (parent) {
  206. /* Creating passive conn */
  207. if (parent->c_passive) {
  208. trans->conn_free(conn->c_transport_data);
  209. kmem_cache_free(rds_conn_slab, conn);
  210. conn = parent->c_passive;
  211. } else {
  212. parent->c_passive = conn;
  213. rds_cong_add_conn(conn);
  214. rds_conn_count++;
  215. }
  216. } else {
  217. /* Creating normal conn */
  218. struct rds_connection *found;
  219. if (!is_outgoing && otrans->t_type == RDS_TRANS_TCP)
  220. found = NULL;
  221. else
  222. found = rds_conn_lookup(net, head, laddr, faddr, trans);
  223. if (found) {
  224. trans->conn_free(conn->c_transport_data);
  225. kmem_cache_free(rds_conn_slab, conn);
  226. conn = found;
  227. } else {
  228. if ((is_outgoing && otrans->t_type == RDS_TRANS_TCP) ||
  229. (otrans->t_type != RDS_TRANS_TCP)) {
  230. /* Only the active side should be added to
  231. * reconnect list for TCP.
  232. */
  233. hlist_add_head_rcu(&conn->c_hash_node, head);
  234. }
  235. rds_cong_add_conn(conn);
  236. rds_conn_count++;
  237. }
  238. }
  239. spin_unlock_irqrestore(&rds_conn_lock, flags);
  240. out:
  241. return conn;
  242. }
  243. struct rds_connection *rds_conn_create(struct net *net,
  244. __be32 laddr, __be32 faddr,
  245. struct rds_transport *trans, gfp_t gfp)
  246. {
  247. return __rds_conn_create(net, laddr, faddr, trans, gfp, 0);
  248. }
  249. EXPORT_SYMBOL_GPL(rds_conn_create);
  250. struct rds_connection *rds_conn_create_outgoing(struct net *net,
  251. __be32 laddr, __be32 faddr,
  252. struct rds_transport *trans, gfp_t gfp)
  253. {
  254. return __rds_conn_create(net, laddr, faddr, trans, gfp, 1);
  255. }
  256. EXPORT_SYMBOL_GPL(rds_conn_create_outgoing);
  257. void rds_conn_shutdown(struct rds_connection *conn)
  258. {
  259. /* shut it down unless it's down already */
  260. if (!rds_conn_transition(conn, RDS_CONN_DOWN, RDS_CONN_DOWN)) {
  261. /*
  262. * Quiesce the connection mgmt handlers before we start tearing
  263. * things down. We don't hold the mutex for the entire
  264. * duration of the shutdown operation, else we may be
  265. * deadlocking with the CM handler. Instead, the CM event
  266. * handler is supposed to check for state DISCONNECTING
  267. */
  268. mutex_lock(&conn->c_cm_lock);
  269. if (!rds_conn_transition(conn, RDS_CONN_UP, RDS_CONN_DISCONNECTING)
  270. && !rds_conn_transition(conn, RDS_CONN_ERROR, RDS_CONN_DISCONNECTING)) {
  271. rds_conn_error(conn, "shutdown called in state %d\n",
  272. atomic_read(&conn->c_state));
  273. mutex_unlock(&conn->c_cm_lock);
  274. return;
  275. }
  276. mutex_unlock(&conn->c_cm_lock);
  277. wait_event(conn->c_waitq,
  278. !test_bit(RDS_IN_XMIT, &conn->c_flags));
  279. wait_event(conn->c_waitq,
  280. !test_bit(RDS_RECV_REFILL, &conn->c_flags));
  281. conn->c_trans->conn_shutdown(conn);
  282. rds_conn_reset(conn);
  283. if (!rds_conn_transition(conn, RDS_CONN_DISCONNECTING, RDS_CONN_DOWN)) {
  284. /* This can happen - eg when we're in the middle of tearing
  285. * down the connection, and someone unloads the rds module.
  286. * Quite reproduceable with loopback connections.
  287. * Mostly harmless.
  288. */
  289. rds_conn_error(conn,
  290. "%s: failed to transition to state DOWN, "
  291. "current state is %d\n",
  292. __func__,
  293. atomic_read(&conn->c_state));
  294. return;
  295. }
  296. }
  297. /* Then reconnect if it's still live.
  298. * The passive side of an IB loopback connection is never added
  299. * to the conn hash, so we never trigger a reconnect on this
  300. * conn - the reconnect is always triggered by the active peer. */
  301. cancel_delayed_work_sync(&conn->c_conn_w);
  302. rcu_read_lock();
  303. if (!hlist_unhashed(&conn->c_hash_node)) {
  304. rcu_read_unlock();
  305. rds_queue_reconnect(conn);
  306. } else {
  307. rcu_read_unlock();
  308. }
  309. }
  310. /*
  311. * Stop and free a connection.
  312. *
  313. * This can only be used in very limited circumstances. It assumes that once
  314. * the conn has been shutdown that no one else is referencing the connection.
  315. * We can only ensure this in the rmmod path in the current code.
  316. */
  317. void rds_conn_destroy(struct rds_connection *conn)
  318. {
  319. struct rds_message *rm, *rtmp;
  320. unsigned long flags;
  321. rdsdebug("freeing conn %p for %pI4 -> "
  322. "%pI4\n", conn, &conn->c_laddr,
  323. &conn->c_faddr);
  324. /* Ensure conn will not be scheduled for reconnect */
  325. spin_lock_irq(&rds_conn_lock);
  326. hlist_del_init_rcu(&conn->c_hash_node);
  327. spin_unlock_irq(&rds_conn_lock);
  328. synchronize_rcu();
  329. /* shut the connection down */
  330. rds_conn_drop(conn);
  331. flush_work(&conn->c_down_w);
  332. /* make sure lingering queued work won't try to ref the conn */
  333. cancel_delayed_work_sync(&conn->c_send_w);
  334. cancel_delayed_work_sync(&conn->c_recv_w);
  335. /* tear down queued messages */
  336. list_for_each_entry_safe(rm, rtmp,
  337. &conn->c_send_queue,
  338. m_conn_item) {
  339. list_del_init(&rm->m_conn_item);
  340. BUG_ON(!list_empty(&rm->m_sock_item));
  341. rds_message_put(rm);
  342. }
  343. if (conn->c_xmit_rm)
  344. rds_message_put(conn->c_xmit_rm);
  345. conn->c_trans->conn_free(conn->c_transport_data);
  346. /*
  347. * The congestion maps aren't freed up here. They're
  348. * freed by rds_cong_exit() after all the connections
  349. * have been freed.
  350. */
  351. rds_cong_remove_conn(conn);
  352. BUG_ON(!list_empty(&conn->c_retrans));
  353. kmem_cache_free(rds_conn_slab, conn);
  354. spin_lock_irqsave(&rds_conn_lock, flags);
  355. rds_conn_count--;
  356. spin_unlock_irqrestore(&rds_conn_lock, flags);
  357. }
  358. EXPORT_SYMBOL_GPL(rds_conn_destroy);
  359. static void rds_conn_message_info(struct socket *sock, unsigned int len,
  360. struct rds_info_iterator *iter,
  361. struct rds_info_lengths *lens,
  362. int want_send)
  363. {
  364. struct hlist_head *head;
  365. struct list_head *list;
  366. struct rds_connection *conn;
  367. struct rds_message *rm;
  368. unsigned int total = 0;
  369. unsigned long flags;
  370. size_t i;
  371. len /= sizeof(struct rds_info_message);
  372. rcu_read_lock();
  373. for (i = 0, head = rds_conn_hash; i < ARRAY_SIZE(rds_conn_hash);
  374. i++, head++) {
  375. hlist_for_each_entry_rcu(conn, head, c_hash_node) {
  376. if (want_send)
  377. list = &conn->c_send_queue;
  378. else
  379. list = &conn->c_retrans;
  380. spin_lock_irqsave(&conn->c_lock, flags);
  381. /* XXX too lazy to maintain counts.. */
  382. list_for_each_entry(rm, list, m_conn_item) {
  383. total++;
  384. if (total <= len)
  385. rds_inc_info_copy(&rm->m_inc, iter,
  386. conn->c_laddr,
  387. conn->c_faddr, 0);
  388. }
  389. spin_unlock_irqrestore(&conn->c_lock, flags);
  390. }
  391. }
  392. rcu_read_unlock();
  393. lens->nr = total;
  394. lens->each = sizeof(struct rds_info_message);
  395. }
  396. static void rds_conn_message_info_send(struct socket *sock, unsigned int len,
  397. struct rds_info_iterator *iter,
  398. struct rds_info_lengths *lens)
  399. {
  400. rds_conn_message_info(sock, len, iter, lens, 1);
  401. }
  402. static void rds_conn_message_info_retrans(struct socket *sock,
  403. unsigned int len,
  404. struct rds_info_iterator *iter,
  405. struct rds_info_lengths *lens)
  406. {
  407. rds_conn_message_info(sock, len, iter, lens, 0);
  408. }
  409. void rds_for_each_conn_info(struct socket *sock, unsigned int len,
  410. struct rds_info_iterator *iter,
  411. struct rds_info_lengths *lens,
  412. int (*visitor)(struct rds_connection *, void *),
  413. size_t item_len)
  414. {
  415. uint64_t buffer[(item_len + 7) / 8];
  416. struct hlist_head *head;
  417. struct rds_connection *conn;
  418. size_t i;
  419. rcu_read_lock();
  420. lens->nr = 0;
  421. lens->each = item_len;
  422. for (i = 0, head = rds_conn_hash; i < ARRAY_SIZE(rds_conn_hash);
  423. i++, head++) {
  424. hlist_for_each_entry_rcu(conn, head, c_hash_node) {
  425. /* XXX no c_lock usage.. */
  426. if (!visitor(conn, buffer))
  427. continue;
  428. /* We copy as much as we can fit in the buffer,
  429. * but we count all items so that the caller
  430. * can resize the buffer. */
  431. if (len >= item_len) {
  432. rds_info_copy(iter, buffer, item_len);
  433. len -= item_len;
  434. }
  435. lens->nr++;
  436. }
  437. }
  438. rcu_read_unlock();
  439. }
  440. EXPORT_SYMBOL_GPL(rds_for_each_conn_info);
  441. static int rds_conn_info_visitor(struct rds_connection *conn,
  442. void *buffer)
  443. {
  444. struct rds_info_connection *cinfo = buffer;
  445. cinfo->next_tx_seq = conn->c_next_tx_seq;
  446. cinfo->next_rx_seq = conn->c_next_rx_seq;
  447. cinfo->laddr = conn->c_laddr;
  448. cinfo->faddr = conn->c_faddr;
  449. strncpy(cinfo->transport, conn->c_trans->t_name,
  450. sizeof(cinfo->transport));
  451. cinfo->flags = 0;
  452. rds_conn_info_set(cinfo->flags, test_bit(RDS_IN_XMIT, &conn->c_flags),
  453. SENDING);
  454. /* XXX Future: return the state rather than these funky bits */
  455. rds_conn_info_set(cinfo->flags,
  456. atomic_read(&conn->c_state) == RDS_CONN_CONNECTING,
  457. CONNECTING);
  458. rds_conn_info_set(cinfo->flags,
  459. atomic_read(&conn->c_state) == RDS_CONN_UP,
  460. CONNECTED);
  461. return 1;
  462. }
  463. static void rds_conn_info(struct socket *sock, unsigned int len,
  464. struct rds_info_iterator *iter,
  465. struct rds_info_lengths *lens)
  466. {
  467. rds_for_each_conn_info(sock, len, iter, lens,
  468. rds_conn_info_visitor,
  469. sizeof(struct rds_info_connection));
  470. }
  471. int rds_conn_init(void)
  472. {
  473. rds_conn_slab = kmem_cache_create("rds_connection",
  474. sizeof(struct rds_connection),
  475. 0, 0, NULL);
  476. if (!rds_conn_slab)
  477. return -ENOMEM;
  478. rds_info_register_func(RDS_INFO_CONNECTIONS, rds_conn_info);
  479. rds_info_register_func(RDS_INFO_SEND_MESSAGES,
  480. rds_conn_message_info_send);
  481. rds_info_register_func(RDS_INFO_RETRANS_MESSAGES,
  482. rds_conn_message_info_retrans);
  483. return 0;
  484. }
  485. void rds_conn_exit(void)
  486. {
  487. rds_loop_exit();
  488. WARN_ON(!hlist_empty(rds_conn_hash));
  489. kmem_cache_destroy(rds_conn_slab);
  490. rds_info_deregister_func(RDS_INFO_CONNECTIONS, rds_conn_info);
  491. rds_info_deregister_func(RDS_INFO_SEND_MESSAGES,
  492. rds_conn_message_info_send);
  493. rds_info_deregister_func(RDS_INFO_RETRANS_MESSAGES,
  494. rds_conn_message_info_retrans);
  495. }
  496. /*
  497. * Force a disconnect
  498. */
  499. void rds_conn_drop(struct rds_connection *conn)
  500. {
  501. atomic_set(&conn->c_state, RDS_CONN_ERROR);
  502. queue_work(rds_wq, &conn->c_down_w);
  503. }
  504. EXPORT_SYMBOL_GPL(rds_conn_drop);
  505. /*
  506. * If the connection is down, trigger a connect. We may have scheduled a
  507. * delayed reconnect however - in this case we should not interfere.
  508. */
  509. void rds_conn_connect_if_down(struct rds_connection *conn)
  510. {
  511. if (rds_conn_state(conn) == RDS_CONN_DOWN &&
  512. !test_and_set_bit(RDS_RECONNECT_PENDING, &conn->c_flags))
  513. queue_delayed_work(rds_wq, &conn->c_conn_w, 0);
  514. }
  515. EXPORT_SYMBOL_GPL(rds_conn_connect_if_down);
  516. /*
  517. * An error occurred on the connection
  518. */
  519. void
  520. __rds_conn_error(struct rds_connection *conn, const char *fmt, ...)
  521. {
  522. va_list ap;
  523. va_start(ap, fmt);
  524. vprintk(fmt, ap);
  525. va_end(ap);
  526. rds_conn_drop(conn);
  527. }