1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Copyright (C) 2002 Cluster File Systems, Inc.
6 * This file is part of Lustre, http://www.lustre.org.
8 * Lustre is free software; you can redistribute it and/or
9 * modify it under the terms of version 2 of the GNU General Public
10 * License as published by the Free Software Foundation.
12 * Lustre is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Lustre; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #include <linux/kp30.h>
27 #include <portals/p30.h>
28 #include <linux/lustre_idl.h>
30 /* FOO_REQUEST_PORTAL receives requests for the FOO subsystem.
31 * FOO_REPLY_PORTAL receives replies _from_ the FOO subsystem. */
32 #define OSC_REQUEST_PORTAL 1
33 #define OSC_REPLY_PORTAL 2
34 #define MDS_REQUEST_PORTAL 3
35 #define MDS_REPLY_PORTAL 4
36 #define OST_REQUEST_PORTAL 5
37 #define OST_REPLY_PORTAL 6
38 #define MDC_BULK_PORTAL 7
39 #define MDS_BULK_PORTAL 8
40 #define OSC_BULK_PORTAL 9
41 #define OST_BULK_PORTAL 10
43 struct ptlrpc_service {
46 __u32 srv_ring_length;
49 struct lustre_peer srv_self;
51 /* FIXME: perhaps a list of EQs, if multiple NIs are used? */
52 ptl_handle_eq_t srv_eq_h;
54 ptl_handle_me_t srv_me_h;
55 ptl_process_id_t srv_id;
57 ptl_handle_md_t srv_md_h;
58 wait_queue_head_t *srv_wait_queue;
61 struct ptlrpc_request {
62 struct list_head rq_list;
63 struct mds_obd *rq_obd;
64 struct ost_obd *rq_ost;
69 struct ptlreq_hdr *rq_reqhdr;
75 struct ptlrep_hdr *rq_rephdr;
80 int (*rq_bulk_cb)(struct ptlrpc_request *, void *);
82 void * rq_reply_handle;
83 wait_queue_head_t rq_wait_for_rep;
84 wait_queue_head_t rq_wait_for_bulk;
87 ptl_handle_md_t rq_reply_md_h;
90 ptl_handle_md_t rq_bulk_md_h;
91 __u32 rq_reply_portal;
95 struct lustre_peer rq_peer;
99 int ptl_send_buf(struct ptlrpc_request *request, struct lustre_peer *peer,
100 int portal, int is_request);
101 int ptl_send_rpc(struct ptlrpc_request *request, struct lustre_peer *peer);
102 int rpc_register_service(struct ptlrpc_service *service, char *uuid);
103 int rpc_unregister_service(struct ptlrpc_service *service);
107 # define LUSTRE_NAL "ksocknal"
109 # define LUSTRE_NAL "kqswnal"