Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
	bhelgaas@google.com, gregkh@linuxfoundation.org,
	linux-pci@vger.kernel.org, regressions@lists.linux.dev
Subject: Re: [REGRESSION] changes to driver_override parsing broke DPDK script
Date: Wed, 10 Aug 2022 07:06:12 -0700	[thread overview]
Message-ID: <20220810070612.5860d673@hermes.local> (raw)
In-Reply-To: <af880c1a-cedd-181f-9b4d-2f1766312fc0@linaro.org>

On Wed, 10 Aug 2022 08:54:36 +0300
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> >> The script is sending single nul character to remove override
> >> and that no longer works.  
> 
> The sysfs API clearly states:
> "and
>  may be cleared with an empty string (echo > driver_override)."
> Documentation/ABI/testing/sysfs-bus-pci
> 
> Sending other data and expecting the same result is not conforming to
> API. Therefore we have usual example of some undocumented behavior which
> user-space started relying on and instead using API, user-space expect
> that undocumented behavior to be back.
> 
> Yay! I wonder what is the point to even describe the ABI if user-space
> can simply ignore it?
> 
> Best regards,
> Krzysztof

The code that does this in the python script is relatively old.
The writing of null was introduced back in 2017 by:

commit 720b7a058260dfd6ae0fcce956bfe44c18681499
Author: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Date:   Wed Apr 26 19:22:19 2017 +0530

    usertools: fix device binding with kernel tools
    
    The following sequence of operation gives error in binding devices
    1) Bind a device using dpdk-devbind.py
    2) Unbind the device using kernel tools(/sys/bus/pci/device/driver/unbind)
    3) Bind the device using kernel tools(/sys/bus/pci/driver/new_id and
    /sys/bus/pci/driver/bind)
    
    The bind failure was due to cached driver name in 'driver_override'.
    Fix it by writing 'null' to driver_override just after binding a
    device so that any method of binding/unbinding can be used.
    
    Fixes: 2fc350293570 ("usertools: use optimized driver override scheme to bind")
    
    Reported-by: Lijuan A Tu <lijuanx.a.tu@intel.com>
    Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>

  parent reply	other threads:[~2022-08-10 14:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09 18:29 [REGRESSION] changes to driver_override parsing broke DPDK script Stephen Hemminger
2022-08-09 19:21 ` Bjorn Helgaas
2022-08-10  5:54   ` Krzysztof Kozlowski
2022-08-10  6:11     ` Greg KH
2022-08-10  8:21       ` Greg KH
2022-08-12  1:48         ` Dongdong Liu
2022-08-12  2:54           ` lihuisong (C)
2022-08-12  5:46             ` Greg KH
2022-09-01 16:41               ` Greg KH
2022-08-10  6:13     ` Krzysztof Kozlowski
2022-08-10 14:03       ` Stephen Hemminger
2022-08-10 14:06     ` Stephen Hemminger [this message]
2022-08-10  5:45 ` Greg KH

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=20220810070612.5860d673@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=helgaas@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=regressions@lists.linux.dev \
    /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