af_rds.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  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/module.h>
  34. #include <linux/errno.h>
  35. #include <linux/kernel.h>
  36. #include <linux/gfp.h>
  37. #include <linux/in.h>
  38. #include <linux/poll.h>
  39. #include <net/sock.h>
  40. #include "rds.h"
  41. /* this is just used for stats gathering :/ */
  42. static DEFINE_SPINLOCK(rds_sock_lock);
  43. static unsigned long rds_sock_count;
  44. static LIST_HEAD(rds_sock_list);
  45. DECLARE_WAIT_QUEUE_HEAD(rds_poll_waitq);
  46. /*
  47. * This is called as the final descriptor referencing this socket is closed.
  48. * We have to unbind the socket so that another socket can be bound to the
  49. * address it was using.
  50. *
  51. * We have to be careful about racing with the incoming path. sock_orphan()
  52. * sets SOCK_DEAD and we use that as an indicator to the rx path that new
  53. * messages shouldn't be queued.
  54. */
  55. static int rds_release(struct socket *sock)
  56. {
  57. struct sock *sk = sock->sk;
  58. struct rds_sock *rs;
  59. if (!sk)
  60. goto out;
  61. rs = rds_sk_to_rs(sk);
  62. sock_orphan(sk);
  63. /* Note - rds_clear_recv_queue grabs rs_recv_lock, so
  64. * that ensures the recv path has completed messing
  65. * with the socket. */
  66. rds_clear_recv_queue(rs);
  67. rds_cong_remove_socket(rs);
  68. rds_remove_bound(rs);
  69. rds_send_drop_to(rs, NULL);
  70. rds_rdma_drop_keys(rs);
  71. rds_notify_queue_get(rs, NULL);
  72. spin_lock_bh(&rds_sock_lock);
  73. list_del_init(&rs->rs_item);
  74. rds_sock_count--;
  75. spin_unlock_bh(&rds_sock_lock);
  76. rds_trans_put(rs->rs_transport);
  77. sock->sk = NULL;
  78. sock_put(sk);
  79. out:
  80. return 0;
  81. }
  82. /*
  83. * Careful not to race with rds_release -> sock_orphan which clears sk_sleep.
  84. * _bh() isn't OK here, we're called from interrupt handlers. It's probably OK
  85. * to wake the waitqueue after sk_sleep is clear as we hold a sock ref, but
  86. * this seems more conservative.
  87. * NB - normally, one would use sk_callback_lock for this, but we can
  88. * get here from interrupts, whereas the network code grabs sk_callback_lock
  89. * with _lock_bh only - so relying on sk_callback_lock introduces livelocks.
  90. */
  91. void rds_wake_sk_sleep(struct rds_sock *rs)
  92. {
  93. unsigned long flags;
  94. read_lock_irqsave(&rs->rs_recv_lock, flags);
  95. __rds_wake_sk_sleep(rds_rs_to_sk(rs));
  96. read_unlock_irqrestore(&rs->rs_recv_lock, flags);
  97. }
  98. static int rds_getname(struct socket *sock, struct sockaddr *uaddr,
  99. int *uaddr_len, int peer)
  100. {
  101. struct sockaddr_in *sin = (struct sockaddr_in *)uaddr;
  102. struct rds_sock *rs = rds_sk_to_rs(sock->sk);
  103. memset(sin->sin_zero, 0, sizeof(sin->sin_zero));
  104. /* racey, don't care */
  105. if (peer) {
  106. if (!rs->rs_conn_addr)
  107. return -ENOTCONN;
  108. sin->sin_port = rs->rs_conn_port;
  109. sin->sin_addr.s_addr = rs->rs_conn_addr;
  110. } else {
  111. sin->sin_port = rs->rs_bound_port;
  112. sin->sin_addr.s_addr = rs->rs_bound_addr;
  113. }
  114. sin->sin_family = AF_INET;
  115. *uaddr_len = sizeof(*sin);
  116. return 0;
  117. }
  118. /*
  119. * RDS' poll is without a doubt the least intuitive part of the interface,
  120. * as POLLIN and POLLOUT do not behave entirely as you would expect from
  121. * a network protocol.
  122. *
  123. * POLLIN is asserted if
  124. * - there is data on the receive queue.
  125. * - to signal that a previously congested destination may have become
  126. * uncongested
  127. * - A notification has been queued to the socket (this can be a congestion
  128. * update, or a RDMA completion).
  129. *
  130. * POLLOUT is asserted if there is room on the send queue. This does not mean
  131. * however, that the next sendmsg() call will succeed. If the application tries
  132. * to send to a congested destination, the system call may still fail (and
  133. * return ENOBUFS).
  134. */
  135. static unsigned int rds_poll(struct file *file, struct socket *sock,
  136. poll_table *wait)
  137. {
  138. struct sock *sk = sock->sk;
  139. struct rds_sock *rs = rds_sk_to_rs(sk);
  140. unsigned int mask = 0;
  141. unsigned long flags;
  142. poll_wait(file, sk_sleep(sk), wait);
  143. if (rs->rs_seen_congestion)
  144. poll_wait(file, &rds_poll_waitq, wait);
  145. read_lock_irqsave(&rs->rs_recv_lock, flags);
  146. if (!rs->rs_cong_monitor) {
  147. /* When a congestion map was updated, we signal POLLIN for
  148. * "historical" reasons. Applications can also poll for
  149. * WRBAND instead. */
  150. if (rds_cong_updated_since(&rs->rs_cong_track))
  151. mask |= (POLLIN | POLLRDNORM | POLLWRBAND);
  152. } else {
  153. spin_lock(&rs->rs_lock);
  154. if (rs->rs_cong_notify)
  155. mask |= (POLLIN | POLLRDNORM);
  156. spin_unlock(&rs->rs_lock);
  157. }
  158. if (!list_empty(&rs->rs_recv_queue) ||
  159. !list_empty(&rs->rs_notify_queue))
  160. mask |= (POLLIN | POLLRDNORM);
  161. if (rs->rs_snd_bytes < rds_sk_sndbuf(rs))
  162. mask |= (POLLOUT | POLLWRNORM);
  163. read_unlock_irqrestore(&rs->rs_recv_lock, flags);
  164. /* clear state any time we wake a seen-congested socket */
  165. if (mask)
  166. rs->rs_seen_congestion = 0;
  167. return mask;
  168. }
  169. static int rds_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
  170. {
  171. return -ENOIOCTLCMD;
  172. }
  173. static int rds_cancel_sent_to(struct rds_sock *rs, char __user *optval,
  174. int len)
  175. {
  176. struct sockaddr_in sin;
  177. int ret = 0;
  178. /* racing with another thread binding seems ok here */
  179. if (rs->rs_bound_addr == 0) {
  180. ret = -ENOTCONN; /* XXX not a great errno */
  181. goto out;
  182. }
  183. if (len < sizeof(struct sockaddr_in)) {
  184. ret = -EINVAL;
  185. goto out;
  186. }
  187. if (copy_from_user(&sin, optval, sizeof(sin))) {
  188. ret = -EFAULT;
  189. goto out;
  190. }
  191. rds_send_drop_to(rs, &sin);
  192. out:
  193. return ret;
  194. }
  195. static int rds_set_bool_option(unsigned char *optvar, char __user *optval,
  196. int optlen)
  197. {
  198. int value;
  199. if (optlen < sizeof(int))
  200. return -EINVAL;
  201. if (get_user(value, (int __user *) optval))
  202. return -EFAULT;
  203. *optvar = !!value;
  204. return 0;
  205. }
  206. static int rds_cong_monitor(struct rds_sock *rs, char __user *optval,
  207. int optlen)
  208. {
  209. int ret;
  210. ret = rds_set_bool_option(&rs->rs_cong_monitor, optval, optlen);
  211. if (ret == 0) {
  212. if (rs->rs_cong_monitor) {
  213. rds_cong_add_socket(rs);
  214. } else {
  215. rds_cong_remove_socket(rs);
  216. rs->rs_cong_mask = 0;
  217. rs->rs_cong_notify = 0;
  218. }
  219. }
  220. return ret;
  221. }
  222. static int rds_set_transport(struct rds_sock *rs, char __user *optval,
  223. int optlen)
  224. {
  225. int t_type;
  226. if (rs->rs_transport)
  227. return -EOPNOTSUPP; /* previously attached to transport */
  228. if (optlen != sizeof(int))
  229. return -EINVAL;
  230. if (copy_from_user(&t_type, (int __user *)optval, sizeof(t_type)))
  231. return -EFAULT;
  232. if (t_type < 0 || t_type >= RDS_TRANS_COUNT)
  233. return -EINVAL;
  234. rs->rs_transport = rds_trans_get(t_type);
  235. return rs->rs_transport ? 0 : -ENOPROTOOPT;
  236. }
  237. static int rds_enable_recvtstamp(struct sock *sk, char __user *optval,
  238. int optlen)
  239. {
  240. int val, valbool;
  241. if (optlen != sizeof(int))
  242. return -EFAULT;
  243. if (get_user(val, (int __user *)optval))
  244. return -EFAULT;
  245. valbool = val ? 1 : 0;
  246. if (valbool)
  247. sock_set_flag(sk, SOCK_RCVTSTAMP);
  248. else
  249. sock_reset_flag(sk, SOCK_RCVTSTAMP);
  250. return 0;
  251. }
  252. static int rds_setsockopt(struct socket *sock, int level, int optname,
  253. char __user *optval, unsigned int optlen)
  254. {
  255. struct rds_sock *rs = rds_sk_to_rs(sock->sk);
  256. int ret;
  257. if (level != SOL_RDS) {
  258. ret = -ENOPROTOOPT;
  259. goto out;
  260. }
  261. switch (optname) {
  262. case RDS_CANCEL_SENT_TO:
  263. ret = rds_cancel_sent_to(rs, optval, optlen);
  264. break;
  265. case RDS_GET_MR:
  266. ret = rds_get_mr(rs, optval, optlen);
  267. break;
  268. case RDS_GET_MR_FOR_DEST:
  269. ret = rds_get_mr_for_dest(rs, optval, optlen);
  270. break;
  271. case RDS_FREE_MR:
  272. ret = rds_free_mr(rs, optval, optlen);
  273. break;
  274. case RDS_RECVERR:
  275. ret = rds_set_bool_option(&rs->rs_recverr, optval, optlen);
  276. break;
  277. case RDS_CONG_MONITOR:
  278. ret = rds_cong_monitor(rs, optval, optlen);
  279. break;
  280. case SO_RDS_TRANSPORT:
  281. lock_sock(sock->sk);
  282. ret = rds_set_transport(rs, optval, optlen);
  283. release_sock(sock->sk);
  284. break;
  285. case SO_TIMESTAMP:
  286. lock_sock(sock->sk);
  287. ret = rds_enable_recvtstamp(sock->sk, optval, optlen);
  288. release_sock(sock->sk);
  289. break;
  290. default:
  291. ret = -ENOPROTOOPT;
  292. }
  293. out:
  294. return ret;
  295. }
  296. static int rds_getsockopt(struct socket *sock, int level, int optname,
  297. char __user *optval, int __user *optlen)
  298. {
  299. struct rds_sock *rs = rds_sk_to_rs(sock->sk);
  300. int ret = -ENOPROTOOPT, len;
  301. int trans;
  302. if (level != SOL_RDS)
  303. goto out;
  304. if (get_user(len, optlen)) {
  305. ret = -EFAULT;
  306. goto out;
  307. }
  308. switch (optname) {
  309. case RDS_INFO_FIRST ... RDS_INFO_LAST:
  310. ret = rds_info_getsockopt(sock, optname, optval,
  311. optlen);
  312. break;
  313. case RDS_RECVERR:
  314. if (len < sizeof(int))
  315. ret = -EINVAL;
  316. else
  317. if (put_user(rs->rs_recverr, (int __user *) optval) ||
  318. put_user(sizeof(int), optlen))
  319. ret = -EFAULT;
  320. else
  321. ret = 0;
  322. break;
  323. case SO_RDS_TRANSPORT:
  324. if (len < sizeof(int)) {
  325. ret = -EINVAL;
  326. break;
  327. }
  328. trans = (rs->rs_transport ? rs->rs_transport->t_type :
  329. RDS_TRANS_NONE); /* unbound */
  330. if (put_user(trans, (int __user *)optval) ||
  331. put_user(sizeof(int), optlen))
  332. ret = -EFAULT;
  333. else
  334. ret = 0;
  335. break;
  336. default:
  337. break;
  338. }
  339. out:
  340. return ret;
  341. }
  342. static int rds_connect(struct socket *sock, struct sockaddr *uaddr,
  343. int addr_len, int flags)
  344. {
  345. struct sock *sk = sock->sk;
  346. struct sockaddr_in *sin = (struct sockaddr_in *)uaddr;
  347. struct rds_sock *rs = rds_sk_to_rs(sk);
  348. int ret = 0;
  349. lock_sock(sk);
  350. if (addr_len != sizeof(struct sockaddr_in)) {
  351. ret = -EINVAL;
  352. goto out;
  353. }
  354. if (sin->sin_family != AF_INET) {
  355. ret = -EAFNOSUPPORT;
  356. goto out;
  357. }
  358. if (sin->sin_addr.s_addr == htonl(INADDR_ANY)) {
  359. ret = -EDESTADDRREQ;
  360. goto out;
  361. }
  362. rs->rs_conn_addr = sin->sin_addr.s_addr;
  363. rs->rs_conn_port = sin->sin_port;
  364. out:
  365. release_sock(sk);
  366. return ret;
  367. }
  368. static struct proto rds_proto = {
  369. .name = "RDS",
  370. .owner = THIS_MODULE,
  371. .obj_size = sizeof(struct rds_sock),
  372. };
  373. static const struct proto_ops rds_proto_ops = {
  374. .family = AF_RDS,
  375. .owner = THIS_MODULE,
  376. .release = rds_release,
  377. .bind = rds_bind,
  378. .connect = rds_connect,
  379. .socketpair = sock_no_socketpair,
  380. .accept = sock_no_accept,
  381. .getname = rds_getname,
  382. .poll = rds_poll,
  383. .ioctl = rds_ioctl,
  384. .listen = sock_no_listen,
  385. .shutdown = sock_no_shutdown,
  386. .setsockopt = rds_setsockopt,
  387. .getsockopt = rds_getsockopt,
  388. .sendmsg = rds_sendmsg,
  389. .recvmsg = rds_recvmsg,
  390. .mmap = sock_no_mmap,
  391. .sendpage = sock_no_sendpage,
  392. };
  393. static void rds_sock_destruct(struct sock *sk)
  394. {
  395. struct rds_sock *rs = rds_sk_to_rs(sk);
  396. WARN_ON((&rs->rs_item != rs->rs_item.next ||
  397. &rs->rs_item != rs->rs_item.prev));
  398. }
  399. static int __rds_create(struct socket *sock, struct sock *sk, int protocol)
  400. {
  401. struct rds_sock *rs;
  402. sock_init_data(sock, sk);
  403. sock->ops = &rds_proto_ops;
  404. sk->sk_protocol = protocol;
  405. sk->sk_destruct = rds_sock_destruct;
  406. rs = rds_sk_to_rs(sk);
  407. spin_lock_init(&rs->rs_lock);
  408. rwlock_init(&rs->rs_recv_lock);
  409. INIT_LIST_HEAD(&rs->rs_send_queue);
  410. INIT_LIST_HEAD(&rs->rs_recv_queue);
  411. INIT_LIST_HEAD(&rs->rs_notify_queue);
  412. INIT_LIST_HEAD(&rs->rs_cong_list);
  413. spin_lock_init(&rs->rs_rdma_lock);
  414. rs->rs_rdma_keys = RB_ROOT;
  415. spin_lock_bh(&rds_sock_lock);
  416. list_add_tail(&rs->rs_item, &rds_sock_list);
  417. rds_sock_count++;
  418. spin_unlock_bh(&rds_sock_lock);
  419. return 0;
  420. }
  421. static int rds_create(struct net *net, struct socket *sock, int protocol,
  422. int kern)
  423. {
  424. struct sock *sk;
  425. if (sock->type != SOCK_SEQPACKET || protocol)
  426. return -ESOCKTNOSUPPORT;
  427. sk = sk_alloc(net, AF_RDS, GFP_ATOMIC, &rds_proto, kern);
  428. if (!sk)
  429. return -ENOMEM;
  430. return __rds_create(sock, sk, protocol);
  431. }
  432. void rds_sock_addref(struct rds_sock *rs)
  433. {
  434. sock_hold(rds_rs_to_sk(rs));
  435. }
  436. void rds_sock_put(struct rds_sock *rs)
  437. {
  438. sock_put(rds_rs_to_sk(rs));
  439. }
  440. static const struct net_proto_family rds_family_ops = {
  441. .family = AF_RDS,
  442. .create = rds_create,
  443. .owner = THIS_MODULE,
  444. };
  445. static void rds_sock_inc_info(struct socket *sock, unsigned int len,
  446. struct rds_info_iterator *iter,
  447. struct rds_info_lengths *lens)
  448. {
  449. struct rds_sock *rs;
  450. struct rds_incoming *inc;
  451. unsigned int total = 0;
  452. len /= sizeof(struct rds_info_message);
  453. spin_lock_bh(&rds_sock_lock);
  454. list_for_each_entry(rs, &rds_sock_list, rs_item) {
  455. read_lock(&rs->rs_recv_lock);
  456. /* XXX too lazy to maintain counts.. */
  457. list_for_each_entry(inc, &rs->rs_recv_queue, i_item) {
  458. total++;
  459. if (total <= len)
  460. rds_inc_info_copy(inc, iter, inc->i_saddr,
  461. rs->rs_bound_addr, 1);
  462. }
  463. read_unlock(&rs->rs_recv_lock);
  464. }
  465. spin_unlock_bh(&rds_sock_lock);
  466. lens->nr = total;
  467. lens->each = sizeof(struct rds_info_message);
  468. }
  469. static void rds_sock_info(struct socket *sock, unsigned int len,
  470. struct rds_info_iterator *iter,
  471. struct rds_info_lengths *lens)
  472. {
  473. struct rds_info_socket sinfo;
  474. struct rds_sock *rs;
  475. len /= sizeof(struct rds_info_socket);
  476. spin_lock_bh(&rds_sock_lock);
  477. if (len < rds_sock_count)
  478. goto out;
  479. list_for_each_entry(rs, &rds_sock_list, rs_item) {
  480. sinfo.sndbuf = rds_sk_sndbuf(rs);
  481. sinfo.rcvbuf = rds_sk_rcvbuf(rs);
  482. sinfo.bound_addr = rs->rs_bound_addr;
  483. sinfo.connected_addr = rs->rs_conn_addr;
  484. sinfo.bound_port = rs->rs_bound_port;
  485. sinfo.connected_port = rs->rs_conn_port;
  486. sinfo.inum = sock_i_ino(rds_rs_to_sk(rs));
  487. rds_info_copy(iter, &sinfo, sizeof(sinfo));
  488. }
  489. out:
  490. lens->nr = rds_sock_count;
  491. lens->each = sizeof(struct rds_info_socket);
  492. spin_unlock_bh(&rds_sock_lock);
  493. }
  494. static void rds_exit(void)
  495. {
  496. sock_unregister(rds_family_ops.family);
  497. proto_unregister(&rds_proto);
  498. rds_conn_exit();
  499. rds_cong_exit();
  500. rds_sysctl_exit();
  501. rds_threads_exit();
  502. rds_stats_exit();
  503. rds_page_exit();
  504. rds_bind_lock_destroy();
  505. rds_info_deregister_func(RDS_INFO_SOCKETS, rds_sock_info);
  506. rds_info_deregister_func(RDS_INFO_RECV_MESSAGES, rds_sock_inc_info);
  507. }
  508. module_exit(rds_exit);
  509. static int rds_init(void)
  510. {
  511. int ret;
  512. ret = rds_bind_lock_init();
  513. if (ret)
  514. goto out;
  515. ret = rds_conn_init();
  516. if (ret)
  517. goto out_bind;
  518. ret = rds_threads_init();
  519. if (ret)
  520. goto out_conn;
  521. ret = rds_sysctl_init();
  522. if (ret)
  523. goto out_threads;
  524. ret = rds_stats_init();
  525. if (ret)
  526. goto out_sysctl;
  527. ret = proto_register(&rds_proto, 1);
  528. if (ret)
  529. goto out_stats;
  530. ret = sock_register(&rds_family_ops);
  531. if (ret)
  532. goto out_proto;
  533. rds_info_register_func(RDS_INFO_SOCKETS, rds_sock_info);
  534. rds_info_register_func(RDS_INFO_RECV_MESSAGES, rds_sock_inc_info);
  535. goto out;
  536. out_proto:
  537. proto_unregister(&rds_proto);
  538. out_stats:
  539. rds_stats_exit();
  540. out_sysctl:
  541. rds_sysctl_exit();
  542. out_threads:
  543. rds_threads_exit();
  544. out_conn:
  545. rds_conn_exit();
  546. rds_cong_exit();
  547. rds_page_exit();
  548. out_bind:
  549. rds_bind_lock_destroy();
  550. out:
  551. return ret;
  552. }
  553. module_init(rds_init);
  554. #define DRV_VERSION "4.0"
  555. #define DRV_RELDATE "Feb 12, 2009"
  556. MODULE_AUTHOR("Oracle Corporation <rds-devel@oss.oracle.com>");
  557. MODULE_DESCRIPTION("RDS: Reliable Datagram Sockets"
  558. " v" DRV_VERSION " (" DRV_RELDATE ")");
  559. MODULE_VERSION(DRV_VERSION);
  560. MODULE_LICENSE("Dual BSD/GPL");
  561. MODULE_ALIAS_NETPROTO(PF_RDS);