[dpdk-stable] patch 'usertools: fix binding built-in kernel driver' has been queued to stable release 20.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Sat Feb 13 00:40:50 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/80fd7ccdb4f7586f6dc865b531a490e82e88a041

Thanks.

Luca Boccassi

---
>From 80fd7ccdb4f7586f6dc865b531a490e82e88a041 Mon Sep 17 00:00:00 2001
From: Yongxin Liu <yongxin.liu at windriver.com>
Date: Mon, 23 Nov 2020 11:05:33 +0800
Subject: [PATCH] usertools: fix binding built-in kernel driver

[ upstream commit 7a016af4aa6bd2f8425b4fb2d59e5dd19f12bceb ]

A driver can be loaded as a dynamic module or a built-in module.
In commit 681a67288655 ("usertools: check if module is loaded
before binding"), the script only checks modules in /sys/module/.

However, for built-in kernel driver, it only shows up in /sys/module/,
if it has a version or at least one parameter. So add check for
modules in /lib/modules/$(uname -r)/modules.builtin.

Fixes: 681a67288655 ("usertools: check if module is loaded before binding")

Signed-off-by: Yongxin Liu <yongxin.liu at windriver.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
 usertools/dpdk-devbind.py | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
index c2ede3d4df..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():
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-12 23:40:10.087911818 +0000
+++ 0006-usertools-fix-binding-built-in-kernel-driver.patch	2021-02-12 23:40:09.879090655 +0000
@@ -1 +1 @@
-From 7a016af4aa6bd2f8425b4fb2d59e5dd19f12bceb Mon Sep 17 00:00:00 2001
+From 80fd7ccdb4f7586f6dc865b531a490e82e88a041 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7a016af4aa6bd2f8425b4fb2d59e5dd19f12bceb ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list