Lines Matching +full:mux +full:- +full:int +full:- +full:port

1 // SPDX-License-Identifier: GPL-2.0-only
6 * Copyright (C) 2004-2005 by Latchesar Ionkov <lucho@ionkov.net>
7 * Copyright (C) 2004-2008 by Eric Van Hensbergen <ericvh@gmail.com>
8 * Copyright (C) 1997-2002 by Ron Minnich <rminnich@sarnoff.com>
41 * struct p9_fd_opts - per-transport options
44 * @port: port to connect to (trans=tcp)
45 * @privport: port is privileged
49 int rfd;
50 int wfd;
51 u16 port; member
57 * - a little lazy - parse all fd-transport options
68 {Opt_port, "port=%u"},
89 * struct p9_conn - fd mux connection state information
90 * @mux_list: list link for mux to manage multiple connections (?)
115 int err;
123 int wpos;
124 int wsize;
135 * struct p9_trans_fd - transport state
154 static unsigned int p9_ipport_resv_min = P9_DEF_MIN_RESVPORT;
155 static unsigned int p9_ipport_resv_max = P9_DEF_MAX_RESVPORT;
160 int i; in p9_mux_poll_stop()
162 for (i = 0; i < ARRAY_SIZE(m->poll_wait); i++) { in p9_mux_poll_stop()
163 struct p9_poll_wait *pwait = &m->poll_wait[i]; in p9_mux_poll_stop()
165 if (pwait->wait_addr) { in p9_mux_poll_stop()
166 remove_wait_queue(pwait->wait_addr, &pwait->wait); in p9_mux_poll_stop()
167 pwait->wait_addr = NULL; in p9_mux_poll_stop()
172 list_del_init(&m->poll_pending_link); in p9_mux_poll_stop()
179 * p9_conn_cancel - cancel all pending requests with error
180 * @m: mux data
185 static void p9_conn_cancel(struct p9_conn *m, int err) in p9_conn_cancel()
190 p9_debug(P9_DEBUG_ERROR, "mux %p err %d\n", m, err); in p9_conn_cancel()
192 spin_lock(&m->req_lock); in p9_conn_cancel()
194 if (m->err) { in p9_conn_cancel()
195 spin_unlock(&m->req_lock); in p9_conn_cancel()
199 m->err = err; in p9_conn_cancel()
201 list_for_each_entry_safe(req, rtmp, &m->req_list, req_list) { in p9_conn_cancel()
202 list_move(&req->req_list, &cancel_list); in p9_conn_cancel()
203 WRITE_ONCE(req->status, REQ_STATUS_ERROR); in p9_conn_cancel()
205 list_for_each_entry_safe(req, rtmp, &m->unsent_req_list, req_list) { in p9_conn_cancel()
206 list_move(&req->req_list, &cancel_list); in p9_conn_cancel()
207 WRITE_ONCE(req->status, REQ_STATUS_ERROR); in p9_conn_cancel()
210 spin_unlock(&m->req_lock); in p9_conn_cancel()
214 list_del(&req->req_list); in p9_conn_cancel()
215 if (!req->t_err) in p9_conn_cancel()
216 req->t_err = err; in p9_conn_cancel()
217 p9_client_cb(m->client, req, REQ_STATUS_ERROR); in p9_conn_cancel()
222 p9_fd_poll(struct p9_client *client, struct poll_table_struct *pt, int *err) in p9_fd_poll()
227 if (client && client->status == Connected) in p9_fd_poll()
228 ts = client->trans; in p9_fd_poll()
232 *err = -EREMOTEIO; in p9_fd_poll()
236 ret = vfs_poll(ts->rd, pt); in p9_fd_poll()
237 if (ts->rd != ts->wr) in p9_fd_poll()
238 ret = (ret & ~EPOLLOUT) | (vfs_poll(ts->wr, pt) & ~EPOLLIN); in p9_fd_poll()
243 * p9_fd_read- read from a fd
250 static int p9_fd_read(struct p9_client *client, void *v, int len) in p9_fd_read()
252 int ret; in p9_fd_read()
256 if (client && client->status != Disconnected) in p9_fd_read()
257 ts = client->trans; in p9_fd_read()
260 return -EREMOTEIO; in p9_fd_read()
262 if (!(ts->rd->f_flags & O_NONBLOCK)) in p9_fd_read()
265 pos = ts->rd->f_pos; in p9_fd_read()
266 ret = kernel_read(ts->rd, v, len, &pos); in p9_fd_read()
267 if (ret <= 0 && ret != -ERESTARTSYS && ret != -EAGAIN) in p9_fd_read()
268 client->status = Disconnected; in p9_fd_read()
273 * p9_read_work - called when there is some data to be read from a transport
281 int err; in p9_read_work()
286 if (m->err < 0) in p9_read_work()
289 p9_debug(P9_DEBUG_TRANS, "start mux %p pos %zd\n", m, m->rc.offset); in p9_read_work()
291 if (!m->rc.sdata) { in p9_read_work()
292 m->rc.sdata = m->tmp_buf; in p9_read_work()
293 m->rc.offset = 0; in p9_read_work()
294 m->rc.capacity = P9_HDRSZ; /* start by reading header */ in p9_read_work()
297 clear_bit(Rpending, &m->wsched); in p9_read_work()
298 p9_debug(P9_DEBUG_TRANS, "read mux %p pos %zd size: %zd = %zd\n", in p9_read_work()
299 m, m->rc.offset, m->rc.capacity, in p9_read_work()
300 m->rc.capacity - m->rc.offset); in p9_read_work()
301 err = p9_fd_read(m->client, m->rc.sdata + m->rc.offset, in p9_read_work()
302 m->rc.capacity - m->rc.offset); in p9_read_work()
303 p9_debug(P9_DEBUG_TRANS, "mux %p got %d bytes\n", m, err); in p9_read_work()
304 if (err == -EAGAIN) in p9_read_work()
310 m->rc.offset += err; in p9_read_work()
313 if ((!m->rreq) && (m->rc.offset == m->rc.capacity)) { in p9_read_work()
317 m->rc.size = P9_HDRSZ; in p9_read_work()
318 err = p9_parse_header(&m->rc, &m->rc.size, NULL, NULL, 0); in p9_read_work()
326 "mux %p pkt: size: %d bytes tag: %d\n", in p9_read_work()
327 m, m->rc.size, m->rc.tag); in p9_read_work()
329 m->rreq = p9_tag_lookup(m->client, m->rc.tag); in p9_read_work()
330 if (!m->rreq || (m->rreq->status != REQ_STATUS_SENT)) { in p9_read_work()
332 m->rc.tag); in p9_read_work()
333 err = -EIO; in p9_read_work()
337 if (m->rc.size > m->rreq->rc.capacity) { in p9_read_work()
340 m->rc.size, m->rc.tag, m->rreq->rc.capacity); in p9_read_work()
341 err = -EIO; in p9_read_work()
345 if (!m->rreq->rc.sdata) { in p9_read_work()
348 m->rc.tag, m->rreq); in p9_read_work()
349 p9_req_put(m->client, m->rreq); in p9_read_work()
350 m->rreq = NULL; in p9_read_work()
351 err = -EIO; in p9_read_work()
354 m->rc.sdata = m->rreq->rc.sdata; in p9_read_work()
355 memcpy(m->rc.sdata, m->tmp_buf, m->rc.capacity); in p9_read_work()
356 m->rc.capacity = m->rc.size; in p9_read_work()
362 if ((m->rreq) && (m->rc.offset == m->rc.capacity)) { in p9_read_work()
364 m->rreq->rc.size = m->rc.offset; in p9_read_work()
365 spin_lock(&m->req_lock); in p9_read_work()
366 if (m->rreq->status == REQ_STATUS_SENT) { in p9_read_work()
367 list_del(&m->rreq->req_list); in p9_read_work()
368 p9_client_cb(m->client, m->rreq, REQ_STATUS_RCVD); in p9_read_work()
369 } else if (m->rreq->status == REQ_STATUS_FLSHD) { in p9_read_work()
374 spin_unlock(&m->req_lock); in p9_read_work()
377 m->rc.tag); in p9_read_work()
378 err = -EIO; in p9_read_work()
381 spin_unlock(&m->req_lock); in p9_read_work()
382 m->rc.sdata = NULL; in p9_read_work()
383 m->rc.offset = 0; in p9_read_work()
384 m->rc.capacity = 0; in p9_read_work()
385 p9_req_put(m->client, m->rreq); in p9_read_work()
386 m->rreq = NULL; in p9_read_work()
390 clear_bit(Rworksched, &m->wsched); in p9_read_work()
392 if (!list_empty(&m->req_list)) { in p9_read_work()
393 if (test_and_clear_bit(Rpending, &m->wsched)) in p9_read_work()
396 n = p9_fd_poll(m->client, NULL, NULL); in p9_read_work()
398 if ((n & EPOLLIN) && !test_and_set_bit(Rworksched, &m->wsched)) { in p9_read_work()
400 schedule_work(&m->rq); in p9_read_work()
407 clear_bit(Rworksched, &m->wsched); in p9_read_work()
411 * p9_fd_write - write to a socket
418 static int p9_fd_write(struct p9_client *client, void *v, int len) in p9_fd_write()
423 if (client && client->status != Disconnected) in p9_fd_write()
424 ts = client->trans; in p9_fd_write()
427 return -EREMOTEIO; in p9_fd_write()
429 if (!(ts->wr->f_flags & O_NONBLOCK)) in p9_fd_write()
432 ret = kernel_write(ts->wr, v, len, &ts->wr->f_pos); in p9_fd_write()
433 if (ret <= 0 && ret != -ERESTARTSYS && ret != -EAGAIN) in p9_fd_write()
434 client->status = Disconnected; in p9_fd_write()
439 * p9_write_work - called when a transport can send some data
447 int err; in p9_write_work()
453 if (m->err < 0) { in p9_write_work()
454 clear_bit(Wworksched, &m->wsched); in p9_write_work()
458 if (!m->wsize) { in p9_write_work()
459 spin_lock(&m->req_lock); in p9_write_work()
460 if (list_empty(&m->unsent_req_list)) { in p9_write_work()
461 clear_bit(Wworksched, &m->wsched); in p9_write_work()
462 spin_unlock(&m->req_lock); in p9_write_work()
466 req = list_entry(m->unsent_req_list.next, struct p9_req_t, in p9_write_work()
468 WRITE_ONCE(req->status, REQ_STATUS_SENT); in p9_write_work()
470 list_move_tail(&req->req_list, &m->req_list); in p9_write_work()
472 m->wbuf = req->tc.sdata; in p9_write_work()
473 m->wsize = req->tc.size; in p9_write_work()
474 m->wpos = 0; in p9_write_work()
476 m->wreq = req; in p9_write_work()
477 spin_unlock(&m->req_lock); in p9_write_work()
480 p9_debug(P9_DEBUG_TRANS, "mux %p pos %d size %d\n", in p9_write_work()
481 m, m->wpos, m->wsize); in p9_write_work()
482 clear_bit(Wpending, &m->wsched); in p9_write_work()
483 err = p9_fd_write(m->client, m->wbuf + m->wpos, m->wsize - m->wpos); in p9_write_work()
484 p9_debug(P9_DEBUG_TRANS, "mux %p sent %d bytes\n", m, err); in p9_write_work()
485 if (err == -EAGAIN) in p9_write_work()
492 err = -EREMOTEIO; in p9_write_work()
496 m->wpos += err; in p9_write_work()
497 if (m->wpos == m->wsize) { in p9_write_work()
498 m->wpos = m->wsize = 0; in p9_write_work()
499 p9_req_put(m->client, m->wreq); in p9_write_work()
500 m->wreq = NULL; in p9_write_work()
504 clear_bit(Wworksched, &m->wsched); in p9_write_work()
506 if (m->wsize || !list_empty(&m->unsent_req_list)) { in p9_write_work()
507 if (test_and_clear_bit(Wpending, &m->wsched)) in p9_write_work()
510 n = p9_fd_poll(m->client, NULL, NULL); in p9_write_work()
513 !test_and_set_bit(Wworksched, &m->wsched)) { in p9_write_work()
515 schedule_work(&m->wq); in p9_write_work()
523 clear_bit(Wworksched, &m->wsched); in p9_write_work()
526 static int p9_pollwake(wait_queue_entry_t *wait, unsigned int mode, int sync, void *key) in p9_pollwake()
530 struct p9_conn *m = pwait->conn; in p9_pollwake()
534 if (list_empty(&m->poll_pending_link)) in p9_pollwake()
535 list_add_tail(&m->poll_pending_link, &p9_poll_pending_list); in p9_pollwake()
543 * p9_pollwait - add poll task to the wait queue
548 * called by files poll operation to add v9fs-poll task to files wait queue
556 int i; in p9_pollwait()
558 for (i = 0; i < ARRAY_SIZE(m->poll_wait); i++) { in p9_pollwait()
559 if (m->poll_wait[i].wait_addr == NULL) { in p9_pollwait()
560 pwait = &m->poll_wait[i]; in p9_pollwait()
570 pwait->conn = m; in p9_pollwait()
571 pwait->wait_addr = wait_address; in p9_pollwait()
572 init_waitqueue_func_entry(&pwait->wait, p9_pollwake); in p9_pollwait()
573 add_wait_queue(wait_address, &pwait->wait); in p9_pollwait()
577 * p9_conn_create - initialize the per-session mux data
586 struct p9_trans_fd *ts = client->trans; in p9_conn_create()
587 struct p9_conn *m = &ts->conn; in p9_conn_create()
589 p9_debug(P9_DEBUG_TRANS, "client %p msize %d\n", client, client->msize); in p9_conn_create()
591 INIT_LIST_HEAD(&m->mux_list); in p9_conn_create()
592 m->client = client; in p9_conn_create()
594 spin_lock_init(&m->req_lock); in p9_conn_create()
595 INIT_LIST_HEAD(&m->req_list); in p9_conn_create()
596 INIT_LIST_HEAD(&m->unsent_req_list); in p9_conn_create()
597 INIT_WORK(&m->rq, p9_read_work); in p9_conn_create()
598 INIT_WORK(&m->wq, p9_write_work); in p9_conn_create()
599 INIT_LIST_HEAD(&m->poll_pending_link); in p9_conn_create()
600 init_poll_funcptr(&m->pt, p9_pollwait); in p9_conn_create()
602 n = p9_fd_poll(client, &m->pt, NULL); in p9_conn_create()
604 p9_debug(P9_DEBUG_TRANS, "mux %p can read\n", m); in p9_conn_create()
605 set_bit(Rpending, &m->wsched); in p9_conn_create()
609 p9_debug(P9_DEBUG_TRANS, "mux %p can write\n", m); in p9_conn_create()
610 set_bit(Wpending, &m->wsched); in p9_conn_create()
615 * p9_poll_mux - polls a mux and schedules read or write works if necessary
623 int err = -ECONNRESET; in p9_poll_mux()
625 if (m->err < 0) in p9_poll_mux()
628 n = p9_fd_poll(m->client, NULL, &err); in p9_poll_mux()
630 p9_debug(P9_DEBUG_TRANS, "error mux %p err %d\n", m, n); in p9_poll_mux()
635 set_bit(Rpending, &m->wsched); in p9_poll_mux()
636 p9_debug(P9_DEBUG_TRANS, "mux %p can read\n", m); in p9_poll_mux()
637 if (!test_and_set_bit(Rworksched, &m->wsched)) { in p9_poll_mux()
639 schedule_work(&m->rq); in p9_poll_mux()
644 set_bit(Wpending, &m->wsched); in p9_poll_mux()
645 p9_debug(P9_DEBUG_TRANS, "mux %p can write\n", m); in p9_poll_mux()
646 if ((m->wsize || !list_empty(&m->unsent_req_list)) && in p9_poll_mux()
647 !test_and_set_bit(Wworksched, &m->wsched)) { in p9_poll_mux()
649 schedule_work(&m->wq); in p9_poll_mux()
655 * p9_fd_request - send 9P request
665 static int p9_fd_request(struct p9_client *client, struct p9_req_t *req) in p9_fd_request()
668 struct p9_trans_fd *ts = client->trans; in p9_fd_request()
669 struct p9_conn *m = &ts->conn; in p9_fd_request()
671 p9_debug(P9_DEBUG_TRANS, "mux %p task %p tcall %p id %d\n", in p9_fd_request()
672 m, current, &req->tc, req->tc.id); in p9_fd_request()
674 spin_lock(&m->req_lock); in p9_fd_request()
676 if (m->err < 0) { in p9_fd_request()
677 spin_unlock(&m->req_lock); in p9_fd_request()
678 return m->err; in p9_fd_request()
681 WRITE_ONCE(req->status, REQ_STATUS_UNSENT); in p9_fd_request()
682 list_add_tail(&req->req_list, &m->unsent_req_list); in p9_fd_request()
683 spin_unlock(&m->req_lock); in p9_fd_request()
685 if (test_and_clear_bit(Wpending, &m->wsched)) in p9_fd_request()
688 n = p9_fd_poll(m->client, NULL, NULL); in p9_fd_request()
690 if (n & EPOLLOUT && !test_and_set_bit(Wworksched, &m->wsched)) in p9_fd_request()
691 schedule_work(&m->wq); in p9_fd_request()
696 static int p9_fd_cancel(struct p9_client *client, struct p9_req_t *req) in p9_fd_cancel()
698 struct p9_trans_fd *ts = client->trans; in p9_fd_cancel()
699 struct p9_conn *m = &ts->conn; in p9_fd_cancel()
700 int ret = 1; in p9_fd_cancel()
704 spin_lock(&m->req_lock); in p9_fd_cancel()
706 if (req->status == REQ_STATUS_UNSENT) { in p9_fd_cancel()
707 list_del(&req->req_list); in p9_fd_cancel()
708 WRITE_ONCE(req->status, REQ_STATUS_FLSHD); in p9_fd_cancel()
712 spin_unlock(&m->req_lock); in p9_fd_cancel()
717 static int p9_fd_cancelled(struct p9_client *client, struct p9_req_t *req) in p9_fd_cancelled()
719 struct p9_trans_fd *ts = client->trans; in p9_fd_cancelled()
720 struct p9_conn *m = &ts->conn; in p9_fd_cancelled()
724 spin_lock(&m->req_lock); in p9_fd_cancelled()
728 if (req->status == REQ_STATUS_RCVD) { in p9_fd_cancelled()
729 spin_unlock(&m->req_lock); in p9_fd_cancelled()
736 list_del(&req->req_list); in p9_fd_cancelled()
737 WRITE_ONCE(req->status, REQ_STATUS_FLSHD); in p9_fd_cancelled()
738 spin_unlock(&m->req_lock); in p9_fd_cancelled()
745 static int p9_fd_show_options(struct seq_file *m, struct p9_client *clnt) in p9_fd_show_options()
747 if (clnt->trans_mod == &p9_tcp_trans) { in p9_fd_show_options()
748 if (clnt->trans_opts.tcp.port != P9_PORT) in p9_fd_show_options()
749 seq_printf(m, ",port=%u", clnt->trans_opts.tcp.port); in p9_fd_show_options()
750 } else if (clnt->trans_mod == &p9_fd_trans) { in p9_fd_show_options()
751 if (clnt->trans_opts.fd.rfd != ~0) in p9_fd_show_options()
752 seq_printf(m, ",rfd=%u", clnt->trans_opts.fd.rfd); in p9_fd_show_options()
753 if (clnt->trans_opts.fd.wfd != ~0) in p9_fd_show_options()
754 seq_printf(m, ",wfd=%u", clnt->trans_opts.fd.wfd); in p9_fd_show_options()
760 * parse_opts - parse mount options into p9_fd_opts structure
762 * @opts: fd transport-specific structure to parse options into
764 * Returns 0 upon success, -ERRNO upon failure
767 static int parse_opts(char *params, struct p9_fd_opts *opts) in parse_opts()
771 int option; in parse_opts()
774 opts->port = P9_PORT; in parse_opts()
775 opts->rfd = ~0; in parse_opts()
776 opts->wfd = ~0; in parse_opts()
777 opts->privport = false; in parse_opts()
786 return -ENOMEM; in parse_opts()
791 int token; in parse_opts()
792 int r; in parse_opts()
806 opts->port = option; in parse_opts()
809 opts->rfd = option; in parse_opts()
812 opts->wfd = option; in parse_opts()
815 opts->privport = true; in parse_opts()
826 static int p9_fd_open(struct p9_client *client, int rfd, int wfd) in p9_fd_open()
831 return -ENOMEM; in p9_fd_open()
833 ts->rd = fget(rfd); in p9_fd_open()
834 if (!ts->rd) in p9_fd_open()
836 if (!(ts->rd->f_mode & FMODE_READ)) in p9_fd_open()
846 data_race(ts->rd->f_flags |= O_NONBLOCK); in p9_fd_open()
847 ts->wr = fget(wfd); in p9_fd_open()
848 if (!ts->wr) in p9_fd_open()
850 if (!(ts->wr->f_mode & FMODE_WRITE)) in p9_fd_open()
852 data_race(ts->wr->f_flags |= O_NONBLOCK); in p9_fd_open()
854 client->trans = ts; in p9_fd_open()
855 client->status = Connected; in p9_fd_open()
860 fput(ts->wr); in p9_fd_open()
862 fput(ts->rd); in p9_fd_open()
865 return -EIO; in p9_fd_open()
868 static int p9_socket_open(struct p9_client *client, struct socket *csocket) in p9_socket_open()
876 return -ENOMEM; in p9_socket_open()
879 csocket->sk->sk_allocation = GFP_NOIO; in p9_socket_open()
880 csocket->sk->sk_use_task_frag = false; in p9_socket_open()
890 p->wr = p->rd = file; in p9_socket_open()
891 client->trans = p; in p9_socket_open()
892 client->status = Connected; in p9_socket_open()
894 p->rd->f_flags |= O_NONBLOCK; in p9_socket_open()
901 * p9_conn_destroy - cancels all pending requests of mux
902 * @m: mux to destroy
908 p9_debug(P9_DEBUG_TRANS, "mux %p prev %p next %p\n", in p9_conn_destroy()
909 m, m->mux_list.prev, m->mux_list.next); in p9_conn_destroy()
912 cancel_work_sync(&m->rq); in p9_conn_destroy()
913 if (m->rreq) { in p9_conn_destroy()
914 p9_req_put(m->client, m->rreq); in p9_conn_destroy()
915 m->rreq = NULL; in p9_conn_destroy()
917 cancel_work_sync(&m->wq); in p9_conn_destroy()
918 if (m->wreq) { in p9_conn_destroy()
919 p9_req_put(m->client, m->wreq); in p9_conn_destroy()
920 m->wreq = NULL; in p9_conn_destroy()
923 p9_conn_cancel(m, -ECONNRESET); in p9_conn_destroy()
925 m->client = NULL; in p9_conn_destroy()
929 * p9_fd_close - shutdown file descriptor transport
941 ts = client->trans; in p9_fd_close()
945 client->status = Disconnected; in p9_fd_close()
947 p9_conn_destroy(&ts->conn); in p9_fd_close()
949 if (ts->rd) in p9_fd_close()
950 fput(ts->rd); in p9_fd_close()
951 if (ts->wr) in p9_fd_close()
952 fput(ts->wr); in p9_fd_close()
958 * stolen from NFS - maybe should be made a generic function?
960 static inline int valid_ipaddr4(const char *buf) in valid_ipaddr4()
962 int rc, count, in[4]; in valid_ipaddr4()
966 return -EINVAL; in valid_ipaddr4()
969 return -EINVAL; in valid_ipaddr4()
974 static int p9_bind_privport(struct socket *sock) in p9_bind_privport()
977 int port, err = -EINVAL; in p9_bind_privport() local
982 for (port = p9_ipport_resv_max; port >= p9_ipport_resv_min; port--) { in p9_bind_privport()
983 cl.sin_port = htons((ushort)port); in p9_bind_privport()
985 if (err != -EADDRINUSE) in p9_bind_privport()
992 static int
995 int err; in p9_fd_create_tcp()
1005 return -EINVAL; in p9_fd_create_tcp()
1009 client->trans_opts.tcp.port = opts.port; in p9_fd_create_tcp()
1010 client->trans_opts.tcp.privport = opts.privport; in p9_fd_create_tcp()
1013 sin_server.sin_port = htons(opts.port); in p9_fd_create_tcp()
1014 err = __sock_create(current->nsproxy->net_ns, PF_INET, in p9_fd_create_tcp()
1032 err = READ_ONCE(csocket->ops)->connect(csocket, in p9_fd_create_tcp()
1045 static int
1048 int err; in p9_fd_create_unix()
1055 return -EINVAL; in p9_fd_create_unix()
1060 return -ENAMETOOLONG; in p9_fd_create_unix()
1065 err = __sock_create(current->nsproxy->net_ns, PF_UNIX, in p9_fd_create_unix()
1073 err = READ_ONCE(csocket->ops)->connect(csocket, (struct sockaddr *)&sun_server, in p9_fd_create_unix()
1074 sizeof(struct sockaddr_un) - 1, 0); in p9_fd_create_unix()
1085 static int
1088 int err; in p9_fd_create()
1094 client->trans_opts.fd.rfd = opts.rfd; in p9_fd_create()
1095 client->trans_opts.fd.wfd = opts.wfd; in p9_fd_create()
1099 return -ENOPROTOOPT; in p9_fd_create()
1155 * p9_poll_workfn - poll worker thread
1174 list_del_init(&conn->poll_pending_link); in p9_poll_workfn()
1186 static int __init p9_trans_fd_init(void) in p9_trans_fd_init()