Whamcloud - gitweb
fd7bc619024a32224f1d1395be13132eeecce06c
[fs/lustre-release.git] / lnet / klnds / openiblnd / openiblnd.h
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  * Copyright (C) 2004 Cluster File Systems, Inc.
5  *   Author: Eric Barton <eric@bartonsoftware.com>
6  *
7  *   This file is part of Lustre, http://www.lustre.org.
8  *
9  *   Lustre is free software; you can redistribute it and/or
10  *   modify it under the terms of version 2 of the GNU General Public
11  *   License as published by the Free Software Foundation.
12  *
13  *   Lustre is distributed in the hope that it will be useful,
14  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *   GNU General Public License for more details.
17  *
18  *   You should have received a copy of the GNU General Public License
19  *   along with Lustre; if not, write to the Free Software
20  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  *
22  */
23
24 #ifndef EXPORT_SYMTAB
25 # define EXPORT_SYMTAB
26 #endif
27
28 #include <linux/config.h>
29 #include <linux/module.h>
30 #include <linux/kernel.h>
31 #include <linux/mm.h>
32 #include <linux/string.h>
33 #include <linux/stat.h>
34 #include <linux/errno.h>
35 #include <linux/smp_lock.h>
36 #include <linux/unistd.h>
37 #include <linux/uio.h>
38
39 #include <asm/system.h>
40 #include <asm/uaccess.h>
41 #include <asm/io.h>
42
43 #include <linux/init.h>
44 #include <linux/fs.h>
45 #include <linux/file.h>
46 #include <linux/stat.h>
47 #include <linux/list.h>
48 #include <linux/kmod.h>
49 #include <linux/sysctl.h>
50
51 #define DEBUG_SUBSYSTEM S_NAL
52
53 #include <linux/kp30.h>
54 #include <portals/p30.h>
55 #include <portals/lib-p30.h>
56 #include <portals/nal.h>
57
58 #include <ts_ib_core.h>
59 #include <ts_ib_cm.h>
60 #include <ts_ib_sa_client.h>
61
62 #define IBNAL_SERVICE_NAME   "openibnal"
63 #define IBNAL_CHECK_ADVERT   1
64
65 #if CONFIG_SMP
66 # define IBNAL_N_SCHED      num_online_cpus()   /* # schedulers */
67 #else
68 # define IBNAL_N_SCHED      1                   /* # schedulers */
69 #endif
70
71 #define IBNAL_MIN_RECONNECT_INTERVAL HZ         /* first failed connection retry... */
72 #define IBNAL_MAX_RECONNECT_INTERVAL (60*HZ)    /* ...exponentially increasing to this */
73
74 #define IBNAL_MSG_SIZE       (4<<10)            /* max size of queued messages (inc hdr) */
75
76 #define IBNAL_MSG_QUEUE_SIZE   8                /* # messages/RDMAs in-flight */
77 #define IBNAL_CREDIT_HIGHWATER 6                /* when to eagerly return credits */
78 #define IBNAL_RETRY            7                /* # times to retry */
79 #define IBNAL_RNR_RETRY        7                /*  */
80 #define IBNAL_CM_RETRY         7                /* # times to retry connection */
81 #define IBNAL_FLOW_CONTROL     1
82 #define IBNAL_RESPONDER_RESOURCES 8
83
84 #define IBNAL_NTX             64                /* # tx descs */
85 #define IBNAL_NTX_NBLK        256               /* # reserved tx descs */
86
87 #define IBNAL_PEER_HASH_SIZE  101               /* # peer lists */
88
89 #define IBNAL_RESCHED         100               /* # scheduler loops before reschedule */
90
91 #define IBNAL_CONCURRENT_PEERS 1000             /* # nodes all talking at once to me */
92
93 /* default vals for runtime tunables */
94 #define IBNAL_IO_TIMEOUT      50                /* default comms timeout (seconds) */
95
96 /************************/
97 /* derived constants... */
98
99 /* TX messages (shared by all connections) */
100 #define IBNAL_TX_MSGS       (IBNAL_NTX + IBNAL_NTX_NBLK)
101 #define IBNAL_TX_MSG_BYTES  (IBNAL_TX_MSGS * IBNAL_MSG_SIZE)
102 #define IBNAL_TX_MSG_PAGES  ((IBNAL_TX_MSG_BYTES + PAGE_SIZE - 1)/PAGE_SIZE)
103
104 /* RX messages (per connection) */
105 #define IBNAL_RX_MSGS       IBNAL_MSG_QUEUE_SIZE
106 #define IBNAL_RX_MSG_BYTES  (IBNAL_RX_MSGS * IBNAL_MSG_SIZE)
107 #define IBNAL_RX_MSG_PAGES  ((IBNAL_RX_MSG_BYTES + PAGE_SIZE - 1)/PAGE_SIZE)
108
109 /* we may have up to 2 completions per transmit +
110    1 completion per receive, per connection */
111 #define IBNAL_CQ_ENTRIES  ((2*IBNAL_TX_MSGS) +                          \
112                            (IBNAL_RX_MSGS * IBNAL_CONCURRENT_PEERS))
113
114 #define IBNAL_RDMA_BASE  0x0eeb0000
115 #define IBNAL_FMR        1
116 #define IBNAL_CKSUM      0
117 //#define IBNAL_CALLBACK_CTXT  IB_CQ_CALLBACK_PROCESS
118 #define IBNAL_CALLBACK_CTXT  IB_CQ_CALLBACK_INTERRUPT
119
120 typedef struct 
121 {
122         int               kib_io_timeout;       /* comms timeout (seconds) */
123         struct ctl_table_header *kib_sysctl;    /* sysctl interface */
124 } kib_tunables_t;
125
126 typedef struct
127 {
128         int               ibp_npages;           /* # pages */
129         int               ibp_mapped;           /* mapped? */
130         __u64             ibp_vaddr;            /* mapped region vaddr */
131         __u32             ibp_lkey;             /* mapped region lkey */
132         __u32             ibp_rkey;             /* mapped region rkey */
133         struct ib_mr     *ibp_handle;           /* mapped region handle */
134         struct page      *ibp_pages[0];
135 } kib_pages_t;
136         
137 typedef struct 
138 {
139         int               kib_init;             /* initialisation state */
140         __u64             kib_incarnation;      /* which one am I */
141         int               kib_shutdown;         /* shut down? */
142         atomic_t          kib_nthreads;         /* # live threads */
143
144         __u64             kib_service_id;       /* service number I listen on */
145         ptl_nid_t         kib_nid;              /* my NID */
146         struct semaphore  kib_nid_mutex;        /* serialise NID ops */
147         struct semaphore  kib_nid_signal;       /* signal completion */
148
149         rwlock_t          kib_global_lock;      /* stabilize peer/conn ops */
150
151         struct list_head *kib_peers;            /* hash table of all my known peers */
152         int               kib_peer_hash_size;   /* size of kib_peers */
153         atomic_t          kib_npeers;           /* # peers extant */
154         atomic_t          kib_nconns;           /* # connections extant */
155
156         struct list_head  kib_connd_conns;      /* connections to progress */
157         struct list_head  kib_connd_peers;      /* peers waiting for a connection */
158         wait_queue_head_t kib_connd_waitq;      /* connection daemons sleep here */
159         unsigned long     kib_connd_waketime;   /* when connd will wake */
160         spinlock_t        kib_connd_lock;       /* serialise */
161
162         wait_queue_head_t kib_sched_waitq;      /* schedulers sleep here */
163         struct list_head  kib_sched_txq;        /* tx requiring attention */
164         struct list_head  kib_sched_rxq;        /* rx requiring attention */
165         spinlock_t        kib_sched_lock;       /* serialise */
166         
167         struct kib_tx    *kib_tx_descs;         /* all the tx descriptors */
168         kib_pages_t      *kib_tx_pages;         /* premapped tx msg pages */
169
170         struct list_head  kib_idle_txs;         /* idle tx descriptors */
171         struct list_head  kib_idle_nblk_txs;    /* idle reserved tx descriptors */
172         wait_queue_head_t kib_idle_tx_waitq;    /* block here for tx descriptor */
173         __u64             kib_next_tx_cookie;   /* RDMA completion cookie */
174         spinlock_t        kib_tx_lock;          /* serialise */
175         
176         struct ib_device *kib_device;           /* "the" device */
177         struct ib_device_properties kib_device_props; /* its properties */
178         int               kib_port;             /* port on the device */
179         struct ib_port_properties kib_port_props; /* its properties */
180         struct ib_pd     *kib_pd;               /* protection domain */
181 #if IBNAL_FMR
182         struct ib_fmr_pool *kib_fmr_pool;       /* fast memory region pool */
183 #endif
184         struct ib_cq     *kib_cq;               /* completion queue */
185         void             *kib_listen_handle;    /* where I listen for connections */
186         
187 } kib_data_t;
188
189 #define IBNAL_INIT_NOTHING         0
190 #define IBNAL_INIT_DATA            1
191 #define IBNAL_INIT_LIB             2
192 #define IBNAL_INIT_PD              3
193 #define IBNAL_INIT_FMR             4
194 #define IBNAL_INIT_TXD             5
195 #define IBNAL_INIT_CQ              6
196 #define IBNAL_INIT_ALL             7
197
198 /************************************************************************
199  * Wire message structs.
200  * These are sent in sender's byte order (i.e. receiver flips).
201  * CAVEAT EMPTOR: other structs communicated between nodes (e.g. MAD
202  * private data and SM service info), is LE on the wire.
203  */
204
205 typedef struct
206 {
207         union {
208                 struct ib_mr    *mr;
209                 struct ib_fmr   *fmr;
210         }                 md_handle;
211         __u32             md_lkey;
212         __u32             md_rkey;
213         __u64             md_addr;
214 } kib_md_t;
215
216 typedef struct
217 {
218         __u32                 rd_key;           /* remote key */
219         __u32                 rd_nob;           /* # of bytes */
220         __u64                 rd_addr;          /* remote io vaddr */
221 } kib_rdma_desc_t;
222
223
224 typedef struct
225 {
226         ptl_hdr_t         ibim_hdr;             /* portals header */
227         char              ibim_payload[0];      /* piggy-backed payload */
228 } kib_immediate_msg_t;
229
230 typedef struct
231 {
232         ptl_hdr_t         ibrm_hdr;             /* portals header */
233         __u64             ibrm_cookie;          /* opaque completion cookie */
234         kib_rdma_desc_t   ibrm_desc;            /* where to suck/blow */
235 } kib_rdma_msg_t;
236
237 typedef struct
238 {
239         __u64             ibcm_cookie;          /* opaque completion cookie */
240         __u32             ibcm_status;          /* completion status */
241 } kib_completion_msg_t;
242
243 typedef struct
244 {
245         __u32              ibm_magic;           /* I'm an openibnal message */
246         __u16              ibm_version;         /* this is my version number */
247         __u8               ibm_type;            /* msg type */
248         __u8               ibm_credits;         /* returned credits */
249 #if IBNAL_CKSUM
250         __u32              ibm_nob;
251         __u32              ibm_cksum;
252 #endif
253         union {
254                 kib_immediate_msg_t   immediate;
255                 kib_rdma_msg_t        rdma;
256                 kib_completion_msg_t  completion;
257         }                    ibm_u;
258 } kib_msg_t;
259
260 #define IBNAL_MSG_MAGIC       0x0be91b91        /* unique magic */
261 #define IBNAL_MSG_VERSION              1        /* current protocol version */
262
263 #define IBNAL_MSG_NOOP              0xd0        /* nothing (just credits) */
264 #define IBNAL_MSG_IMMEDIATE         0xd1        /* portals hdr + payload */
265 #define IBNAL_MSG_PUT_RDMA          0xd2        /* portals PUT hdr + source rdma desc */
266 #define IBNAL_MSG_PUT_DONE          0xd3        /* signal PUT rdma completion */
267 #define IBNAL_MSG_GET_RDMA          0xd4        /* portals GET hdr + sink rdma desc */
268 #define IBNAL_MSG_GET_DONE          0xd5        /* signal GET rdma completion */
269
270 /***********************************************************************/
271
272 typedef struct kib_rx                           /* receive message */
273 {
274         struct list_head          rx_list;      /* queue for attention */
275         struct kib_conn          *rx_conn;      /* owning conn */
276         int                       rx_rdma;      /* RDMA completion posted? */
277         int                       rx_posted;    /* posted? */
278         __u64                     rx_vaddr;     /* pre-mapped buffer (hca vaddr) */
279         kib_msg_t                *rx_msg;       /* pre-mapped buffer (host vaddr) */
280         struct ib_receive_param   rx_sp;        /* receive work item */
281         struct ib_gather_scatter  rx_gl;        /* and it's memory */
282 } kib_rx_t;
283
284 typedef struct kib_tx                           /* transmit message */
285 {
286         struct list_head          tx_list;      /* queue on idle_txs ibc_tx_queue etc. */
287         int                       tx_isnblk;    /* I'm reserved for non-blocking sends */
288         struct kib_conn          *tx_conn;      /* owning conn */
289         int                       tx_mapped;    /* mapped for RDMA? */
290         int                       tx_sending;   /* # tx callbacks outstanding */
291         int                       tx_status;    /* completion status */
292         unsigned long             tx_deadline;  /* completion deadline */
293         int                       tx_passive_rdma; /* peer sucks/blows */
294         int                       tx_passive_rdma_wait; /* waiting for peer to complete */
295         __u64                     tx_passive_rdma_cookie; /* completion cookie */
296         lib_msg_t                *tx_libmsg[2]; /* lib msgs to finalize on completion */
297         kib_md_t                  tx_md;        /* RDMA mapping (active/passive) */
298         __u64                     tx_vaddr;     /* pre-mapped buffer (hca vaddr) */
299         kib_msg_t                *tx_msg;       /* pre-mapped buffer (host vaddr) */
300         int                       tx_nsp;       /* # send work items */
301         struct ib_send_param      tx_sp[2];     /* send work items... */
302         struct ib_gather_scatter  tx_gl[2];     /* ...and their memory */
303 } kib_tx_t;
304
305 #define KIB_TX_UNMAPPED       0
306 #define KIB_TX_MAPPED         1
307 #define KIB_TX_MAPPED_FMR     2
308
309 typedef struct kib_wire_connreq
310 {
311         __u32        wcr_magic;                 /* I'm an openibnal connreq */
312         __u16        wcr_version;               /* this is my version number */
313         __u16        wcr_queue_depth;           /* this is my receive queue size */
314         __u64        wcr_nid;                   /* peer's NID */
315         __u64        wcr_incarnation;           /* peer's incarnation */
316 } kib_wire_connreq_t;
317
318 typedef struct kib_connreq
319 {
320         /* connection-in-progress */
321         struct kib_conn                    *cr_conn;
322         kib_wire_connreq_t                  cr_wcr;
323         __u64                               cr_tid;
324         struct ib_common_attrib_service     cr_service;
325         tTS_IB_GID                          cr_gid;
326         struct ib_path_record               cr_path;
327         struct ib_cm_active_param           cr_connparam;
328 } kib_connreq_t;
329
330 typedef struct kib_conn
331
332         struct kib_peer    *ibc_peer;           /* owning peer */
333         struct list_head    ibc_list;           /* stash on peer's conn list */
334         __u64               ibc_incarnation;    /* which instance of the peer */
335         atomic_t            ibc_refcount;       /* # users */
336         int                 ibc_state;          /* what's happening */
337         atomic_t            ibc_nob;            /* # bytes buffered */
338         int                 ibc_nsends_posted;  /* # uncompleted sends */
339         int                 ibc_credits;        /* # credits I have */
340         int                 ibc_outstanding_credits; /* # credits to return */
341         struct list_head    ibc_tx_queue;       /* send queue */
342         struct list_head    ibc_active_txs;     /* active tx awaiting completion */
343         spinlock_t          ibc_lock;           /* serialise */
344         kib_rx_t           *ibc_rxs;            /* the rx descs */
345         kib_pages_t        *ibc_rx_pages;       /* premapped rx msg pages */
346         struct ib_qp       *ibc_qp;             /* queue pair */
347         __u32               ibc_qpn;            /* queue pair number */
348         tTS_IB_CM_COMM_ID   ibc_comm_id;        /* connection ID? */
349         kib_connreq_t      *ibc_connreq;        /* connection request state */
350 } kib_conn_t;
351
352 #define IBNAL_CONN_INIT_NOTHING      0          /* initial state */
353 #define IBNAL_CONN_INIT_QP           1          /* ibc_qp set up */
354 #define IBNAL_CONN_CONNECTING        2          /* started to connect */
355 #define IBNAL_CONN_ESTABLISHED       3          /* connection established */
356 #define IBNAL_CONN_DEATHROW          4          /* waiting to be closed */
357 #define IBNAL_CONN_ZOMBIE            5          /* waiting to be freed */
358
359 typedef struct kib_peer
360 {
361         struct list_head    ibp_list;           /* stash on global peer list */
362         struct list_head    ibp_connd_list;     /* schedule on kib_connd_peers */
363         ptl_nid_t           ibp_nid;            /* who's on the other end(s) */
364         atomic_t            ibp_refcount;       /* # users */
365         int                 ibp_persistence;    /* "known" peer refs */
366         struct list_head    ibp_conns;          /* all active connections */
367         struct list_head    ibp_tx_queue;       /* msgs waiting for a conn */
368         int                 ibp_connecting;     /* connecting+accepting */
369         unsigned long       ibp_reconnect_time; /* when reconnect may be attempted */
370         unsigned long       ibp_reconnect_interval; /* exponential backoff */
371 } kib_peer_t;
372
373
374 extern lib_nal_t       kibnal_lib;
375 extern kib_data_t      kibnal_data;
376 extern kib_tunables_t  kibnal_tunables;
377
378 static inline struct list_head *
379 kibnal_nid2peerlist (ptl_nid_t nid) 
380 {
381         unsigned int hash = ((unsigned int)nid) % kibnal_data.kib_peer_hash_size;
382         
383         return (&kibnal_data.kib_peers [hash]);
384 }
385
386 static inline int
387 kibnal_peer_active(kib_peer_t *peer)
388 {
389         /* Am I in the peer hash table? */
390         return (!list_empty(&peer->ibp_list));
391 }
392
393 static inline void
394 kibnal_queue_tx_locked (kib_tx_t *tx, kib_conn_t *conn)
395 {
396         /* CAVEAT EMPTOR: tx takes caller's ref on conn */
397
398         LASSERT (tx->tx_nsp > 0);               /* work items set up */
399         LASSERT (tx->tx_conn == NULL);          /* only set here */
400
401         tx->tx_conn = conn;
402         tx->tx_deadline = jiffies + kibnal_tunables.kib_io_timeout * HZ;
403         list_add_tail(&tx->tx_list, &conn->ibc_tx_queue);
404 }
405
406 #define KIBNAL_SERVICE_KEY_MASK  (IB_SA_SERVICE_COMP_MASK_NAME |        \
407                                   IB_SA_SERVICE_COMP_MASK_DATA8_1 |     \
408                                   IB_SA_SERVICE_COMP_MASK_DATA8_2 |     \
409                                   IB_SA_SERVICE_COMP_MASK_DATA8_3 |     \
410                                   IB_SA_SERVICE_COMP_MASK_DATA8_4 |     \
411                                   IB_SA_SERVICE_COMP_MASK_DATA8_5 |     \
412                                   IB_SA_SERVICE_COMP_MASK_DATA8_6 |     \
413                                   IB_SA_SERVICE_COMP_MASK_DATA8_7 |     \
414                                   IB_SA_SERVICE_COMP_MASK_DATA8_8)
415
416 static inline __u64*
417 kibnal_service_nid_field(struct ib_common_attrib_service *srv)
418 {
419         /* must be consistent with KIBNAL_SERVICE_KEY_MASK */
420         return (__u64 *)srv->service_data8;
421 }
422
423
424 static inline void
425 kibnal_set_service_keys(struct ib_common_attrib_service *srv, ptl_nid_t nid)
426 {
427         LASSERT (strlen (IBNAL_SERVICE_NAME) < sizeof(srv->service_name));
428         memset (srv->service_name, 0, sizeof(srv->service_name));
429         strcpy (srv->service_name, IBNAL_SERVICE_NAME);
430
431         *kibnal_service_nid_field(srv) = cpu_to_le64(nid);
432 }
433
434 #if 0
435 static inline void
436 kibnal_show_rdma_attr (kib_conn_t *conn)
437 {
438         struct ib_qp_attribute qp_attr;
439         int                    rc;
440         
441         memset (&qp_attr, 0, sizeof(qp_attr));
442         rc = ib_qp_query(conn->ibc_qp, &qp_attr);
443         if (rc != 0) {
444                 CERROR ("Can't get qp attrs: %d\n", rc);
445                 return;
446         }
447         
448         CWARN ("RDMA CAPABILITY: write %s read %s\n",
449                (qp_attr.valid_fields & TS_IB_QP_ATTRIBUTE_RDMA_ATOMIC_ENABLE) ?
450                (qp_attr.enable_rdma_write ? "enabled" : "disabled") : "invalid",
451                (qp_attr.valid_fields & TS_IB_QP_ATTRIBUTE_RDMA_ATOMIC_ENABLE) ?
452                (qp_attr.enable_rdma_read ? "enabled" : "disabled") : "invalid");
453 }
454 #endif
455
456 static inline __u64
457 kibnal_page2phys (struct page *p)
458 {
459         return page_to_phys(p);
460 }
461
462 /* CAVEAT EMPTOR:
463  * We rely on tx/rx descriptor alignment to allow us to use the lowest bit
464  * of the work request id as a flag to determine if the completion is for a
465  * transmit or a receive.  It seems that that the CQ entry's 'op' field
466  * isn't always set correctly on completions that occur after QP teardown. */
467
468 static inline __u64
469 kibnal_ptr2wreqid (void *ptr, int isrx)
470 {
471         unsigned long lptr = (unsigned long)ptr;
472
473         LASSERT ((lptr & 1) == 0);
474         return (__u64)(lptr | (isrx ? 1 : 0));
475 }
476
477 static inline void *
478 kibnal_wreqid2ptr (__u64 wreqid)
479 {
480         return (void *)(((unsigned long)wreqid) & ~1UL);
481 }
482
483 static inline int
484 kibnal_wreqid_is_rx (__u64 wreqid)
485 {
486         return (wreqid & 1) != 0;
487 }
488
489 extern kib_peer_t *kibnal_create_peer (ptl_nid_t nid);
490 extern void kibnal_put_peer (kib_peer_t *peer);
491 extern int kibnal_del_peer (ptl_nid_t nid, int single_share);
492 extern kib_peer_t *kibnal_find_peer_locked (ptl_nid_t nid);
493 extern void kibnal_unlink_peer_locked (kib_peer_t *peer);
494 extern int  kibnal_close_stale_conns_locked (kib_peer_t *peer, 
495                                               __u64 incarnation);
496 extern kib_conn_t *kibnal_create_conn (void);
497 extern void kibnal_put_conn (kib_conn_t *conn);
498 extern void kibnal_destroy_conn (kib_conn_t *conn);
499 extern int kibnal_alloc_pages (kib_pages_t **pp, int npages, int access);
500 extern void kibnal_free_pages (kib_pages_t *p);
501
502 extern void kibnal_check_sends (kib_conn_t *conn);
503
504 extern tTS_IB_CM_CALLBACK_RETURN
505 kibnal_conn_callback (tTS_IB_CM_EVENT event, tTS_IB_CM_COMM_ID cid,
506                        void *param, void *arg);
507 extern tTS_IB_CM_CALLBACK_RETURN 
508 kibnal_passive_conn_callback (tTS_IB_CM_EVENT event, tTS_IB_CM_COMM_ID cid,
509                                void *param, void *arg);
510
511 extern void kibnal_close_conn_locked (kib_conn_t *conn, int error);
512 extern void kibnal_destroy_conn (kib_conn_t *conn);
513 extern int  kibnal_thread_start (int (*fn)(void *arg), void *arg);
514 extern int  kibnal_scheduler(void *arg);
515 extern int  kibnal_connd (void *arg);
516 extern void kibnal_callback (struct ib_cq *cq, struct ib_cq_entry *e, void *arg);
517 extern void kibnal_init_tx_msg (kib_tx_t *tx, int type, int body_nob);
518 extern int  kibnal_close_conn (kib_conn_t *conn, int why);
519 extern void kibnal_start_active_rdma (int type, int status, 
520                                       kib_rx_t *rx, lib_msg_t *libmsg, 
521                                       unsigned int niov, 
522                                       struct iovec *iov, ptl_kiov_t *kiov,
523                                       int offset, int nob);
524
525
526
527
528