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

Function check_modules

dpdk/usertools/dpdk-devbind.py:146–163  ·  view source on GitHub ↗

Checks that igb_uio is loaded

()

Source from the content-addressed store, hash-verified

144
145
146def check_modules():
147 '''Checks that igb_uio is loaded'''
148 global dpdk_drivers
149
150 # list of supported modules
151 mods = [{"Name": driver, "Found": False} for driver in dpdk_drivers]
152
153 # first check if module is loaded
154 for mod in mods:
155 if module_is_loaded(mod["Name"]):
156 mod["Found"] = True
157
158 # check if we have at least one loaded module
159 if True not in [mod["Found"] for mod in mods] and b_flag is not None:
160 print("Warning: no supported DPDK kernel modules are loaded", file=sys.stderr)
161
162 # change DPDK driver list to only contain drivers that are loaded
163 dpdk_drivers = [mod["Name"] for mod in mods if mod["Found"]]
164
165
166def has_driver(dev_id):

Callers 1

mainFunction · 0.85

Calls 2

module_is_loadedFunction · 0.85
printFunction · 0.50

Tested by

no test coverage detected