From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 6A86B1B14F for ; Fri, 12 Oct 2018 09:45:44 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 7B839940069; Fri, 12 Oct 2018 07:45:42 +0000 (UTC) Received: from [192.168.38.17] (91.220.146.112) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 12 Oct 2018 08:45:35 +0100 To: Thomas Monjalon , CC: , , , , Jan Remes , Shahaf Shuler , Yongseok Koh References: <20180907230958.21402-1-thomas@monjalon.net> <20181011210251.7705-1-thomas@monjalon.net> <20181011210251.7705-3-thomas@monjalon.net> From: Andrew Rybchenko Message-ID: <14058760-a35c-c991-74c1-8a86b39df5b0@solarflare.com> Date: Fri, 12 Oct 2018 10:44:53 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20181011210251.7705-3-thomas@monjalon.net> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB X-Originating-IP: [91.220.146.112] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24150.003 X-TM-AS-Result: No-2.543700-8.000000-10 X-TMASE-MatchedRID: fgYTp5XatxYOwH4pD14DsPHkpkyUphL9uLwbhNl9B5X4JyR+b5tvoOln +pgUTqXBuIA/hwcjvFZuTK43U2r81q23CuWprcjSY1bQMCMvmn5zd7C7BtJobuf4lenff9ado8W MkQWv6iUD0yuKrQIMCD3Al4zalJpFWBd6ltyXuvs09eyR49FYjCP+fhKnXQ2REcZk2LehVv6fT3 RSgQFfHKf2ebZ45HFIRefQ/TgMm09WUJnm80C8cD2uIC5ImadiYKlLt3wGw33wHX5+Q8jjw1wur iZ3P6dErIJZJbQfMXRqaM5LmpUkwzunJXJz8X1QftwZ3X11IV0= X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--2.543700-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24150.003 X-MDID: 1539330343-eUyEtlZhy_vq Subject: Re: [dpdk-dev] [PATCH v4 2/4] drivers/bus: move driver assignment to end of probing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Oct 2018 07:45:44 -0000 Hi, Thomas, On 10/12/18 12:02 AM, Thomas Monjalon wrote: > The PCI mapping requires to know the PCI driver to use, > even before the probing is done. That's why the PCI driver is > referenced early inside the PCI device structure. See > commit 1d20a073fa5e ("bus/pci: reference driver structure before mapping") > > However the rte_driver does not need to be referenced in rte_device > before the device probing is done. > By moving back this assignment at the end of the device probing, > it becomes possible to make clear the status of a rte_device. > > Signed-off-by: Thomas Monjalon > Reviewed-by: Andrew Rybchenko Have you seen driver->name usage in drivers/net/szedata2/rte_eth_szedata2.c rte_szedata2_eth_dev_init() which is used from probe? It looks like drivers/net/mlx5/mlx5.c mlx5_pci_probe()->mlx5_dev_spawn()->mlx5_dev_to_port_id() goes to device->driver. Is the code OK with the move? I've added above drivers maintainers in CC.