Whamcloud - gitweb
b357c7792e16334246ace3b16d56ef66b36eb73d
[fs/lustre-release.git] / lustre / ptlrpc / events.c
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  *  Copyright (c) 2002, 2003 Cluster File Systems, Inc.
5  *
6  *   This file is part of Lustre, http://www.lustre.org.
7  *
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.
11  *
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.
16  *
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.
20  *
21  */
22
23 #define DEBUG_SUBSYSTEM S_RPC
24
25 #ifdef __KERNEL__
26 #include <linux/module.h>
27 #else
28 #include <liblustre.h>
29 #endif
30 #include <linux/obd_class.h>
31 #include <linux/lustre_net.h>
32 #include "ptlrpc_internal.h"
33
34 #if !defined(__KERNEL__) && CRAY_PORTALS
35 /* forward ref in events.c */
36 static void cray_portals_callback(ptl_event_t *ev);
37 #endif
38
39
40 struct ptlrpc_ni  ptlrpc_interfaces[8];
41 int               ptlrpc_ninterfaces;
42
43 /*  
44  *  Client's outgoing request callback
45  */
46 void request_out_callback(ptl_event_t *ev)
47 {
48         struct ptlrpc_cb_id   *cbid = ev->md.user_ptr;
49         struct ptlrpc_request *req = cbid->cbid_arg;
50         unsigned long          flags;
51         ENTRY;
52
53         LASSERT (ev->type == PTL_EVENT_SEND_END ||
54                  ev->type == PTL_EVENT_UNLINK);
55         LASSERT (ev->unlinked);
56
57         DEBUG_REQ((ev->ni_fail_type == PTL_NI_OK) ? D_NET : D_ERROR, req,
58                   "type %d, status %d", ev->type, ev->ni_fail_type);
59
60         if (ev->type == PTL_EVENT_UNLINK ||
61             ev->ni_fail_type != PTL_NI_OK) {
62
63                 /* Failed send: make it seem like the reply timed out, just
64                  * like failing sends in client.c does currently...  */
65
66                 spin_lock_irqsave(&req->rq_lock, flags);
67                 req->rq_net_err = 1;
68                 spin_unlock_irqrestore(&req->rq_lock, flags);
69                 
70                 ptlrpc_wake_client_req(req);
71         }
72
73         /* this balances the atomic_inc in ptl_send_rpc() */
74         ptlrpc_req_finished(req);
75         EXIT;
76 }
77
78 /*
79  * Client's incoming reply callback
80  */
81 void reply_in_callback(ptl_event_t *ev)
82 {
83         struct ptlrpc_cb_id   *cbid = ev->md.user_ptr;
84         struct ptlrpc_request *req = cbid->cbid_arg;
85         unsigned long flags;
86         ENTRY;
87
88         LASSERT (ev->type == PTL_EVENT_PUT_END ||
89                  ev->type == PTL_EVENT_UNLINK);
90         LASSERT (ev->unlinked);
91         LASSERT (ev->md.start == req->rq_repmsg);
92         LASSERT (ev->offset == 0);
93         LASSERT (ev->mlength <= req->rq_replen);
94         
95         DEBUG_REQ((ev->ni_fail_type == PTL_NI_OK) ? D_NET : D_ERROR, req,
96                   "type %d, status %d", ev->type, ev->ni_fail_type);
97
98         spin_lock_irqsave (&req->rq_lock, flags);
99
100         LASSERT (req->rq_receiving_reply);
101         req->rq_receiving_reply = 0;
102
103         if (ev->type == PTL_EVENT_PUT_END &&
104             ev->ni_fail_type == PTL_NI_OK) {
105                 req->rq_replied = 1;
106                 req->rq_nob_received = ev->mlength;
107         }
108
109         /* NB don't unlock till after wakeup; req can disappear under us
110          * since we don't have our own ref */
111         ptlrpc_wake_client_req(req);
112
113         spin_unlock_irqrestore (&req->rq_lock, flags);
114         EXIT;
115 }
116
117 /* 
118  * Client's bulk has been written/read
119  */
120 void client_bulk_callback (ptl_event_t *ev)
121 {
122         struct ptlrpc_cb_id     *cbid = ev->md.user_ptr;
123         struct ptlrpc_bulk_desc *desc = cbid->cbid_arg;
124         unsigned long            flags;
125         ENTRY;
126
127         LASSERT ((desc->bd_type == BULK_PUT_SINK && 
128                   ev->type == PTL_EVENT_PUT_END) ||
129                  (desc->bd_type == BULK_GET_SOURCE &&
130                   ev->type == PTL_EVENT_GET_END) ||
131                  ev->type == PTL_EVENT_UNLINK);
132         LASSERT (ev->unlinked);
133
134         CDEBUG((ev->ni_fail_type == PTL_NI_OK) ? D_NET : D_ERROR,
135                "event type %d, status %d, desc %p\n", 
136                ev->type, ev->ni_fail_type, desc);
137
138         spin_lock_irqsave (&desc->bd_lock, flags);
139
140         LASSERT(desc->bd_network_rw);
141         desc->bd_network_rw = 0;
142
143         if (ev->type != PTL_EVENT_UNLINK &&
144             ev->ni_fail_type == PTL_NI_OK) {
145                 desc->bd_success = 1;
146                 desc->bd_nob_transferred = ev->mlength;
147         }
148
149         /* NB don't unlock till after wakeup; desc can disappear under us
150          * otherwise */
151         ptlrpc_wake_client_req(desc->bd_req);
152
153         spin_unlock_irqrestore (&desc->bd_lock, flags);
154         EXIT;
155 }
156
157 /* 
158  * Server's incoming request callback
159  */
160 void request_in_callback(ptl_event_t *ev)
161 {
162         struct ptlrpc_cb_id               *cbid = ev->md.user_ptr;
163         struct ptlrpc_request_buffer_desc *rqbd = cbid->cbid_arg;
164         struct ptlrpc_srv_ni              *srv_ni = rqbd->rqbd_srv_ni;
165         struct ptlrpc_service             *service = srv_ni->sni_service;
166         struct ptlrpc_request             *req;
167         char                              str[PTL_NALFMT_SIZE];
168         unsigned long                     flags;
169         ENTRY;
170
171         LASSERT (ev->type == PTL_EVENT_PUT_END ||
172                  ev->type == PTL_EVENT_UNLINK);
173         LASSERT ((char *)ev->md.start >= rqbd->rqbd_buffer);
174         LASSERT ((char *)ev->md.start + ev->offset + ev->mlength <=
175                  rqbd->rqbd_buffer + service->srv_buf_size);
176
177         CDEBUG((ev->ni_fail_type == PTL_OK) ? D_NET : D_ERROR,
178                "event type %d, status %d, service %s\n", 
179                ev->type, ev->ni_fail_type, service->srv_name);
180
181         if (ev->unlinked) {
182                 /* If this is the last request message to fit in the
183                  * request buffer we can use the request object embedded in
184                  * rqbd.  Note that if we failed to allocate a request,
185                  * we'd have to re-post the rqbd, which we can't do in this
186                  * context. */
187                 req = &rqbd->rqbd_req;
188                 memset(req, 0, sizeof (*req));
189         } else {
190                 LASSERT (ev->type == PTL_EVENT_PUT_END);
191                 if (ev->ni_fail_type != PTL_NI_OK) {
192                         /* We moaned above already... */
193                         return;
194                 }
195                 OBD_ALLOC_GFP(req, sizeof(*req), GFP_ATOMIC);
196                 if (req == NULL) {
197                         CERROR("Can't allocate incoming request descriptor: "
198                                "Dropping %s RPC from %s\n",
199                                service->srv_name, 
200                                portals_id2str(srv_ni->sni_ni->pni_number,
201                                               ev->initiator, str));
202                         return;
203                 }
204         }
205
206         /* NB we ABSOLUTELY RELY on req being zeroed, so pointers are NULL,
207          * flags are reset and scalars are zero.  We only set the message
208          * size to non-zero if this was a successful receive. */
209         req->rq_xid = ev->match_bits;
210         req->rq_reqmsg = ev->md.start + ev->offset;
211         if (ev->type == PTL_EVENT_PUT_END &&
212             ev->ni_fail_type == PTL_NI_OK)
213                 req->rq_reqlen = ev->mlength;
214         do_gettimeofday(&req->rq_arrival_time);
215         req->rq_peer.peer_id = ev->initiator;
216         req->rq_peer.peer_ni = rqbd->rqbd_srv_ni->sni_ni;
217         ptlrpc_id2str(&req->rq_peer, req->rq_peerstr);
218         req->rq_rqbd = rqbd;
219         
220         spin_lock_irqsave (&service->srv_lock, flags);
221
222         if (ev->unlinked) {
223                 srv_ni->sni_nrqbd_receiving--;
224                 if (ev->type != PTL_EVENT_UNLINK &&
225                     srv_ni->sni_nrqbd_receiving == 0) {
226                         /* This service is off-air on this interface because
227                          * all its request buffers are busy.  Portals will
228                          * start dropping incoming requests until more buffers
229                          * get posted.  NB don't moan if it's because we're
230                          * tearing down the service. */
231                         CWARN("All %s %s request buffers busy\n",
232                               service->srv_name, srv_ni->sni_ni->pni_name);
233                 }
234                 /* req takes over the network's ref on rqbd */
235         } else {
236                 /* req takes a ref on rqbd */
237                 rqbd->rqbd_refcount++;
238         }
239
240         list_add_tail(&req->rq_list, &service->srv_request_queue);
241         service->srv_n_queued_reqs++;
242
243         /* NB everything can disappear under us once the request
244          * has been queued and we unlock, so do the wake now... */
245         wake_up(&service->srv_waitq);
246
247         spin_unlock_irqrestore(&service->srv_lock, flags);
248         EXIT;
249 }
250
251 /*  
252  *  Server's outgoing reply callback
253  */
254 void reply_out_callback(ptl_event_t *ev)
255 {
256         struct ptlrpc_cb_id       *cbid = ev->md.user_ptr;
257         struct ptlrpc_reply_state *rs = cbid->cbid_arg;
258         struct ptlrpc_srv_ni      *sni = rs->rs_srv_ni;
259         struct ptlrpc_service     *svc = sni->sni_service;
260         unsigned long              flags;
261         ENTRY;
262
263         LASSERT (ev->type == PTL_EVENT_SEND_END ||
264                  ev->type == PTL_EVENT_ACK ||
265                  ev->type == PTL_EVENT_UNLINK);
266
267         if (!rs->rs_difficult) {
268                 /* I'm totally responsible for freeing "easy" replies */
269                 LASSERT (ev->unlinked);
270                 lustre_free_reply_state (rs);
271                 atomic_dec (&svc->srv_outstanding_replies);
272                 EXIT;
273                 return;
274         }
275
276         LASSERT (rs->rs_on_net);
277
278         if (ev->unlinked) {
279                 /* Last network callback */
280                 spin_lock_irqsave (&svc->srv_lock, flags);
281                 rs->rs_on_net = 0;
282                 ptlrpc_schedule_difficult_reply (rs);
283                 spin_unlock_irqrestore (&svc->srv_lock, flags);
284         }
285
286         EXIT;
287 }
288
289 /*
290  * Server's bulk completion callback
291  */
292 void server_bulk_callback (ptl_event_t *ev)
293 {
294         struct ptlrpc_cb_id     *cbid = ev->md.user_ptr;
295         struct ptlrpc_bulk_desc *desc = cbid->cbid_arg;
296         unsigned long            flags;
297         ENTRY;
298
299         LASSERT (ev->type == PTL_EVENT_SEND_END ||
300                  ev->type == PTL_EVENT_UNLINK ||
301                  (desc->bd_type == BULK_PUT_SOURCE &&
302                   ev->type == PTL_EVENT_ACK) ||
303                  (desc->bd_type == BULK_GET_SINK &&
304                   ev->type == PTL_EVENT_REPLY_END));
305
306         CDEBUG((ev->ni_fail_type == PTL_NI_OK) ? D_NET : D_ERROR,
307                "event type %d, status %d, desc %p\n", 
308                ev->type, ev->ni_fail_type, desc);
309
310         spin_lock_irqsave (&desc->bd_lock, flags);
311         
312         if ((ev->type == PTL_EVENT_ACK ||
313              ev->type == PTL_EVENT_REPLY_END) &&
314             ev->ni_fail_type == PTL_NI_OK) {
315                 /* We heard back from the peer, so even if we get this
316                  * before the SENT event (oh yes we can), we know we
317                  * read/wrote the peer buffer and how much... */
318                 desc->bd_success = 1;
319                 desc->bd_nob_transferred = ev->mlength;
320         }
321
322         if (ev->unlinked) {
323                 /* This is the last callback no matter what... */
324                 desc->bd_network_rw = 0;
325                 wake_up(&desc->bd_waitq);
326         }
327
328         spin_unlock_irqrestore (&desc->bd_lock, flags);
329         EXIT;
330 }
331
332 static void ptlrpc_master_callback(ptl_event_t *ev)
333 {
334         struct ptlrpc_cb_id *cbid = ev->md.user_ptr;
335         void (*callback)(ptl_event_t *ev) = cbid->cbid_fn;
336
337         /* Honestly, it's best to find out early. */
338         LASSERT (cbid->cbid_arg != LP_POISON);
339         LASSERT (callback == request_out_callback ||
340                  callback == reply_in_callback ||
341                  callback == client_bulk_callback ||
342                  callback == request_in_callback ||
343                  callback == reply_out_callback ||
344                  callback == server_bulk_callback);
345         
346         callback (ev);
347 }
348
349 int ptlrpc_uuid_to_peer (struct obd_uuid *uuid, struct ptlrpc_peer *peer)
350 {
351         struct ptlrpc_ni   *pni;
352         __u32               peer_nal;
353         ptl_nid_t           peer_nid;
354         int                 i;
355         char                str[PTL_NALFMT_SIZE];
356         int                 rc = lustre_uuid_to_peer(uuid->uuid, 
357                                                      &peer_nal, &peer_nid);
358         if (rc != 0)
359                 RETURN (rc);
360
361         for (i = 0; i < ptlrpc_ninterfaces; i++) {
362                 pni = &ptlrpc_interfaces[i];
363
364                 if (pni->pni_number == peer_nal) {
365                         peer->peer_id.nid = peer_nid;
366                         peer->peer_id.pid = LUSTRE_SRV_PTL_PID;
367                         peer->peer_ni = pni;
368                         return (0);
369                 }
370         }
371
372         CERROR("Can't find ptlrpc interface for NAL %x, NID %s\n",
373                peer_nal, portals_nid2str(peer_nal, peer_nid, str));
374         return (-ENOENT);
375 }
376
377 void ptlrpc_ni_fini(struct ptlrpc_ni *pni)
378 {
379         wait_queue_head_t   waitq;
380         struct l_wait_info  lwi;
381         int                 rc;
382         int                 retries;
383         
384         /* Wait for the event queue to become idle since there may still be
385          * messages in flight with pending events (i.e. the fire-and-forget
386          * messages == client requests and "non-difficult" server
387          * replies */
388
389         for (retries = 0;; retries++) {
390                 rc = PtlEQFree(pni->pni_eq_h);
391                 switch (rc) {
392                 default:
393                         LBUG();
394
395                 case PTL_OK:
396                         PtlNIFini(pni->pni_ni_h);
397                         return;
398                         
399                 case PTL_EQ_IN_USE:
400                         if (retries != 0)
401                                 CWARN("Event queue for %s still busy\n",
402                                       pni->pni_name);
403                         
404                         /* Wait for a bit */
405                         init_waitqueue_head(&waitq);
406                         lwi = LWI_TIMEOUT(2*HZ, NULL, NULL);
407                         l_wait_event(waitq, 0, &lwi);
408                         break;
409                 }
410         }
411         /* notreached */
412 }
413
414 ptl_pid_t ptl_get_pid(void)
415 {
416         ptl_pid_t        pid;
417
418 #ifndef  __KERNEL__
419         pid = getpid();
420 #else
421         pid = LUSTRE_SRV_PTL_PID;
422 #endif
423         return pid;
424 }
425         
426 int ptlrpc_ni_init(int number, char *name, struct ptlrpc_ni *pni)
427 {
428         int              rc;
429         char             str[20];
430         ptl_handle_ni_t  nih;
431         ptl_pid_t        pid;
432         
433         pid = ptl_get_pid();
434         
435         /* We're not passing any limits yet... */
436         rc = PtlNIInit(number, pid, NULL, NULL, &nih);
437         if (rc != PTL_OK && rc != PTL_IFACE_DUP) {
438                 CDEBUG (D_NET, "Can't init network interface %s: %d\n", 
439                         name, rc);
440                 return (-ENOENT);
441         }
442
443         CDEBUG(D_NET, "My pid is: %x\n", ptl_get_pid());
444         
445         PtlSnprintHandle(str, sizeof(str), nih);
446         CDEBUG (D_NET, "init %x %s: %s\n", number, name, str);
447
448         pni->pni_name = name;
449         pni->pni_number = number;
450         pni->pni_ni_h = nih;
451
452         pni->pni_eq_h = PTL_INVALID_HANDLE;
453
454         /* CAVEAT EMPTOR: how we process portals events is _radically_
455          * different depending on... */
456 #ifdef __KERNEL__
457         /* kernel portals calls our master callback when events are added to
458          * the event queue.  In fact lustre never pulls events off this queue,
459          * so it's only sized for some debug history. */
460         rc = PtlEQAlloc(pni->pni_ni_h, 1024, ptlrpc_master_callback,
461                         &pni->pni_eq_h);
462 #else
463         /* liblustre calls the master callback when it removes events from the
464          * event queue.  The event queue has to be big enough not to drop
465          * anything */
466 # if CRAY_PORTALS
467         /* cray portals implements a non-standard callback to notify us there
468          * are buffered events even when the app is not doing a filesystem
469          * call. */
470         rc = PtlEQAlloc(pni->pni_ni_h, 10240, cray_portals_callback,
471                         &pni->pni_eq_h);
472 # else
473         rc = PtlEQAlloc(pni->pni_ni_h, 10240, PTL_EQ_HANDLER_NONE,
474                         &pni->pni_eq_h);
475 # endif
476 #endif
477         if (rc != PTL_OK)
478                 GOTO (fail, rc = -ENOMEM);
479
480         return (0);
481  fail:
482         CERROR ("Failed to initialise network interface %s: %d\n",
483                 name, rc);
484
485         /* OK to do complete teardown since we invalidated the handles above */
486         ptlrpc_ni_fini (pni);
487         return (rc);
488 }
489
490 #ifndef __KERNEL__
491 LIST_HEAD(liblustre_wait_callbacks);
492 void *liblustre_services_callback;
493
494 void *
495 liblustre_register_wait_callback (int (*fn)(void *arg), void *arg)
496 {
497         struct liblustre_wait_callback *llwc;
498         
499         OBD_ALLOC(llwc, sizeof(*llwc));
500         LASSERT (llwc != NULL);
501         
502         llwc->llwc_fn = fn;
503         llwc->llwc_arg = arg;
504         list_add_tail(&llwc->llwc_list, &liblustre_wait_callbacks);
505         
506         return (llwc);
507 }
508
509 void
510 liblustre_deregister_wait_callback (void *opaque)
511 {
512         struct liblustre_wait_callback *llwc = opaque;
513         
514         list_del(&llwc->llwc_list);
515         OBD_FREE(llwc, sizeof(*llwc));
516 }
517
518 int
519 liblustre_check_events (int timeout)
520 {
521         ptl_event_t ev;
522         int         rc;
523         int         i;
524         ENTRY;
525
526         rc = PtlEQPoll(&ptlrpc_interfaces[0].pni_eq_h, 1, timeout * 1000,
527                        &ev, &i);
528         if (rc == PTL_EQ_EMPTY)
529                 RETURN(0);
530         
531         LASSERT (rc == PTL_EQ_DROPPED || rc == PTL_OK);
532         
533         /* liblustre: no asynch callback so we can't affort to miss any
534          * events... */
535         if (rc == PTL_EQ_DROPPED) {
536                 CERROR ("Dropped an event!!!\n");
537                 abort();
538         }
539         
540         ptlrpc_master_callback (&ev);
541         RETURN(1);
542 }
543
544 int liblustre_waiting = 0;
545
546 int
547 liblustre_wait_event (int timeout)
548 {
549         struct list_head               *tmp;
550         struct liblustre_wait_callback *llwc;
551         int                             found_something = 0;
552
553         /* single threaded recursion check... */
554         liblustre_waiting = 1;
555
556         for (;;) {
557                 /* Deal with all pending events */
558                 while (liblustre_check_events(0))
559                         found_something = 1;
560
561                 /* Give all registered callbacks a bite at the cherry */
562                 list_for_each(tmp, &liblustre_wait_callbacks) {
563                         llwc = list_entry(tmp, struct liblustre_wait_callback, 
564                                           llwc_list);
565                 
566                         if (llwc->llwc_fn(llwc->llwc_arg))
567                                 found_something = 1;
568                 }
569
570                 if (found_something || timeout == 0)
571                         break;
572
573                 /* Nothing so far, but I'm allowed to block... */
574                 found_something = liblustre_check_events(timeout);
575                 if (!found_something)           /* still nothing */
576                         break;                  /* I timed out */
577         }
578
579         liblustre_waiting = 0;
580
581         return found_something;
582 }
583
584 #if CRAY_PORTALS
585 static void cray_portals_callback(ptl_event_t *ev)
586 {
587         /* We get a callback from the client Cray portals implementation
588          * whenever anyone calls PtlEQPoll(), and an event queue with a
589          * callback handler has outstanding events.
590          *
591          * If it's not liblustre calling PtlEQPoll(), this lets us know we
592          * have outstanding events which we handle with
593          * liblustre_wait_event().
594          *
595          * Otherwise, we're already eagerly consuming events and we'd
596          * handle events out of order if we recursed. */
597         if (!liblustre_waiting)
598                 liblustre_wait_event(0);
599 }
600 #endif
601 #endif /* __KERNEL__ */
602
603 int ptlrpc_default_nal(void)
604 {
605         if (ptlrpc_ninterfaces == 0)
606                 return (-ENOENT);
607
608         return (ptlrpc_interfaces[0].pni_number);
609 }
610
611 int ptlrpc_init_portals(void)
612 {
613         /* Add new portals network interfaces here.
614          * Order is irrelevent! */
615         static struct {
616                 int   number;
617                 char *name;
618         } ptl_nis[] = {
619 #if !CRAY_PORTALS
620                 {QSWNAL,    "qswnal"},
621                 {SOCKNAL,   "socknal"},
622                 {GMNAL,     "gmnal"},
623                 {OPENIBNAL, "openibnal"},
624                 {IIBNAL,    "iibnal"},
625                 {TCPNAL,    "tcpnal"},
626 #else
627                 {CRAY_KB_ERNAL, "cray_kb_ernal"},
628 #endif
629         };
630         int   rc;
631         int   i;
632
633         LASSERT(ptlrpc_ninterfaces == 0);
634
635         for (i = 0; i < sizeof (ptl_nis) / sizeof (ptl_nis[0]); i++) {
636                 LASSERT(ptlrpc_ninterfaces < (sizeof(ptlrpc_interfaces) /
637                                               sizeof(ptlrpc_interfaces[0])));
638
639                 rc = ptlrpc_ni_init(ptl_nis[i].number, ptl_nis[i].name,
640                                     &ptlrpc_interfaces[ptlrpc_ninterfaces]);
641                 if (rc == 0)
642                         ptlrpc_ninterfaces++;
643         }
644
645         if (ptlrpc_ninterfaces == 0) {
646                 CERROR("network initialisation failed: is a NAL module "
647                        "loaded?\n");
648                 return -EIO;
649         }
650 #ifndef __KERNEL__
651         liblustre_services_callback = 
652                 liblustre_register_wait_callback(&liblustre_check_services, NULL);
653 #endif
654         return 0;
655 }
656
657 void ptlrpc_exit_portals(void)
658 {
659 #ifndef __KERNEL__
660         liblustre_deregister_wait_callback(liblustre_services_callback);
661 #endif
662         while (ptlrpc_ninterfaces > 0)
663                 ptlrpc_ni_fini (&ptlrpc_interfaces[--ptlrpc_ninterfaces]);
664 }