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 473C7A0C4D; Tue, 31 Aug 2021 18:32:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 040F44067E; Tue, 31 Aug 2021 18:32:14 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 679C340141 for ; Tue, 31 Aug 2021 18:32:12 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10093"; a="218235665" X-IronPort-AV: E=Sophos;i="5.84,366,1620716400"; d="scan'208";a="218235665" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2021 09:32:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,366,1620716400"; d="scan'208";a="645381791" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga005.jf.intel.com with ESMTP; 31 Aug 2021 09:32:11 -0700 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Tue, 31 Aug 2021 09:32:10 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Tue, 31 Aug 2021 09:32:10 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.108) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Tue, 31 Aug 2021 09:32:10 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e1A04YBQD3kqOUle3k7wjuVFV/6E5/YDzPvHWZKsMzbIW8ii8We4uMarGS0eD3wgNiIcuqGaAvIG1H75ED2BDsktE2BKFoaR+PguR9eaqxZORyu/dkvSM1gXk3fDXMfdpwks5/I64lWXgV8j7nb7xfSqNE+Y/K/enF6w/4whxykMfa40iKzNSWuTeYVueixP8yWYrq/t2yrPLA7RHI+PCzNbuVMrZJOaJt8EyOv8Nr9USEvIJcb8LsrhNFW57N6DrvLytoUzDX60PM/eYS8WbEvJQhGUhAdAcAkEbkWtGZhaeMM2i8x597qaIBuvy1Tl6YG7Q+70vc89NyqqUyH5BQ== 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; bh=piL1ZWw2JOXzea3ZGrXEuq7ilBl+NNoaNvgDMVBQpBQ=; b=Zbb2/qm54+qfT7cz+ZLmQZQyDJjC85Qi9GjbHnw98ik3BPVxKqdT1z2zwzSETpsw6UgTg0RRDO76+6e6MS54XSPQXgHDyIoUPDRAijiNVqeejIZvmcDSop11HTQyrTeW94KwEGQVaNJAr2zyN35U3egFVxJLPh7p/7nvF3cbu3SeOJBp/h5lOVwRb8AJpA+Bzkp7qtItsABdsENehwZ8O/XBhJ0hwurmb5LFnxv6j0kpqoKWIRBGiFdo7NRdCKkcMuaaPncD+wQKr6addFR3x7qtZp0/kvLQoYB8xCaxYAeqfzwENKrx4b/xs3cwOPlZ8sKZ84nbJCExEIOAgBAm0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=piL1ZWw2JOXzea3ZGrXEuq7ilBl+NNoaNvgDMVBQpBQ=; b=fb83tyj1X42E59ushRCROdEjfYKYVqFQvuNloJCk9kPMkhaARJegykiV46FFj1KakOjmmhWRba0gps68IuS3nrVxpV5vwLboFCBiWpMCnywBL64gt/2/4dSvGxt62z5wPp7pnUMTt6/czo3PxRKw92dLm9H8ocucj11yDPh8GPQ= Received: from BN8PR11MB3795.namprd11.prod.outlook.com (2603:10b6:408:82::31) by BN8PR11MB3794.namprd11.prod.outlook.com (2603:10b6:408:8f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.17; Tue, 31 Aug 2021 16:32:04 +0000 Received: from BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::f93f:9c9f:be17:ba75]) by BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::f93f:9c9f:be17:ba75%3]) with mapi id 15.20.4457.024; Tue, 31 Aug 2021 16:32:04 +0000 From: "Wang, Haiyue" To: Andrew Rybchenko , 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 Thread-Topic: [PATCH v4] ethdev: fix representor port ID search by name Thread-Index: AQHXnoPUv5PLDgFku0GB8f5aOsmv9quNzb7w Date: Tue, 31 Aug 2021 16:32:03 +0000 Message-ID: References: <20210712161747.958019-1-andrew.rybchenko@oktetlabs.ru> <20210831160625.3463129-1-andrew.rybchenko@oktetlabs.ru> In-Reply-To: <20210831160625.3463129-1-andrew.rybchenko@oktetlabs.ru> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.0.76 authentication-results: oktetlabs.ru; dkim=none (message not signed) header.d=none;oktetlabs.ru; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b82f380f-02f2-40e8-06e0-08d96c9cddd3 x-ms-traffictypediagnostic: BN8PR11MB3794: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 61GZbWPK52OmHfFiqVOyPf3W+F/zh20wVGW98X3yTLoi04W26QcTw8k6eEGWseuY4T2LNWuJGu3Ka2i+6SZInuTFkx6MqtIdmbFbuoFJ1B1cf4yiO6e1kQHnWqboYQKsEAP8g0jc/JDHFtVxdAe3qlb12aABeObz0IS8Oa3nzuCkZZMe6zy1uKn0dvwTbgQ5acRVIFblUg6c02RZQ8X2RtyBR30zKGjvUYle1f8PEVwK4UPml5exaqXX9q/VX4yYKyDXeOsxAbTbXcLT0UoK2V5N7DsWyeLSH+nDvVanWBhNUcUCfDeQlnECqMy7d0bBban5SmICVGPYIzT4F43U5EPROSDPx67L3MxDsYReDNgE2RYSL2Hwahg8KeBUxxBWbMKaBeDWTi+qSv7iV0pDLyySidjYUK0yodYk9ISuTtiReDxU9rGSZrxqaUs3a0yo3kY1WWDLOa37t7k6wuBxiswGAB4uTjT64+eCRdGRxYLPfppYM8yA481nNxXNn3yS48nBTTTcAshHXGi1CGQe6vqcKJ+Jb9F1yU8damvcgWwy10XexN6wulU01JZ+brY81vUwLYRFBk8w0xfu3CZDAQlHGhlyxsHGiKAX6NCFesWo7z/6atQQVu2S44OrSSWtbanVzNc8Wup7TT5Iqe8H8Zu0q+2IsVcevESmcJW0W7VoE22CEJgCV9fqssiGbO9nkpSGKlm7n5GQ8FP40TMn2WYKR8/ALy5tliG9dTI3kLhc4G88DX8RzcXwBGAl0NOL7vGOHIHoSfaGy34h/NP7ubK+qszZX+vmwuVflkCr0EnPZUI6iKP5H4WLRsMqaGxH x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN8PR11MB3795.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(346002)(376002)(39860400002)(136003)(366004)(7696005)(38070700005)(8676002)(52536014)(38100700002)(7416002)(53546011)(6506007)(86362001)(4326008)(2906002)(6636002)(8936002)(508600001)(122000001)(83380400001)(66446008)(5660300002)(26005)(54906003)(64756008)(921005)(316002)(966005)(66946007)(71200400001)(66556008)(66476007)(110136005)(186003)(76116006)(33656002)(55016002)(9686003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?y6XoFq0zcQfXvj+G8t+h7rELBrlkh/DQrC5U9dNBiVHeGR+P2vt15ik2z2OE?= =?us-ascii?Q?C0XDqX/Seh4xf3BjpqdO8fc9Knbz4DJZcSNly3GVthFth1tT6QUuAkhkk8Jy?= =?us-ascii?Q?yot7tElYvBByTXHRhMJSiux0t7urQA/35eZX/ZghJgLSaDMJI2hhmZux17Vn?= =?us-ascii?Q?PRXEwWsefoQ8gHJUXw5xsyHNFUkDjJwHN7eVV5qJT02qq7dv3mikQ8aNOlcV?= =?us-ascii?Q?R/YjHtQB9IX57zgIgxuC9PaAjPYtbX+NOlP4uhncsJAshAL0xnppmwsNQ0Sa?= =?us-ascii?Q?hA1vGfNdyVoLYXACCzwU64bLHUDEE8PWoiXVxYvVjm+JmSFg6RoNP6jGkwNW?= =?us-ascii?Q?kTCiwN+tzxnRqdVetAqmmEYxQHfbss8WMfF5XI3rw2bu3pX+2NIouGyjCysy?= =?us-ascii?Q?Koby/lFNwc1HqbKyHqPzrQYGkYfl2doLY4GqtZu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tWbaerQBKTUYQjAv4?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR11MB3795.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b82f380f-02f2-40e8-06e0-08d96c9cddd3 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Aug 2021 16:32:04.0289 (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: sPuDUOB9psn6Wj8O82xCSs3uzyoLkZFbiuha/tjt/G6p15VbW8xF2s9vV6A6N7AIpWLzPYEz0dwQbth66dUMRg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR11MB3794 X-OriginatorOrg: intel.com 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" > -----Original Message----- > From: Andrew Rybchenko > Sent: Wednesday, September 1, 2021 00:06 > To: Ajit Khaparde ; Somnath Kotur ; Daley, > John ; Hyong Youb Kim ; Xing, Beil= ei ; > 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 >=20 > From: Viacheslav Galaktionov >=20 > Getting a list of representors from a representor does not make sense. > Instead, a parent device should be used. >=20 > To this end, extend the rte_eth_dev_data structure to include the port ID > of the backing device for representors. >=20 > 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]. >=20 > 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 ? >=20 > mlx5 changes should be reviwed by maintainers very carefully, since > we are not sure if we patch it correctly. >=20 > [1] https://sourceware.org/bugzilla/show_bug.cgi?id=3D28060 >=20 > v4: > - apply mlx5 review notes: remove fallback from generic ethdev > code and add fallback to mlx5 code to handle legacy usecase >=20 > v3: > - fix mlx5 build breakage >=20 > v2: > - fix mlx5 review notes > - try device port ID first before parent in order to address > backward compatibility issue >=20 > drivers/net/bnxt/bnxt_reps.c | 1 + > drivers/net/enic/enic_vf_representor.c | 1 + > drivers/net/i40e/i40e_vf_representor.c | 1 + > drivers/net/ice/ice_dcf_vf_representor.c | 1 + > drivers/net/ixgbe/ixgbe_vf_representor.c | 1 + > drivers/net/mlx5/linux/mlx5_os.c | 13 +++++++++++++ > drivers/net/mlx5/windows/mlx5_os.c | 13 +++++++++++++ > lib/ethdev/ethdev_driver.h | 6 +++--- > lib/ethdev/rte_class_eth.c | 2 +- > lib/ethdev/rte_ethdev.c | 8 ++++---- > lib/ethdev/rte_ethdev_core.h | 6 ++++++ > 11 files changed, 45 insertions(+), 8 deletions(-) >=20 For ixgbe_vf, ice_dcf Acked-by: Haiyue Wang > -- > 2.30.2