Lines Matching refs:extmem
117 if (d->extmem == NULL) in nmport_extmem_cleanup()
120 nmreq_remove_option(&d->hdr, &d->extmem->nro_opt); in nmport_extmem_cleanup()
121 nmctx_free(d->ctx, d->extmem); in nmport_extmem_cleanup()
122 d->extmem = NULL; in nmport_extmem_cleanup()
138 if (d->extmem != NULL) { in nmport_extmem()
151 d->extmem = nmctx_malloc(ctx, sizeof(*d->extmem)); in nmport_extmem()
152 if (d->extmem == NULL) { in nmport_extmem()
158 memset(d->extmem, 0, sizeof(*d->extmem)); in nmport_extmem()
159 d->extmem->nro_usrptr = (uintptr_t)base; in nmport_extmem()
160 d->extmem->nro_opt.nro_reqtype = NETMAP_REQ_OPT_EXTMEM; in nmport_extmem()
161 d->extmem->nro_info.nr_memsize = size; in nmport_extmem()
162 nmreq_push_option(&d->hdr, &d->extmem->nro_opt); in nmport_extmem()
244 if (d->extmem == NULL) in nmport_extmem_getinfo()
246 return &d->extmem->nro_info; in nmport_extmem_getinfo()
364 NPOPT_DECL(extmem, 0)
365 NPKEY_DECL(extmem, file, NMREQ_OPTK_DEFAULT|NMREQ_OPTK_MUSTSET)
366 NPKEY_DECL(extmem, if_num, 0)
367 NPKEY_DECL(extmem, if_size, 0)
368 NPKEY_DECL(extmem, ring_num, 0)
369 NPKEY_DECL(extmem, ring_size, 0)
370 NPKEY_DECL(extmem, buf_num, 0)
371 NPKEY_DECL(extmem, buf_size, 0)
409 NPOPT_PARSER(extmem)(struct nmreq_parse_ctx *p) in NPOPT_PARSER() argument
417 if (nmport_extmem_from_file(d, nmport_key(p, extmem, file)) < 0) in NPOPT_PARSER()
420 pi = &d->extmem->nro_info; in NPOPT_PARSER()
422 for (i = 0; i < NPOPT_NRKEYS(extmem); i++) { in NPOPT_PARSER()
430 if (i == NPKEY_ID(extmem, if_num)) { in NPOPT_PARSER()
432 } else if (i == NPKEY_ID(extmem, if_size)) { in NPOPT_PARSER()
434 } else if (i == NPKEY_ID(extmem, ring_num)) { in NPOPT_PARSER()
436 } else if (i == NPKEY_ID(extmem, ring_size)) { in NPOPT_PARSER()
438 } else if (i == NPKEY_ID(extmem, buf_num)) { in NPOPT_PARSER()
440 } else if (i == NPKEY_ID(extmem, buf_size)) { in NPOPT_PARSER()
688 if (d->extmem != NULL) { in nmport_mmap()
689 m->mem = (void *)((uintptr_t)d->extmem->nro_usrptr); in nmport_mmap()
690 m->size = d->extmem->nro_info.nr_memsize; in nmport_mmap()
838 if (d->extmem != NULL && !d->register_done) { in nmport_clone()
859 c->extmem = NULL; in nmport_clone()