DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Yongxin Liu <yongxin.liu@windriver.com>,
	dev@dpdk.org, thomas@monjalon.net
Subject: Re: [dpdk-dev] [PATCH v2] usertools/devbind: fix binding for built-in 1kernel drivers
Date: Wed, 18 Nov 2020 16:27:32 +0000	[thread overview]
Message-ID: <e08d1b6a-1567-46b1-c291-d0b66207ea5a@intel.com> (raw)
In-Reply-To: <20201118025854.13455-1-yongxin.liu@windriver.com>

On 18-Nov-20 2:58 AM, Yongxin Liu wrote:
> In commit 681a67288655 ("usertools: check if module is loaded before
> binding"), script will exit if no driver is found in /sys/module/.
> 
> However, for built-in kernel driver, /sys/module/MODULENAME only
> shows up if it has a version or at least one parameter. Take ixgbe
> for example, after kernel commit 34a2a3b83e2c ("net/intel: remove
> driver versions from Intel drivers"), and if ixgbe is built directly
> into kernel, there is no ixgbe folder in /sys/module. So the devbind
> script should not exit.
> 
> Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com>
> ---
> 
> v2:
>   - fix git commit description style in commit log
>   - fix typo spelling
> 
> ---
>   usertools/dpdk-devbind.py | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
> index 99112b7ab..f3c0d9814 100755
> --- a/usertools/dpdk-devbind.py
> +++ b/usertools/dpdk-devbind.py
> @@ -530,10 +530,6 @@ def bind_all(dev_list, driver, force=False):
>           # driver generated error - it's not a valid device ID, so all is well
>           pass
>   
> -    # check if we're attempting to bind to a driver that isn't loaded
> -    if not module_is_loaded(driver.replace('-','_')):
> -        sys.exit("Error: Driver '%s' is not loaded." % driver)
> -

I believe there is a way to check if module is built-in, can't we use 
that? We could keep a list of built-in modules of interest that we can 
get from:

cat /lib/modules/$(uname -r)/modules.builtin

It's a bit more changes, but this is better than just removing the error 
check.

>       try:
>           dev_list = map(dev_id_from_dev_name, dev_list)
>       except ValueError as ex:
> 


-- 
Thanks,
Anatoly

  reply	other threads:[~2020-11-18 16:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-18  2:58 Yongxin Liu
2020-11-18 16:27 ` Burakov, Anatoly [this message]
2020-11-19  7:24   ` Liu, Yongxin
2020-11-19  7:16 ` [dpdk-dev] [PATCH v3] usertools/devbind: fix binding for built-in kernel drivers Yongxin Liu
2020-11-19 12:18   ` Burakov, Anatoly
2020-11-20  2:30     ` Liu, Yongxin
2020-11-20  2:22 ` [dpdk-dev] [PATCH v4] " Yongxin Liu
2020-11-20 10:49   ` Burakov, Anatoly
2020-11-20 11:38   ` Burakov, Anatoly
2020-11-23  3:05 ` [dpdk-dev] [PATCH v5] " Yongxin Liu
2020-12-03  8:25   ` Liu, Yongxin
2021-02-11 10:43     ` Burakov, Anatoly
2021-02-11 22:19       ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e08d1b6a-1567-46b1-c291-d0b66207ea5a@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    --cc=yongxin.liu@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).