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

Function dev_allowed

dpdk/drivers/bus/platform/platform.c:56–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56static bool
57dev_allowed(const char *dev_name)
58{
59 struct rte_devargs *devargs;
60
61 devargs = dev_devargs(dev_name);
62 if (devargs == NULL)
63 return true;
64
65 switch (platform_bus.bus.conf.scan_mode) {
66 case RTE_BUS_SCAN_UNDEFINED:
67 case RTE_BUS_SCAN_ALLOWLIST:
68 if (devargs->policy == RTE_DEV_ALLOWED)
69 return true;
70 break;
71 case RTE_BUS_SCAN_BLOCKLIST:
72 if (devargs->policy == RTE_DEV_BLOCKED)
73 return false;
74 break;
75 }
76
77 return true;
78}
79
80static int
81dev_add(const char *dev_name)

Callers 2

platform_bus_scanFunction · 0.85
platform_bus_plugFunction · 0.85

Calls 1

dev_devargsFunction · 0.85

Tested by

no test coverage detected