Lines Matching refs:extmem
119 if (d->extmem == NULL) in nmport_extmem_cleanup()
122 nmreq_remove_option(&d->hdr, &d->extmem->nro_opt); in nmport_extmem_cleanup()
123 nmctx_free(d->ctx, d->extmem); in nmport_extmem_cleanup()
124 d->extmem = NULL; in nmport_extmem_cleanup()
140 if (d->extmem != NULL) { in nmport_extmem()
153 d->extmem = nmctx_malloc(ctx, sizeof(*d->extmem)); in nmport_extmem()
154 if (d->extmem == NULL) { in nmport_extmem()
160 memset(d->extmem, 0, sizeof(*d->extmem)); in nmport_extmem()
161 d->extmem->nro_usrptr = (uintptr_t)base; in nmport_extmem()
162 d->extmem->nro_opt.nro_reqtype = NETMAP_REQ_OPT_EXTMEM; in nmport_extmem()
163 d->extmem->nro_info.nr_memsize = size; in nmport_extmem()
164 nmreq_push_option(&d->hdr, &d->extmem->nro_opt); in nmport_extmem()
245 if (d->extmem == NULL) in nmport_extmem_getinfo()
247 return &d->extmem->nro_info; in nmport_extmem_getinfo()
312 NPOPT_DECL(extmem, 0)
313 NPKEY_DECL(extmem, file, NMREQ_OPTK_DEFAULT|NMREQ_OPTK_MUSTSET)
314 NPKEY_DECL(extmem, if_num, 0)
315 NPKEY_DECL(extmem, if_size, 0)
316 NPKEY_DECL(extmem, ring_num, 0)
317 NPKEY_DECL(extmem, ring_size, 0)
318 NPKEY_DECL(extmem, buf_num, 0)
319 NPKEY_DECL(extmem, buf_size, 0)
354 NPOPT_PARSER(extmem)(struct nmreq_parse_ctx *p) in NPOPT_PARSER() argument
362 if (nmport_extmem_from_file(d, nmport_key(p, extmem, file)) < 0) in NPOPT_PARSER()
365 pi = &d->extmem->nro_info; in NPOPT_PARSER()
367 for (i = 0; i < NPOPT_NRKEYS(extmem); i++) { in NPOPT_PARSER()
375 if (i == NPKEY_ID(extmem, if_num)) { in NPOPT_PARSER()
377 } else if (i == NPKEY_ID(extmem, if_size)) { in NPOPT_PARSER()
379 } else if (i == NPKEY_ID(extmem, ring_num)) { in NPOPT_PARSER()
381 } else if (i == NPKEY_ID(extmem, ring_size)) { in NPOPT_PARSER()
383 } else if (i == NPKEY_ID(extmem, buf_num)) { in NPOPT_PARSER()
385 } else if (i == NPKEY_ID(extmem, buf_size)) { in NPOPT_PARSER()
616 if (d->extmem != NULL) { in nmport_mmap()
617 m->mem = (void *)((uintptr_t)d->extmem->nro_usrptr); in nmport_mmap()
618 m->size = d->extmem->nro_info.nr_memsize; in nmport_mmap()
766 if (d->extmem != NULL && !d->register_done) { in nmport_clone()
787 c->extmem = NULL; in nmport_clone()