MCPcopy Create free account
hub / github.com/F-Stack/f-stack / eal_parse_vfio_intr

Function eal_parse_vfio_intr

dpdk/lib/eal/linux/eal.c:511–533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

509}
510
511static int
512eal_parse_vfio_intr(const char *mode)
513{
514 struct internal_config *internal_conf =
515 eal_get_internal_configuration();
516 unsigned i;
517 static struct {
518 const char *name;
519 enum rte_intr_mode value;
520 } map[] = {
521 { "legacy", RTE_INTR_MODE_LEGACY },
522 { "msi", RTE_INTR_MODE_MSI },
523 { "msix", RTE_INTR_MODE_MSIX },
524 };
525
526 for (i = 0; i < RTE_DIM(map); i++) {
527 if (!strcmp(mode, map[i].name)) {
528 internal_conf->vfio_intr_mode = map[i].value;
529 return 0;
530 }
531 }
532 return -1;
533}
534
535static int
536eal_parse_vfio_vf_token(const char *vf_token)

Callers 1

eal_parse_argsFunction · 0.85

Calls 2

strcmpFunction · 0.85

Tested by

no test coverage detected