From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 09E6A1B296 for ; Wed, 11 Jul 2018 12:15:13 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1-us4.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id C1221280053; Wed, 11 Jul 2018 10:15:11 +0000 (UTC) Received: from [192.168.1.16] (85.187.13.33) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Wed, 11 Jul 2018 11:15:05 +0100 To: Thomas Monjalon , Ivan Malov CC: , Ferruh Yigit , David Marchand References: <1531302573-16946-1-git-send-email-arybchenko@solarflare.com> <3175221.OSDE0iBHN2@xps> From: Andrew Rybchenko Message-ID: <058241bd-99a1-8553-b224-4f363a0bae79@solarflare.com> Date: Wed, 11 Jul 2018 13:15:00 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <3175221.OSDE0iBHN2@xps> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [85.187.13.33] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.100.1062-23960.003 X-TM-AS-Result: No--15.041300-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-MDID: 1531304112-DiJ9CMC4dhhl Subject: Re: [dpdk-dev] [PATCH] ethdev: fix port ID retrieval on vdev attach 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: Wed, 11 Jul 2018 10:15:13 -0000 On 11.07.2018 13:02, Thomas Monjalon wrote: > 11/07/2018 11:49, Andrew Rybchenko: >> From: Ivan Malov >> >> Attaching a vdev port may result in multiple >> ports actually added because a vdev port may >> have slave devices to be attached implicitly. >> >> Ethdev attach API has to fill in the port ID >> to be read back by the user and what it does >> is take the last assigned ID from the common >> list after attach completion. Such an ID may >> belong to a slave device and not to the vdev. >> >> This mistake must be precluded by requesting >> the port ID by name of device being attached. > No, the real issue is using this function rte_eth_dev_attach. > It is broken since day 1. > Mixing EAL devargs and ethdev port cannot work by design. > > If you want to attach a device, you must add it with > rte_eal_hotplug_add > and wait for the driver to probe the ports > (which can be ethdev or other classes). Yes, I totally agree. Doesn't it deserve to be fixed at least in stable? > We should take these actions in 18.08: > - deprecate rte_eth_dev_attach/rte_eth_dev_detach > - deprecate rte_eal_dev_attach/rte_eal_dev_detach > I did not take time to send the deprecation notices yet. > Feel free to deprecate these functions yourself. Should we deprecate it right now in 18.08 and schedule removal to 18.11? Or just add deprecation notice in 18.08, mark deprecated in 18.11 and remove later?