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 5FFD5A0C4D; Tue, 31 Aug 2021 18:37:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F33EA40686; Tue, 31 Aug 2021 18:37:57 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id DE3BA4067E for ; Tue, 31 Aug 2021 18:37:56 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 58DFC7F4FD; Tue, 31 Aug 2021 19:37:56 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 58DFC7F4FD DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1630427876; bh=Q8wZ+NW3m3Clh3PhVXGoSNOcArdAo1b5sXkTp+AOsW0=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=aJp7EQHqu3G7VDi6zCe3ZOaKndjOWm8IrfZZtiPHDpr1+sXAFTxmA8Okh7D/DO7uN bFtQucHhFr7svt+R7LdPjeFoebHozStYnrvR8n+Bf0W0nCvjCtt0r0CChZdjZylRLT xBFdsMZmxJG+Kq4RaguoulJfetEjc4t0h03To6hE= To: "Wang, Haiyue" , Ajit Khaparde , Somnath Kotur , "Daley, John" , Hyong Youb Kim , "Xing, Beilei" , "Yang, Qiming" , "Zhang, Qi Z" , Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko , Thomas Monjalon , "Yigit, Ferruh" Cc: "dev@dpdk.org" , Viacheslav Galaktionov References: <20210712161747.958019-1-andrew.rybchenko@oktetlabs.ru> <20210831160625.3463129-1-andrew.rybchenko@oktetlabs.ru> From: Andrew Rybchenko Organization: OKTET Labs Message-ID: <44f2ec6f-2bc9-d5e6-612b-8cb026f7986b@oktetlabs.ru> Date: Tue, 31 Aug 2021 19:37:56 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4] ethdev: fix representor port ID search by name 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 Sender: "dev" On 8/31/21 7:32 PM, Wang, Haiyue wrote: >> -----Original Message----- >> From: Andrew Rybchenko >> Sent: Wednesday, September 1, 2021 00:06 >> To: Ajit Khaparde ; Somnath Kotur ; Daley, >> John ; Hyong Youb Kim ; Xing, Beilei ; >> Yang, Qiming ; Zhang, Qi Z ; Wang, Haiyue >> ; Matan Azrad ; Shahaf Shuler ; >> Viacheslav Ovsiienko ; Thomas Monjalon ; Yigit, Ferruh >> >> Cc: dev@dpdk.org; Viacheslav Galaktionov >> Subject: [PATCH v4] ethdev: fix representor port ID search by name >> >> From: Viacheslav Galaktionov >> >> Getting a list of representors from a representor does not make sense. >> Instead, a parent device should be used. >> >> To this end, extend the rte_eth_dev_data structure to include the port ID >> of the backing device for representors. >> >> Signed-off-by: Viacheslav Galaktionov >> Signed-off-by: Andrew Rybchenko >> --- >> The new field is added into the hole in rte_eth_dev_data structure. >> The patch does not change ABI, but extra care is required since ABI >> check is disabled for the structure because of the libabigail bug [1]. >> >> Potentially it is bad for out-of-tree drivers which implement >> representors but do not fill in a new parert_port_id field in >> rte_eth_dev_data structure. Do we care? > > Set the `parent_port_id` to ' RTE_MAX_ETHPORTS' as an invalid port ID > in rte_eth_dev_allocate ? I like the idea. It should be safer this way. Many thanks.