From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0B1A2A0547 for ; Sat, 13 Feb 2021 00:41:11 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 04E714068F; Sat, 13 Feb 2021 00:41:11 +0100 (CET) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mails.dpdk.org (Postfix) with ESMTP id 096874068F for ; Sat, 13 Feb 2021 00:41:10 +0100 (CET) Received: by mail-wr1-f44.google.com with SMTP id v1so1292272wrd.6 for ; Fri, 12 Feb 2021 15:41:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dyloHbBwl78ltThSbHvEWMpojWxbWpaMaAJ5cMwuwvs=; b=ArRPV723gfs+4v7XzQK8+4APky+ZiX1EoF547UGajIWrH8VmZAjDabUcp/AOFjFnB5 BURF/2ze8FkprSogR7okFVDo7Jfzs7UJJ3DXBjJQYOfs7otvGDQAeQ4gnB70Zrr9i20O vjO50ATMZav54sVKk3VtY4rYQNWjaJIn7BXBwdEgc/mkUFreH+8+BRurHayj19jJDQpN 6wRHLM2LqcOQbFRsZC9kisk05iq+w6RZOj6urhfzpC+RURrIDsf4MPYgfpHgAd9xAjGN 7iA0iziLoeIXEXVRAk+0RXQExpCYuJ8BRwgdWEO48BDAq4eGB64BsT6dk/7e7VCAatO9 5emg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dyloHbBwl78ltThSbHvEWMpojWxbWpaMaAJ5cMwuwvs=; b=CwAx3g7Qykzi2T2aD9LQtqzgqOMiOjBbQJtakl2ibPDHsZ/8eZv7ZGElt3Z9huri1u sz+L1V8TiUIBFvUWAzZKvHhB46kAC742fZwTNPHgxgXVBN5R+VSQLlCTIE/o0D5tR4yB LiJRs4HfDkHpiPVhHLiej3/MB5eyWJZ2NiLxvoCOiYIuPQ/mPYpJEx2+Vzd6uvbkpx2R SWXDUkZPu8HN0ZGJU7/K6faMafwWozdhNPukoL4UWPX7EjyVs4DQfXxDPt2yFAR7FpEv 0lI85gFOCu4iJJd9GMevwYm91EId0rMCBUrnbPRQ1NBOKvYUZdWPA8vtvrc3RhiK8dj/ XUrw== X-Gm-Message-State: AOAM532CRwTyW8e57wKPUQAPismolYY5YCYEKBY9BHnh6vizskvICbu7 N6Er/Bgr+YQc8JP3HvfgnEk= X-Google-Smtp-Source: ABdhPJxjEGcLWqmOOECMKaLSMj9zoWJ7Z9ki0TgtThG+KVRn7fHPX12aBzptsRx9elHTfuU1sI27Rw== X-Received: by 2002:a05:6000:188c:: with SMTP id a12mr6337726wri.105.1613173269868; Fri, 12 Feb 2021 15:41:09 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id u142sm16312327wmu.3.2021.02.12.15.41.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Feb 2021 15:41:09 -0800 (PST) From: luca.boccassi@gmail.com To: Yongxin Liu Cc: Anatoly Burakov , dpdk stable Date: Fri, 12 Feb 2021 23:40:50 +0000 Message-Id: <20210212234050.255787-6-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210212234050.255787-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> <20210212234050.255787-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'usertools: fix binding built-in kernel driver' has been queued to stable release 20.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 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 Reviewed-by: Anatoly Burakov --- 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@dpdk.org