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 976A643B01; Mon, 12 Feb 2024 17:24:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 15877402D0; Mon, 12 Feb 2024 17:24:34 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2053.outbound.protection.outlook.com [40.107.237.53]) by mails.dpdk.org (Postfix) with ESMTP id 55B2540279 for ; Mon, 12 Feb 2024 17:24:33 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fHyLUNfmFoZ9ry0a+q+Am+C/8WYCghjWiT6EJEbElC2w2ZJrGXGE7xuAL4T5NCt7pvMU/m1/bQqfbEP2eiE2bfWFVw0agmetqhCo02wKRYQm0wpoxV5Bf661nVfF1N5ZtCj77QWdyctEdFPJqGu9DJZxLpsrDvcT+6Q2fpiGJYdnfAZyc/i6Y4RxcFtuJYk8j33htwY+0k9dUyaHUcWWZELXa2/lwUr7BpbJtMyUEo8WEnf9beEVcQUiLGiMFEpEPja7OfCzNI4gBh9mbR00kmy7kxEkjCedzGPapHqGaL1HWk/pp3qHqy/TZ0H6cbK4iZ3v/qQsj5HWvKwOWuE44Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hgV/JoX6a9r128ecsnLwgmgGWRtZq4Rk90wcPbDD5xg=; b=WlDW13iu+B1ltZFF4F3AEkYu8Rw84m0yZT4zImccwCXMr7DpFsYwbEIovVcy7T3kxoCIaJBb723zcb11nqQ5whFs23CIgo1NWyzHopEnoXPrslLnjdAl3RZgOabcGDoMgLvke01/aXEI99x3wH1HItPr6ZsR4+v3Cx/5MYneoZSvEqb6Ny9sotv8Qb2QuKNN3evqwHGzpXTIs3M8wsR2SmDG/lHnksqedR7q6yZ2CTwqZhjwt9sHIbvkY5GCEYrUzanlDxEFwJ5PNTxI90HRYzs4pT4pGg9Y2vBKI+cs4ZRhOAGzt/MG9ap6/rr+W/wGVlcNZjJanp7Y8CcUVn802A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hgV/JoX6a9r128ecsnLwgmgGWRtZq4Rk90wcPbDD5xg=; b=tsnuYPEUG92kG51tf4XTS1Ub1eqIcYRR9NoFBlSWWliUOeTgMA09mUJQpGfW5s5SLQCvPNa4trVmBtO7azxSQKWxcnmeEDDgUOs1sFJXG1MApAnvY6V2lyiwh41QeDBSSEBib8NwVBmQ6dDr4CU765G/0N7V5aCcL29xqYm/2fU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by BL3PR12MB6428.namprd12.prod.outlook.com (2603:10b6:208:3b7::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.17; Mon, 12 Feb 2024 16:24:31 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3ec7:6339:1c14:c529]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3ec7:6339:1c14:c529%4]) with mapi id 15.20.7292.022; Mon, 12 Feb 2024 16:24:30 +0000 Message-ID: <67511718-8895-428a-bdc5-709044d9a5c2@amd.com> Date: Mon, 12 Feb 2024 16:24:26 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/4] net/nfp: add interface to check representor Content-Language: en-US To: Chaoyong He , dev@dpdk.org Cc: oss-drivers@corigine.com, Long Wu , Peng Zhang References: <20240210104214.1248772-1-chaoyong.he@corigine.com> <20240210104214.1248772-3-chaoyong.he@corigine.com> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRTPtCKKm/6BQJ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9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20240210104214.1248772-3-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0120.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:192::17) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|BL3PR12MB6428:EE_ X-MS-Office365-Filtering-Correlation-Id: c67ce1c7-5935-44ab-d4b2-08dc2be7171d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EuEEw6zK/N8Pou32XpVV2uwfGFbyouhhm1NowCl7lGWAS+dXGz1RK66gCOhHcBfxu557C+Lqnb2wnEk/Unr9PQiEGY8XChEuXVujjP6E9l3rmURW85Mp5QtOxGuryvuapVM2V+HiWvS1oOCdV8xP/YuUiCLANgXtMTm1vssAg1Pef2e02Rw6LP1/W30dikJX2Ocl4OKsSQY+KD4/5E4OaquigN8v0xy5oOVZaariqdf4ZpNpexCwI646f4olR6LfJwAtPdwQ0cj0MHx949HqOtNtoOVpOQbdfjWCDDA+iQR+vk2j/SpTi3IwiRu6TdAdX6eFuX2PDdJ7fX8djzb0rUOfyWboDppELRXJVLRqEOfO7H+MWi5IMRio1QY6+YlaHRGETrCOpmdjrODh+M2RiAdS4cHpyrIgqSdxetcC6yZyiG98xX0SGUsYT5Z8AtiCtE2JhyNk+HCu/0i/OD4lD0M4jj4cdwuMMR4FRXVKVoM1RQkZy/E1viuew3hI+5uiv+1r6Jzo7OIrvX8/TQpd5GiWqJi9bPhLrCvO6kHx0xAMNUR4IwM04mNucGkAzGKi X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(396003)(136003)(366004)(376002)(346002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(8936002)(66476007)(8676002)(66946007)(66556008)(44832011)(4744005)(5660300002)(4326008)(2906002)(36756003)(86362001)(38100700002)(54906003)(83380400001)(478600001)(6666004)(6486002)(6506007)(6512007)(316002)(53546011)(41300700001)(2616005)(26005)(31686004)(31696002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YWNmeEwvTU5ycjZ2VHRTb2V1ZXdGbzNRbVQ5NCtrSlFaQXhITTM1UVNic2tT?= =?utf-8?B?NUN2bjJaTHFiQnBQZENDOVY5T0ZhaU1jZzFzMG5NakVGc1RnTmd2T3l4bmox?= =?utf-8?B?N1AvMk1iSytxSVJFZ0hldEFGTlhpTmppOVBrSWlsZDVwUU1keUlXUS9lbG8x?= =?utf-8?B?M2FJWFpXdW9PL21XLzBmZ014UFlKQ01reXdYRjJ3ZFdNVjFQVTJxbUJnUHlJ?= =?utf-8?B?NVBNNFdWOXRvTzR0cVR0YVRFZ2g4ajJRRXlSRHV0ZjBvUXdzL0M0YWdMRnJq?= =?utf-8?B?RTVTZXJqNUR6WFJQTzJWZVVSM2Q4TzJTYVZTc0xxRlhBQUhVeWRtWkIrQmJP?= =?utf-8?B?czVibjhBVmJNWEcyL2VyWG0rY2hxWlU1VjltVEs5cnNGVStqRFdJZi9mZ0Z0?= =?utf-8?B?bmVMUHhUTjJDV2FtMVcveG9uVnNQSG9Kb01kMHN1SGlBZ2dpaUw1MjBqRnpq?= =?utf-8?B?dXhybnllNndNMkRIM2NEVng0dGllTlZsS0lDRGNkZTNVampUSkVYMkNobkdi?= =?utf-8?B?OVFTTEQ1NjZtT1pDS0paMXFhM2grcVU0MDhoU0U2S0ROZS84TmtPdUxqQStQ?= =?utf-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JNWZZeGhkYWdm?= =?utf-8?B?Z3RqSzZLUzFKcXdFSUpzcG1OQmNoeGNtMzRkQmNxaDc0WSsxdkU1N01oVTYz?= =?utf-8?B?R0dHM2RrejZ0MnpHeCs4d0hPQ3RVaXJZa3JHT2FIL2RCRnRzUGszR0N2aWFC?= =?utf-8?B?YzhvUkRIQmtmVXp2L3VLb2JVZVJ6S2dYYzB5bWJPYnRCVmlCQVZrLzBuMWVT?= =?utf-8?B?Q1l5QWJrOVF2Q0NYcnZYNHM4akFCWnU3dGUwZmpUOC9qMXhBSFNpYnUveVNW?= =?utf-8?B?SVZEbjdrM2FDa1RLdURIemRULzdCZERzZTNCN29mSkVlaW1aQnNvbVdrVC9K?= =?utf-8?B?SURRMUFqUXc3N2VIZkpPbzJ3ZTF4T3VqUFB2ajV4RmF3ZktpcDI3cjNiRG45?= =?utf-8?B?Z3FLRFpKN0VHcXpZZys4QmdHSHVBeU9kZjBEYnZ0Y1lNSzJab1RVNm9SYXRJ?= =?utf-8?B?WVZZTHE4T1ZkNzBlL0NzRThEbjJ0NkpqYVpGcGxBQy8zNXhmdnRYS2FVYUpR?= =?utf-8?B?RmdUVVh6S1Z2Y1hTVFJzVHlaQ1JJd0xjTStvbVBBNnpqUTlpVHA5VlBKYUVK?= =?utf-8?B?WG5oaXNoWE8vcm83MXowcnZybXF6TS9OMTBmLzNTYVlJREo3SmQxWHVzekhQ?= =?utf-8?Q?W6DpjoEOBCj7k/aKfisPaZ7WK?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c67ce1c7-5935-44ab-d4b2-08dc2be7171d X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2024 16:24:30.8979 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dwURiwMih3EkIUh5UEvOW2gJPWOj1F/iREP89E643SFCpMREhNXM5ybkZ6vxvSDu X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6428 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 On 2/10/2024 10:42 AM, Chaoyong He wrote: > From: Long Wu > > Add a interface to check if a device is a representor. > > Signed-off-by: Long Wu > Reviewed-by: Chaoyong He > Reviewed-by: Peng Zhang <...> > @@ -156,6 +156,12 @@ static const uint32_t nfp_net_link_speed_nfp2rte[] = { > [NFP_NET_CFG_STS_LINK_RATE_100G] = RTE_ETH_SPEED_NUM_100G, > }; > > +bool > +nfp_net_dev_is_repr(const struct rte_eth_dev *eth_dev) > +{ > + return ((eth_dev->data->dev_flags & RTE_ETH_DEV_REPRESENTOR) != 0); > +} > + > There is similar need for other drivers too, can you please add this as API for drivers (ethdev_driver.h), update existing usage in other drivers, and use it in your driver?