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 2D8E5A0545; Thu, 11 Aug 2022 04:10:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BFE5940694; Thu, 11 Aug 2022 04:10:09 +0200 (CEST) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 2EC964068E for ; Thu, 11 Aug 2022 04:10:07 +0200 (CEST) Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4M39DG4wkNzlVyy; Thu, 11 Aug 2022 10:07:10 +0800 (CST) Received: from kwepemm600004.china.huawei.com (7.193.23.242) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 11 Aug 2022 10:10:05 +0800 Received: from [10.67.103.231] (10.67.103.231) by kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 11 Aug 2022 10:10:04 +0800 Message-ID: Date: Thu, 11 Aug 2022 10:10:03 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH] usertools: fix bind failure from dpdk to kernel To: Stephen Hemminger , Krzysztof Kozlowski CC: , , , , , References: <20220805031022.9795-1-lihuisong@huawei.com> <20220805083529.5ca3233e@hermes.local> <20220810064959.008fdb01@hermes.local> From: "lihuisong (C)" In-Reply-To: <20220810064959.008fdb01@hermes.local> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.231] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600004.china.huawei.com (7.193.23.242) X-CFilter-Loop: Reflected X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 在 2022/8/10 21:49, Stephen Hemminger 写道: > On Wed, 10 Aug 2022 08:59:15 +0300 > Krzysztof Kozlowski 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 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 >>>> 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".