X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=usertools%2Fdpdk-devbind.py;h=98bd1b7e4da189be04604a0cb7c68aba48796127;hb=e863fe3a13da89787fdf3b5c590101a3c0f10af6;hp=054ad2e1cfbd2a330cf4cde8758a5753c1fc5c37;hpb=0a3f92cd3e7996026283532b81dde58a7841d870;p=dpdk.git diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index 054ad2e1cf..98bd1b7e4d 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-devbind.py @@ -7,6 +7,7 @@ import sys import os import subprocess import argparse +import platform from glob import glob from os.path import exists, basename @@ -107,7 +108,17 @@ def module_is_loaded(module): loaded_modules = sysfs_mods - return module in sysfs_mods + # add built-in modules as loaded + release = platform.uname().release + filename = os.path.join("/lib/modules/", release, "modules.builtin") + if os.path.exists(filename): + try: + with open(filename) as f: + loaded_modules += [os.path.splitext(os.path.basename(mod))[0] for mod in f] + except IOError: + print("Warning: cannot read list of built-in kernel modules") + + return module in loaded_modules def check_modules(): @@ -634,7 +645,8 @@ To bind 0000:02:00.0 and 0000:02:00.1 to the ixgbe kernel driver parser.add_argument( '--status-dev', help="Print the status of given device group.", - choices=['net', 'baseband', 'crypto', 'event', 'mempool', 'compress']) + choices=['baseband', 'compress', 'crypto', 'event', + 'mempool', 'misc', 'net', 'regex']) bind_group = parser.add_mutually_exclusive_group() bind_group.add_argument( '-b',