DPDK patches and discussions
 help / color / mirror / Atom feed
From: "lihuisong (C)" <lihuisong@huawei.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: <dev@dpdk.org>, <andrew.rybchenko@oktetlabs.ru>,
	<thomas@monjalon.net>, <ferruh.yigit@xilinx.com>,
	<huangdaode@huawei.com>, <liudongdong3@huawei.com>
Subject: Re: [PATCH] usertools: fix bind failure from dpdk to kernel
Date: Thu, 11 Aug 2022 10:10:03 +0800	[thread overview]
Message-ID: <ef9ec41e-d753-3a7d-0a91-c29cf2d908a8@huawei.com> (raw)
In-Reply-To: <20220810064959.008fdb01@hermes.local>


在 2022/8/10 21:49, Stephen Hemminger 写道:
> On Wed, 10 Aug 2022 08:59:15 +0300
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
>
>> On 09/08/2022 14:44, lihuisong (C) wrote:
>>> 在 2022/8/5 23:35, Stephen Hemminger 写道:
>>>> On Fri, 5 Aug 2022 11:10:22 +0800
>>>> Huisong Li <lihuisong@huawei.com> wrote:
>>>>   
>>>>> Currently, the steps for binding device from dpdk driver to kernel
>>>>> driver is as follows:
>>>>> echo $BDF > /sys/bus/pci/drivers/vfio-pci/unbind
>>>>> echo $BDF > /sys/bus/pci/drivers/$kernel_driver/bind
>>>>>
>>>>> This steps cannot bind device from dpdk driver to kernel driver on
>>>>> platform with kernel 5.19. The 'driver_override' must be specify
>>>>> kernel driver before binding device to kernel driver.
>>>>>
>>>>> Fixes: 720b7a058260 ("usertools: fix device binding with kernel tools")
>>>>> Cc: stable@dpdk.org
>>>>>
>>>>> Signed-off-by: Huisong Li <lihuisong@huawei.com>
>>>> Not sure exactly what you did and why.
>>>> The patch seems to just remove the check that the driver
>>>> is in the set of dpdk_drivers.
>>>> .
>>> Currently, the end of the operation binding device from kernel driver to
>>> dpdk driver write '\00' to driver_override file so as to this device can
>>> be bound to any other driver.
>> This could have work but this was not the way to use the
>> driver_override. The kernel ABI document clearly states:
>> "and  may be cleared with an empty string (echo > driver_override)."
>> Documentation/ABI/testing/sysfs-bus-pci
>>
>> Please use the kernel ABI how it is described. Using it in wrong way
>> might sometimes work, sometimes not.
> No, the kernel ABI is what ever worked before.
> The documentation is not the definitive standard.
> .

Before:
Writing "\0" or "\n" to driver_override file can clear
'driver_override' in the pci_dev.

Now(5.19 kernel):
Only "\n" can clear 'driver_override'.
Note: for 'echo > driver_override', the 'buf'
in driver_override_store() is equal to "\n".


      reply	other threads:[~2022-08-11  2:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05  3:10 Huisong Li
2022-08-05 15:35 ` Stephen Hemminger
2022-08-09 11:44   ` lihuisong (C)
2022-08-09 17:58     ` Stephen Hemminger
2022-08-10  6:02       ` Krzysztof Kozlowski
2022-08-10 13:50         ` Stephen Hemminger
2022-08-10  5:59     ` Krzysztof Kozlowski
2022-08-10 13:49       ` Stephen Hemminger
2022-08-11  2:10         ` lihuisong (C) [this message]

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=ef9ec41e-d753-3a7d-0a91-c29cf2d908a8@huawei.com \
    --to=lihuisong@huawei.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@xilinx.com \
    --cc=huangdaode@huawei.com \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=liudongdong3@huawei.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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).