]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - net/sunrpc/xprtrdma/frwr_ops.c
xprtrdma: Do not leak an MW during a DMA map failure
[karo-tx-linux.git] / net / sunrpc / xprtrdma / frwr_ops.c
1 /*
2  * Copyright (c) 2015 Oracle.  All rights reserved.
3  * Copyright (c) 2003-2007 Network Appliance, Inc. All rights reserved.
4  */
5
6 /* Lightweight memory registration using Fast Registration Work
7  * Requests (FRWR). Also referred to sometimes as FRMR mode.
8  *
9  * FRWR features ordered asynchronous registration and deregistration
10  * of arbitrarily sized memory regions. This is the fastest and safest
11  * but most complex memory registration mode.
12  */
13
14 /* Normal operation
15  *
16  * A Memory Region is prepared for RDMA READ or WRITE using a FAST_REG
17  * Work Request (frmr_op_map). When the RDMA operation is finished, this
18  * Memory Region is invalidated using a LOCAL_INV Work Request
19  * (frmr_op_unmap).
20  *
21  * Typically these Work Requests are not signaled, and neither are RDMA
22  * SEND Work Requests (with the exception of signaling occasionally to
23  * prevent provider work queue overflows). This greatly reduces HCA
24  * interrupt workload.
25  *
26  * As an optimization, frwr_op_unmap marks MRs INVALID before the
27  * LOCAL_INV WR is posted. If posting succeeds, the MR is placed on
28  * rb_mws immediately so that no work (like managing a linked list
29  * under a spinlock) is needed in the completion upcall.
30  *
31  * But this means that frwr_op_map() can occasionally encounter an MR
32  * that is INVALID but the LOCAL_INV WR has not completed. Work Queue
33  * ordering prevents a subsequent FAST_REG WR from executing against
34  * that MR while it is still being invalidated.
35  */
36
37 /* Transport recovery
38  *
39  * ->op_map and the transport connect worker cannot run at the same
40  * time, but ->op_unmap can fire while the transport connect worker
41  * is running. Thus MR recovery is handled in ->op_map, to guarantee
42  * that recovered MRs are owned by a sending RPC, and not one where
43  * ->op_unmap could fire at the same time transport reconnect is
44  * being done.
45  *
46  * When the underlying transport disconnects, MRs are left in one of
47  * three states:
48  *
49  * INVALID:     The MR was not in use before the QP entered ERROR state.
50  *              (Or, the LOCAL_INV WR has not completed or flushed yet).
51  *
52  * STALE:       The MR was being registered or unregistered when the QP
53  *              entered ERROR state, and the pending WR was flushed.
54  *
55  * VALID:       The MR was registered before the QP entered ERROR state.
56  *
57  * When frwr_op_map encounters STALE and VALID MRs, they are recovered
58  * with ib_dereg_mr and then are re-initialized. Beause MR recovery
59  * allocates fresh resources, it is deferred to a workqueue, and the
60  * recovered MRs are placed back on the rb_mws list when recovery is
61  * complete. frwr_op_map allocates another MR for the current RPC while
62  * the broken MR is reset.
63  *
64  * To ensure that frwr_op_map doesn't encounter an MR that is marked
65  * INVALID but that is about to be flushed due to a previous transport
66  * disconnect, the transport connect worker attempts to drain all
67  * pending send queue WRs before the transport is reconnected.
68  */
69
70 #include "xprt_rdma.h"
71
72 #if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
73 # define RPCDBG_FACILITY        RPCDBG_TRANS
74 #endif
75
76 static int
77 __frwr_init(struct rpcrdma_mw *r, struct ib_pd *pd, unsigned int depth)
78 {
79         struct rpcrdma_frmr *f = &r->frmr;
80         int rc;
81
82         f->fr_mr = ib_alloc_mr(pd, IB_MR_TYPE_MEM_REG, depth);
83         if (IS_ERR(f->fr_mr))
84                 goto out_mr_err;
85
86         r->mw_sg = kcalloc(depth, sizeof(*r->mw_sg), GFP_KERNEL);
87         if (!r->mw_sg)
88                 goto out_list_err;
89
90         sg_init_table(r->mw_sg, depth);
91         init_completion(&f->fr_linv_done);
92         return 0;
93
94 out_mr_err:
95         rc = PTR_ERR(f->fr_mr);
96         dprintk("RPC:       %s: ib_alloc_mr status %i\n",
97                 __func__, rc);
98         return rc;
99
100 out_list_err:
101         rc = -ENOMEM;
102         dprintk("RPC:       %s: sg allocation failure\n",
103                 __func__);
104         ib_dereg_mr(f->fr_mr);
105         return rc;
106 }
107
108 static void
109 __frwr_release(struct rpcrdma_mw *r)
110 {
111         int rc;
112
113         rc = ib_dereg_mr(r->frmr.fr_mr);
114         if (rc)
115                 pr_err("rpcrdma: final ib_dereg_mr for %p returned %i\n",
116                        r, rc);
117         kfree(r->mw_sg);
118 }
119
120 static int
121 __frwr_reset_mr(struct rpcrdma_ia *ia, struct rpcrdma_mw *r)
122 {
123         struct rpcrdma_frmr *f = &r->frmr;
124         int rc;
125
126         rc = ib_dereg_mr(f->fr_mr);
127         if (rc) {
128                 pr_warn("rpcrdma: ib_dereg_mr status %d, frwr %p orphaned\n",
129                         rc, r);
130                 return rc;
131         }
132
133         f->fr_mr = ib_alloc_mr(ia->ri_pd, IB_MR_TYPE_MEM_REG,
134                                ia->ri_max_frmr_depth);
135         if (IS_ERR(f->fr_mr)) {
136                 pr_warn("rpcrdma: ib_alloc_mr status %ld, frwr %p orphaned\n",
137                         PTR_ERR(f->fr_mr), r);
138                 return PTR_ERR(f->fr_mr);
139         }
140
141         dprintk("RPC:       %s: recovered FRMR %p\n", __func__, r);
142         f->fr_state = FRMR_IS_INVALID;
143         return 0;
144 }
145
146 /* Reset of a single FRMR. Generate a fresh rkey by replacing the MR.
147  *
148  * There's no recovery if this fails. The FRMR is abandoned, but
149  * remains in rb_all. It will be cleaned up when the transport is
150  * destroyed.
151  */
152 static void
153 frwr_op_recover_mr(struct rpcrdma_mw *mw)
154 {
155         struct rpcrdma_xprt *r_xprt = mw->mw_xprt;
156         struct rpcrdma_ia *ia = &r_xprt->rx_ia;
157         int rc;
158
159         rc = __frwr_reset_mr(ia, mw);
160         ib_dma_unmap_sg(ia->ri_device, mw->mw_sg, mw->mw_nents, mw->mw_dir);
161         if (rc) {
162                 pr_err("rpcrdma: FRMR reset status %d, %p orphaned\n",
163                        rc, mw);
164                 r_xprt->rx_stats.mrs_orphaned++;
165                 return;
166         }
167
168         rpcrdma_put_mw(r_xprt, mw);
169         r_xprt->rx_stats.mrs_recovered++;
170 }
171
172 static int
173 frwr_op_open(struct rpcrdma_ia *ia, struct rpcrdma_ep *ep,
174              struct rpcrdma_create_data_internal *cdata)
175 {
176         int depth, delta;
177
178         ia->ri_max_frmr_depth =
179                         min_t(unsigned int, RPCRDMA_MAX_DATA_SEGS,
180                               ia->ri_device->attrs.max_fast_reg_page_list_len);
181         dprintk("RPC:       %s: device's max FR page list len = %u\n",
182                 __func__, ia->ri_max_frmr_depth);
183
184         /* Add room for frmr register and invalidate WRs.
185          * 1. FRMR reg WR for head
186          * 2. FRMR invalidate WR for head
187          * 3. N FRMR reg WRs for pagelist
188          * 4. N FRMR invalidate WRs for pagelist
189          * 5. FRMR reg WR for tail
190          * 6. FRMR invalidate WR for tail
191          * 7. The RDMA_SEND WR
192          */
193         depth = 7;
194
195         /* Calculate N if the device max FRMR depth is smaller than
196          * RPCRDMA_MAX_DATA_SEGS.
197          */
198         if (ia->ri_max_frmr_depth < RPCRDMA_MAX_DATA_SEGS) {
199                 delta = RPCRDMA_MAX_DATA_SEGS - ia->ri_max_frmr_depth;
200                 do {
201                         depth += 2; /* FRMR reg + invalidate */
202                         delta -= ia->ri_max_frmr_depth;
203                 } while (delta > 0);
204         }
205
206         ep->rep_attr.cap.max_send_wr *= depth;
207         if (ep->rep_attr.cap.max_send_wr > ia->ri_device->attrs.max_qp_wr) {
208                 cdata->max_requests = ia->ri_device->attrs.max_qp_wr / depth;
209                 if (!cdata->max_requests)
210                         return -EINVAL;
211                 ep->rep_attr.cap.max_send_wr = cdata->max_requests *
212                                                depth;
213         }
214
215         rpcrdma_set_max_header_sizes(ia, cdata, max_t(unsigned int, 1,
216                                                       RPCRDMA_MAX_DATA_SEGS /
217                                                       ia->ri_max_frmr_depth));
218         return 0;
219 }
220
221 /* FRWR mode conveys a list of pages per chunk segment. The
222  * maximum length of that list is the FRWR page list depth.
223  */
224 static size_t
225 frwr_op_maxpages(struct rpcrdma_xprt *r_xprt)
226 {
227         struct rpcrdma_ia *ia = &r_xprt->rx_ia;
228
229         return min_t(unsigned int, RPCRDMA_MAX_DATA_SEGS,
230                      RPCRDMA_MAX_HDR_SEGS * ia->ri_max_frmr_depth);
231 }
232
233 static void
234 __frwr_sendcompletion_flush(struct ib_wc *wc, struct rpcrdma_frmr *frmr,
235                             const char *wr)
236 {
237         frmr->fr_state = FRMR_IS_STALE;
238         if (wc->status != IB_WC_WR_FLUSH_ERR)
239                 pr_err("rpcrdma: %s: %s (%u/0x%x)\n",
240                        wr, ib_wc_status_msg(wc->status),
241                        wc->status, wc->vendor_err);
242 }
243
244 /**
245  * frwr_wc_fastreg - Invoked by RDMA provider for each polled FastReg WC
246  * @cq: completion queue (ignored)
247  * @wc: completed WR
248  *
249  */
250 static void
251 frwr_wc_fastreg(struct ib_cq *cq, struct ib_wc *wc)
252 {
253         struct rpcrdma_frmr *frmr;
254         struct ib_cqe *cqe;
255
256         /* WARNING: Only wr_cqe and status are reliable at this point */
257         if (wc->status != IB_WC_SUCCESS) {
258                 cqe = wc->wr_cqe;
259                 frmr = container_of(cqe, struct rpcrdma_frmr, fr_cqe);
260                 __frwr_sendcompletion_flush(wc, frmr, "fastreg");
261         }
262 }
263
264 /**
265  * frwr_wc_localinv - Invoked by RDMA provider for each polled LocalInv WC
266  * @cq: completion queue (ignored)
267  * @wc: completed WR
268  *
269  */
270 static void
271 frwr_wc_localinv(struct ib_cq *cq, struct ib_wc *wc)
272 {
273         struct rpcrdma_frmr *frmr;
274         struct ib_cqe *cqe;
275
276         /* WARNING: Only wr_cqe and status are reliable at this point */
277         if (wc->status != IB_WC_SUCCESS) {
278                 cqe = wc->wr_cqe;
279                 frmr = container_of(cqe, struct rpcrdma_frmr, fr_cqe);
280                 __frwr_sendcompletion_flush(wc, frmr, "localinv");
281         }
282 }
283
284 /**
285  * frwr_wc_localinv - Invoked by RDMA provider for each polled LocalInv WC
286  * @cq: completion queue (ignored)
287  * @wc: completed WR
288  *
289  * Awaken anyone waiting for an MR to finish being fenced.
290  */
291 static void
292 frwr_wc_localinv_wake(struct ib_cq *cq, struct ib_wc *wc)
293 {
294         struct rpcrdma_frmr *frmr;
295         struct ib_cqe *cqe;
296
297         /* WARNING: Only wr_cqe and status are reliable at this point */
298         cqe = wc->wr_cqe;
299         frmr = container_of(cqe, struct rpcrdma_frmr, fr_cqe);
300         if (wc->status != IB_WC_SUCCESS)
301                 __frwr_sendcompletion_flush(wc, frmr, "localinv");
302         complete_all(&frmr->fr_linv_done);
303 }
304
305 static int
306 frwr_op_init(struct rpcrdma_xprt *r_xprt)
307 {
308         struct rpcrdma_buffer *buf = &r_xprt->rx_buf;
309         unsigned int depth = r_xprt->rx_ia.ri_max_frmr_depth;
310         struct ib_pd *pd = r_xprt->rx_ia.ri_pd;
311         int i;
312
313         spin_lock_init(&buf->rb_mwlock);
314         INIT_LIST_HEAD(&buf->rb_mws);
315         INIT_LIST_HEAD(&buf->rb_all);
316
317         i = max_t(int, RPCRDMA_MAX_DATA_SEGS / depth, 1);
318         i += 2;                         /* head + tail */
319         i *= buf->rb_max_requests;      /* one set for each RPC slot */
320         dprintk("RPC:       %s: initalizing %d FRMRs\n", __func__, i);
321
322         while (i--) {
323                 struct rpcrdma_mw *r;
324                 int rc;
325
326                 r = kzalloc(sizeof(*r), GFP_KERNEL);
327                 if (!r)
328                         return -ENOMEM;
329
330                 rc = __frwr_init(r, pd, depth);
331                 if (rc) {
332                         kfree(r);
333                         return rc;
334                 }
335
336                 r->mw_xprt = r_xprt;
337                 list_add(&r->mw_list, &buf->rb_mws);
338                 list_add(&r->mw_all, &buf->rb_all);
339         }
340
341         return 0;
342 }
343
344 /* Post a REG_MR Work Request to register a memory region
345  * for remote access via RDMA READ or RDMA WRITE.
346  */
347 static int
348 frwr_op_map(struct rpcrdma_xprt *r_xprt, struct rpcrdma_mr_seg *seg,
349             int nsegs, bool writing)
350 {
351         struct rpcrdma_ia *ia = &r_xprt->rx_ia;
352         struct rpcrdma_mr_seg *seg1 = seg;
353         struct rpcrdma_mw *mw;
354         struct rpcrdma_frmr *frmr;
355         struct ib_mr *mr;
356         struct ib_reg_wr *reg_wr;
357         struct ib_send_wr *bad_wr;
358         int rc, i, n, dma_nents;
359         u8 key;
360
361         mw = seg1->rl_mw;
362         seg1->rl_mw = NULL;
363         do {
364                 if (mw)
365                         rpcrdma_defer_mr_recovery(mw);
366                 mw = rpcrdma_get_mw(r_xprt);
367                 if (!mw)
368                         return -ENOMEM;
369         } while (mw->frmr.fr_state != FRMR_IS_INVALID);
370         frmr = &mw->frmr;
371         frmr->fr_state = FRMR_IS_VALID;
372         mr = frmr->fr_mr;
373         reg_wr = &frmr->fr_regwr;
374
375         if (nsegs > ia->ri_max_frmr_depth)
376                 nsegs = ia->ri_max_frmr_depth;
377         for (i = 0; i < nsegs;) {
378                 if (seg->mr_page)
379                         sg_set_page(&mw->mw_sg[i],
380                                     seg->mr_page,
381                                     seg->mr_len,
382                                     offset_in_page(seg->mr_offset));
383                 else
384                         sg_set_buf(&mw->mw_sg[i], seg->mr_offset,
385                                    seg->mr_len);
386
387                 ++seg;
388                 ++i;
389
390                 /* Check for holes */
391                 if ((i < nsegs && offset_in_page(seg->mr_offset)) ||
392                     offset_in_page((seg-1)->mr_offset + (seg-1)->mr_len))
393                         break;
394         }
395         mw->mw_nents = i;
396         mw->mw_dir = rpcrdma_data_dir(writing);
397
398         dma_nents = ib_dma_map_sg(ia->ri_device,
399                                   mw->mw_sg, mw->mw_nents, mw->mw_dir);
400         if (!dma_nents)
401                 goto out_dmamap_err;
402
403         n = ib_map_mr_sg(mr, mw->mw_sg, mw->mw_nents, NULL, PAGE_SIZE);
404         if (unlikely(n != mw->mw_nents))
405                 goto out_mapmr_err;
406
407         dprintk("RPC:       %s: Using frmr %p to map %u segments (%u bytes)\n",
408                 __func__, mw, mw->mw_nents, mr->length);
409
410         key = (u8)(mr->rkey & 0x000000FF);
411         ib_update_fast_reg_key(mr, ++key);
412
413         reg_wr->wr.next = NULL;
414         reg_wr->wr.opcode = IB_WR_REG_MR;
415         frmr->fr_cqe.done = frwr_wc_fastreg;
416         reg_wr->wr.wr_cqe = &frmr->fr_cqe;
417         reg_wr->wr.num_sge = 0;
418         reg_wr->wr.send_flags = 0;
419         reg_wr->mr = mr;
420         reg_wr->key = mr->rkey;
421         reg_wr->access = writing ?
422                          IB_ACCESS_REMOTE_WRITE | IB_ACCESS_LOCAL_WRITE :
423                          IB_ACCESS_REMOTE_READ;
424
425         DECR_CQCOUNT(&r_xprt->rx_ep);
426         rc = ib_post_send(ia->ri_id->qp, &reg_wr->wr, &bad_wr);
427         if (rc)
428                 goto out_senderr;
429
430         seg1->rl_mw = mw;
431         seg1->mr_rkey = mr->rkey;
432         seg1->mr_base = mr->iova;
433         seg1->mr_nsegs = mw->mw_nents;
434         seg1->mr_len = mr->length;
435
436         return mw->mw_nents;
437
438 out_dmamap_err:
439         pr_err("rpcrdma: failed to dma map sg %p sg_nents %u\n",
440                mw->mw_sg, mw->mw_nents);
441         rpcrdma_defer_mr_recovery(mw);
442         return -ENOMEM;
443
444 out_mapmr_err:
445         pr_err("rpcrdma: failed to map mr %p (%u/%u)\n",
446                frmr->fr_mr, n, mw->mw_nents);
447         rc = n < 0 ? n : -EIO;
448         rpcrdma_defer_mr_recovery(mw);
449         return rc;
450
451 out_senderr:
452         rpcrdma_defer_mr_recovery(mw);
453         return rc;
454 }
455
456 static struct ib_send_wr *
457 __frwr_prepare_linv_wr(struct rpcrdma_mr_seg *seg)
458 {
459         struct rpcrdma_mw *mw = seg->rl_mw;
460         struct rpcrdma_frmr *f = &mw->frmr;
461         struct ib_send_wr *invalidate_wr;
462
463         f->fr_state = FRMR_IS_INVALID;
464         invalidate_wr = &f->fr_invwr;
465
466         memset(invalidate_wr, 0, sizeof(*invalidate_wr));
467         f->fr_cqe.done = frwr_wc_localinv;
468         invalidate_wr->wr_cqe = &f->fr_cqe;
469         invalidate_wr->opcode = IB_WR_LOCAL_INV;
470         invalidate_wr->ex.invalidate_rkey = f->fr_mr->rkey;
471
472         return invalidate_wr;
473 }
474
475 /* Invalidate all memory regions that were registered for "req".
476  *
477  * Sleeps until it is safe for the host CPU to access the
478  * previously mapped memory regions.
479  */
480 static void
481 frwr_op_unmap_sync(struct rpcrdma_xprt *r_xprt, struct rpcrdma_req *req)
482 {
483         struct ib_send_wr *invalidate_wrs, *pos, *prev, *bad_wr;
484         struct rpcrdma_ia *ia = &r_xprt->rx_ia;
485         struct rpcrdma_mr_seg *seg;
486         unsigned int i, nchunks;
487         struct rpcrdma_frmr *f;
488         struct rpcrdma_mw *mw;
489         int rc;
490
491         dprintk("RPC:       %s: req %p\n", __func__, req);
492
493         /* ORDER: Invalidate all of the req's MRs first
494          *
495          * Chain the LOCAL_INV Work Requests and post them with
496          * a single ib_post_send() call.
497          */
498         invalidate_wrs = pos = prev = NULL;
499         seg = NULL;
500         for (i = 0, nchunks = req->rl_nchunks; nchunks; nchunks--) {
501                 seg = &req->rl_segments[i];
502
503                 pos = __frwr_prepare_linv_wr(seg);
504
505                 if (!invalidate_wrs)
506                         invalidate_wrs = pos;
507                 else
508                         prev->next = pos;
509                 prev = pos;
510
511                 i += seg->mr_nsegs;
512         }
513         f = &seg->rl_mw->frmr;
514
515         /* Strong send queue ordering guarantees that when the
516          * last WR in the chain completes, all WRs in the chain
517          * are complete.
518          */
519         f->fr_invwr.send_flags = IB_SEND_SIGNALED;
520         f->fr_cqe.done = frwr_wc_localinv_wake;
521         reinit_completion(&f->fr_linv_done);
522         INIT_CQCOUNT(&r_xprt->rx_ep);
523
524         /* Transport disconnect drains the receive CQ before it
525          * replaces the QP. The RPC reply handler won't call us
526          * unless ri_id->qp is a valid pointer.
527          */
528         rc = ib_post_send(ia->ri_id->qp, invalidate_wrs, &bad_wr);
529         if (rc)
530                 goto reset_mrs;
531
532         wait_for_completion(&f->fr_linv_done);
533
534         /* ORDER: Now DMA unmap all of the req's MRs, and return
535          * them to the free MW list.
536          */
537 unmap:
538         for (i = 0, nchunks = req->rl_nchunks; nchunks; nchunks--) {
539                 seg = &req->rl_segments[i];
540                 mw = seg->rl_mw;
541                 seg->rl_mw = NULL;
542
543                 ib_dma_unmap_sg(ia->ri_device,
544                                 mw->mw_sg, mw->mw_nents, mw->mw_dir);
545                 rpcrdma_put_mw(r_xprt, mw);
546
547                 i += seg->mr_nsegs;
548                 seg->mr_nsegs = 0;
549         }
550
551         req->rl_nchunks = 0;
552         return;
553
554 reset_mrs:
555         pr_warn("%s: ib_post_send failed %i\n", __func__, rc);
556
557         /* Find and reset the MRs in the LOCAL_INV WRs that did not
558          * get posted. This is synchronous, and slow.
559          */
560         for (i = 0, nchunks = req->rl_nchunks; nchunks; nchunks--) {
561                 seg = &req->rl_segments[i];
562                 mw = seg->rl_mw;
563                 f = &mw->frmr;
564
565                 if (mw->frmr.fr_mr->rkey == bad_wr->ex.invalidate_rkey) {
566                         __frwr_reset_mr(ia, mw);
567                         bad_wr = bad_wr->next;
568                 }
569
570                 i += seg->mr_nsegs;
571         }
572         goto unmap;
573 }
574
575 /* Use a slow, safe mechanism to invalidate all memory regions
576  * that were registered for "req".
577  */
578 static void
579 frwr_op_unmap_safe(struct rpcrdma_xprt *r_xprt, struct rpcrdma_req *req,
580                    bool sync)
581 {
582         struct rpcrdma_mr_seg *seg;
583         struct rpcrdma_mw *mw;
584         unsigned int i;
585
586         for (i = 0; req->rl_nchunks; req->rl_nchunks--) {
587                 seg = &req->rl_segments[i];
588                 mw = seg->rl_mw;
589
590                 if (sync)
591                         frwr_op_recover_mr(mw);
592                 else
593                         rpcrdma_defer_mr_recovery(mw);
594
595                 i += seg->mr_nsegs;
596                 seg->mr_nsegs = 0;
597                 seg->rl_mw = NULL;
598         }
599 }
600
601 static void
602 frwr_op_destroy(struct rpcrdma_buffer *buf)
603 {
604         struct rpcrdma_mw *r;
605
606         while (!list_empty(&buf->rb_all)) {
607                 r = list_entry(buf->rb_all.next, struct rpcrdma_mw, mw_all);
608                 list_del(&r->mw_all);
609                 __frwr_release(r);
610                 kfree(r);
611         }
612 }
613
614 const struct rpcrdma_memreg_ops rpcrdma_frwr_memreg_ops = {
615         .ro_map                         = frwr_op_map,
616         .ro_unmap_sync                  = frwr_op_unmap_sync,
617         .ro_unmap_safe                  = frwr_op_unmap_safe,
618         .ro_recover_mr                  = frwr_op_recover_mr,
619         .ro_open                        = frwr_op_open,
620         .ro_maxpages                    = frwr_op_maxpages,
621         .ro_init                        = frwr_op_init,
622         .ro_destroy                     = frwr_op_destroy,
623         .ro_displayname                 = "frwr",
624 };