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 E776FA034E; Tue, 1 Feb 2022 18:13:31 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 54AD6411AB; Tue, 1 Feb 2022 18:13:31 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 91DD040691; Tue, 1 Feb 2022 18:13:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643735610; x=1675271610; h=message-id:date:from:to:cc:references:subject: in-reply-to:content-transfer-encoding:mime-version; bh=EC0bOQQPk+eVIYW9Mbw73WtXfPT1T8i8T9BAKzveYoU=; b=Si1Lwo76Ox2RnYPMQYyUxPi0rqR7N/tuKkQedWXxxLFg91fy4Uipa+Ah YyyQAiqVvcLMRUrAFn6dJrEhNvFDqI14UphgzlVTO0FxtX4+/4DTpI5mw JQTIdfQuf70GsEHl7maci+5xBd6qbqHJ9mjwJDUJoStw5C5ykHg5+IWbZ aB5kv6wC5z4uxSkqUR4j90WcT2X6dyk07Qarr2AHjCD4lyxZUIXzpmTCE frS6MG1EGjbH+/BBYzsAALZlgwYMHHELuzpVsah5l0jgSregzwJJ9gqEP oDmRF4NShb0k+9G9no+0GeOFxwUy2TIPBOO+ZrNNB42Htsm6V4RXcSokc w==; X-IronPort-AV: E=McAfee;i="6200,9189,10245"; a="228398562" X-IronPort-AV: E=Sophos;i="5.88,334,1635231600"; d="scan'208";a="228398562" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2022 09:12:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,334,1635231600"; d="scan'208";a="630467991" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga004.jf.intel.com with ESMTP; 01 Feb 2022 09:12:28 -0800 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 1 Feb 2022 09:12:28 -0800 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 1 Feb 2022 09:12:27 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Tue, 1 Feb 2022 09:12:27 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.101) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Tue, 1 Feb 2022 09:12:25 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OXkaodLZbJtEhqTxnCC5Z+9beniRGsehCgW0o3vQQbgsf8IFha4GtVGoTe9horgzsxwYX9+ek8lfHDLBCy0CFkode1l0xv9rgVAg/8S+4WdXQTsfR+JW1XZwE5cUyhuSU+nmdWjWKHMU4s71FjkumIykIHd/rCJ3Zyx2Zm5IkX4Mm70Kkrhm5O2Qy/dh02lY/0youVOtdULnjOfDmmDxcuqY0d1TL+dpYC9JCUnejP5RrSR+21s/f3OWceAjfib28gCHKPSAnKn+QNgQAa8XIXpWrEE+Iyfa9T5F+FvlEp/p81cqpa6zTssmmsXhtz1LMLvOZ/2DgNg8qebWEKMbXQ== 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=Z+WqK2F+omqk8Suc9fboq0SY6jltuqQLmspBfqKDOwk=; b=Fq+RvNJNkYxuzcO5M5gPf/F4HcksepoD3i2We7OiGhWmHCedmoE8+VVqO+oyHygUG1iTC3t9/TLV2wrAN0tzgozZfmAoJvY/VtN+30Fm79/d04Zn+vfFmA6oar2zJJnouRaXdeZw9w/017+O75y2klEY3gdi4px/pK0ziwr3V+im+b/fusinN1pYkcOtznhvcAWtK/wpqI3QpLPC00KK/5kz2WqmpF6oub58C2N78rJvfCCnZigkm0N0VElHAhjvyHgE9eazdsb8zCAn1bkSvbSMco6Nucx5196EwmHptnmaKWnIXMUzTAId/nNPPg0cSI06Pa7YsLJJkVess3ekyg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by BN9PR11MB5369.namprd11.prod.outlook.com (2603:10b6:408:11a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.15; Tue, 1 Feb 2022 17:12:23 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e%7]) with mapi id 15.20.4930.022; Tue, 1 Feb 2022 17:12:23 +0000 Message-ID: <62b1fb52-b27c-1351-a1cc-bdac7db1028b@intel.com> Date: Tue, 1 Feb 2022 17:12:17 +0000 Content-Language: en-US From: Ferruh Yigit To: Kumara Parameshwaran , CC: Kumara Parameshwaran , , "Thomas Monjalon" , Andrew Rybchenko , "Singh, Aman Deep" References: <20220121042944.23929-1-kumaraparamesh92@gmail.com> <20220131143234.17945-1-kumaraparamesh92@gmail.com> <2edd4240-648d-4b1a-e814-9e3150f69650@intel.com> Subject: Re: [PATCH v3 1/2] ethdev: define a function to get eth dev structure X-User: ferruhy In-Reply-To: <2edd4240-648d-4b1a-e814-9e3150f69650@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0024.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:62::36) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: da54152f-b22e-4015-0864-08d9e5a60378 X-MS-TrafficTypeDiagnostic: BN9PR11MB5369:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Z9jx0PtP3xiAQhtTDTay9fBrvfyo5W6Rr0/ZiNI5b1IdEpwsZ2CzEDF8oHrrMDNdlBCtRjiMtTXUKBpZ+e2LcA+Y18/jFLzNCIeMun0zPuftT/uVFlJ8EozLTG0IU5qTgsiF3jSDbCWv3ifVvL/zQ8+LkoCNUmtVJb0Mzd5G+2UsKRTpsgu3eTNaTkGlDKEMtFOcWoqM4YT+HF8Jwn3TnOLl/vrrk0+C559V/m0lo6iccuK0/JzS+lPnyQqOgq2ejX55u+oGLlsvkGGGThgJoNA8qPhO4RlypB+0YWJrKQ46z9DSt5yV8ovbdvek0lzkIIK/rXpCzNn/SGIIFo6HJz5PtgIuDj7OzG+A4l7M1MYrzurANBIfc8fgt/IqSDXavC8VNtJ5pwm/oq/sE4due2yht2ezWuq6mAvVcyYcyfwc4YC7dKdc2/Y/DC73m2Ud03Qray7JrJmFpRI0aEYkcVkoEJ7gcOag8fq74bPcDn++OzWdfE6gzdVvexCa8FfqluHNc9tkOH2rfiFKkrdJtZ2y8OHdDX80rM10GK/cdgGbOi4QuuhIPiuwMc46ALpqIkDcqjFDH5W1QMCOnuoQtF32KEVR+6UjLa1YQFEBKBZv6kZaqd2NtSbRZejACBr9izdTa+Jfl/ALP2CBeHjFStLHDPqnjQXOES+BquQ1vQz8bBQUdUUvwne2DxsPgx+h752ZKA2T7pEyK0bBx7rUVw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(6506007)(6512007)(55236004)(53546011)(5660300002)(186003)(26005)(83380400001)(44832011)(2616005)(2906002)(107886003)(6486002)(31696002)(86362001)(316002)(66476007)(38100700002)(66556008)(31686004)(54906003)(508600001)(82960400001)(36756003)(4326008)(6666004)(8676002)(8936002)(66946007)(45980500001)(20210929001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RlNLQUEwbjNsbEIxYUY3ZytsNE9xRlVNZnNJdTVvYTRDczRhYkpDckRzckpn?= =?utf-8?B?blc3N1Y1NXllVHpuQjJqMm8reThJL3Bld0tKOTNMMVhSTEQvYTVGUGpRRVV0?= =?utf-8?B?WUpmeE9ENk1hYnJ0S0E3KzhCQkNnNDlKbWFvcm53ODNxWUZTd1hudkZUUVFU?= =?utf-8?B?NHdmdko2b3VzVVMyZ3pDc3p1NUZNa3g4UkUrdEJLY2c4T0FXZVJTWktlSDVL?= =?utf-8?B?eHFHZDA0OTNPNXNTbElRcGl1TDdnRHNjRkpmbzhZcURBT3dHaTJpeE9SaFRK?= =?utf-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MnFaUndjUEViVHBPYVVRZUZ0Lzg2QVJy?= =?utf-8?B?OXBkQ1QzSkl2Q2Yxa0I0cUdjMW0veEI2cjgraEJGOUlLblcxZHFLWGorNDBL?= =?utf-8?Q?AgUPIyg9ptBC5k99xTpWHM0=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: da54152f-b22e-4015-0864-08d9e5a60378 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2022 17:12:23.7506 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pm/jHcj2fIC+AyhGzCdjkofvFQ9qy/ahDlKmP0X6xWmgepTBgwUeW2mZ8+mI7neS5d0pG/vTDXi4LUR9x/chIw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR11MB5369 X-OriginatorOrg: intel.com 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/1/2022 4:56 PM, Ferruh Yigit wrote: > On 1/31/2022 2:32 PM, Kumara Parameshwaran wrote: >> From: Kumara Parameshwaran >> >> The PMDs would need a function to access the rte_eth_devices >> global array >> >> Cc: stable@dpdk.org >> > > Not sure if this patch is suitable for backport, since it introduces > new internal API. > But since API is internal, perhaps it is OK to get it, specially because > it is required for next patch that is a fix. Keeping the tag and leaving > the decision to LTS maintainers. > >> Signed-off-by: Kumara Parameshwaran > > Reviewed-by: Ferruh Yigit Hi Kumara, There are some instances in the existing code that can benefit from new API [1], do you have any bandwidth to make a patch to replace 'rte_eth_dev_get_port_by_name()' with new 'rte_eth_dev_get_by_name()'? (For the cases 'port_id' is used to get eth_dev) Thanks, ferruh [1] $ git grep rte_eth_dev_get_port_by_name drivers/net/ drivers/net/bonding/rte_eth_bond_api.c: ret = rte_eth_dev_get_port_by_name(name, &port_id); drivers/net/ipn3ke/ipn3ke_ethdev.c: retval = rte_eth_dev_get_port_by_name(fvl_bdf, drivers/net/memif/rte_eth_memif.c: ret = rte_eth_dev_get_port_by_name(msg_param->port_name, &port_id); drivers/net/mlx5/linux/mlx5_os.c: if (rte_eth_dev_get_port_by_name(name, &port_id) == 0) { drivers/net/mlx5/windows/mlx5_os.c: if (rte_eth_dev_get_port_by_name(name, &port_id) == 0) { drivers/net/ring/rte_eth_ring.c: ret = rte_eth_dev_get_port_by_name(ring_name, &port_id); drivers/net/softnic/rte_eth_softnic_cli.c: status = rte_eth_dev_get_port_by_name(softnic->params.name, &port_id); drivers/net/softnic/rte_eth_softnic_cli.c: status = rte_eth_dev_get_port_by_name(softnic->params.name, &port_id); drivers/net/softnic/rte_eth_softnic_cli.c: status = rte_eth_dev_get_port_by_name(softnic->params.name, &port_id); drivers/net/softnic/rte_eth_softnic_cli.c: status = rte_eth_dev_get_port_by_name(softnic->params.name, &port_id); drivers/net/softnic/rte_eth_softnic_cli.c: status = rte_eth_dev_get_port_by_name(softnic->params.name, &port_id); drivers/net/softnic/rte_eth_softnic_internals.h: status = rte_eth_dev_get_port_by_name(softnic->params.name, &port_id); drivers/net/softnic/rte_eth_softnic_link.c: status = rte_eth_dev_get_port_by_name(params->dev_name, drivers/net/softnic/rte_eth_softnic_thread.c: status = rte_eth_dev_get_port_by_name(softnic->params.name, &port_id); drivers/net/tap/rte_eth_tap.c: ret = rte_eth_dev_get_port_by_name(request_param->port_name, &port_id);