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 7556DA0C53; Wed, 1 Sep 2021 07:15:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F064A4013F; Wed, 1 Sep 2021 07:15:45 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 22BF740041 for ; Wed, 1 Sep 2021 07:15:43 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10093"; a="218678537" X-IronPort-AV: E=Sophos;i="5.84,368,1620716400"; d="scan'208";a="218678537" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2021 22:15:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,368,1620716400"; d="scan'208";a="446356536" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga002.jf.intel.com with ESMTP; 31 Aug 2021 22:15:43 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 31 Aug 2021 22:15:42 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) 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 22:15:42 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.105) by edgegateway.intel.com (134.134.137.100) 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 22:15:42 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WR1qt5i9IckdwS0iRHdCzE9/fpXp6e9shFBAKXwAVkIYluY4EmHVGwC2Ow72aY3okkvy2iQX7cCnTwXXptLSTwjEXfvJt5FsUu1y4G11yhf7NczKRls9b7Fil+CIfRbOe91PZugwyJO3IHgJQXsFPYnb/0b+TPSW50AKwNFymvMp+3fqt0ebysup4tCThPUO8s3ndPvUR+ybvdMEb9poVf3mvAyLOu4r7wJZwOmktQGCbdOGjgz5yPnrpPJf7XigIxzgPRYxNsM+DZc0jdywacDeAga+Y+5twuMlF/oOm8g6joToEiLjJ237VYAg2YqaQIWos8xxBCRvROoNSN9y6Q== 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=mMCkw3BfVazy1ndVQdyavfBngyJi14+yICootJrhTA8=; b=VaLADRGth/m6y3I2ceRfXfKcDnbazUmql+ltFa7x19rZ0YIuYFUMLaNL+5cEG0BOTMfDz/MUgqDENeCbz3DtC/wZZlCDIDFCTcR7plmSIpwN94odtjD6aOoyviWpg8KecVpvv/txXuNclaa9P3+izvH23sQCEB73SZJ9Yx1Y4oxSLfLxTuHFAWLhLKO8jdeaxFCenwNStK+Ktjs8eMaQKRMsx+AZFnDAFrJcSaaBN/NHoOT+e7RVX348Wb+pOXBKazjVEl/Q7aNIUshaq+RB2sNzsDgKS6lwkTeQ/gSEOkkbfnKVqIEjDoslsnrwEtIig6hRvcbXWWlpslPm/WNp1Q== 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=mMCkw3BfVazy1ndVQdyavfBngyJi14+yICootJrhTA8=; b=A1v3/HwnWrtWPOXCuzYNTes0GVxpdPD7sfGFuqQXzf9F1jmHniU0qpbRQDFvn+jg0MUQuK09RdVxkqlHVkDfgGsiqDDvvGgxuce7xa/ha8A4tC2xubG9qCbvJjBCAQsnLjo0TRS88X5hGYaBt0gSoG3A0IParjAuOHVkRIni9pI= Received: from BN8PR11MB3796.namprd11.prod.outlook.com (2603:10b6:408:90::20) by BN7PR11MB2676.namprd11.prod.outlook.com (2603:10b6:406:ac::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.19; Wed, 1 Sep 2021 05:15:36 +0000 Received: from BN8PR11MB3796.namprd11.prod.outlook.com ([fe80::c080:606b:251e:8243]) by BN8PR11MB3796.namprd11.prod.outlook.com ([fe80::c080:606b:251e:8243%7]) with mapi id 15.20.4478.019; Wed, 1 Sep 2021 05:15:36 +0000 From: "Xing, Beilei" To: Andrew Rybchenko , Ajit Khaparde , Somnath Kotur , "Daley, John" , Hyong Youb Kim , "Yang, Qiming" , "Zhang, Qi Z" , "Wang, Haiyue" , 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: AQHXnoPU74sluTLDoUqN4jhs7y9Dl6uOo6Qg Date: Wed, 1 Sep 2021 05:15:35 +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: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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: 4e3be6b3-3fed-48b8-650d-08d96d0787da x-ms-traffictypediagnostic: BN7PR11MB2676: 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:7691; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: pblqIr6QgoZamaWM0mTUzbeFggpGLynxDjK+RBShvS+/Xt2cqrijT5djyTDwkpVQrdy2YdMXfuais02pnVL0e79Sc80NFTFc3adnpJSdpEylFoOZFNJVZF4IRq13ZYietwWRedBMJ+/zFZif2vSFa74mf0TPkdJ+W+A4maZAsm7IwRFIAQ2cS4LIpp4eM5o9UcjfsU2mQng6GeWH3N+2igWuA7+D1EZ3Uz7Jf5OMF3vP/CL0RjcyIdsEWrZNJkxLE8diaQaN++vHpAtUtkSsrn/dGismukUwGo03T91H4eM8Wn5wdPqQLx5IU9LnmHFu0P/5zYLA4MGL/uDNy+p9kC5tp82d6TJzD6alMTJ+rL+Nq7zLStgtxgg7fhg9azNqXkoLBZgTO7yI8pi4EK5fUGqulFNpXL9cMOMxgmggiY0YIzAaPwCPK64IIj+u/cu+LV65zmCwnfKcgz9PXDbyD6YELrz1v2jpdmYJbBeXk8ZwA/S/X//O0B3eeRigpt9Ip6AEmecce4Fv+ZimqfCBOd4BsWKj9qGbKkbZA6+4Y0LuMQbJJzVCkSxgSw6kb9yP84lP1hXIaXL+2LQDpo9iKd4JcW1pggmowfkVycVnCGjSCiu0e0xt++MKYu8UAfwQmjS9kIr4nq0VuA5rxNT/ydl9uywpRPVepdYCpC/dq7lzA9jN5LWumpZ0ha9o9JFdJR+AK37YkOQ2RJqe1UKwp4YoWxBRwhNJ+IgWtHfwqCgtvg3yof7/o6avwogA1+18vlWqb1dIelNlAC5Aks9p79a2IwoWtIGb/MgMwJDpKTLJpc4qv2Cfyip/f8HDdXpA x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN8PR11MB3796.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(366004)(39860400002)(376002)(396003)(7416002)(53546011)(38070700005)(76116006)(6506007)(52536014)(7696005)(66946007)(86362001)(55016002)(64756008)(66446008)(66556008)(66476007)(9686003)(2906002)(38100700002)(478600001)(316002)(5660300002)(33656002)(6636002)(54906003)(83380400001)(8676002)(186003)(110136005)(966005)(122000001)(4326008)(26005)(921005)(71200400001)(8936002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?f6eLjoBIG4SPBD5LbVrqPuIC7M5/cLbCxMxRFh/OsW+us50GkzBdkWRFQ51D?= =?us-ascii?Q?pLghrA5gkEvJQ3dFDwxkf7yh6c5jhYVecDkG/nlkFRBTxCBSE3ddkumT48I1?= =?us-ascii?Q?+WTXP6kKkN9NHVk/qQeWtm4LJ5r5Utxkx8oBrwuNdEuHvYTOps0YkuO48MXB?= =?us-ascii?Q?WH44xtp1xI7sLwQ5+q12/zF79D3VkC5RAl0fZa/gxLXwRs4F9PexSHa1nI6y?= =?us-ascii?Q?jVstReCT6JpSr+RC3get5GM74dqjZTt+flRpzlb8iV2j8mrwEYiBc1f1MDZJ?= =?us-ascii?Q?I7V3hRlVsoSr3FR9bKTTBBqKuPGAWo92+vQ1GuPuI3ehtCoh1GBY9WdS6mW8?= =?us-ascii?Q?irAyM+8Qit9FEXunyePEnhmlVfTt3WlGzlwF2iEgOd5mFIiwHvyo/wlHmQfX?= =?us-ascii?Q?z3VIhqxqKqWn51Wtlq8pTcPDxnbQM81xNKy82XskDfhyAuKuJhFBo7m2aCnb?= =?us-ascii?Q?Ti756HSzjUerC6ORANQdWe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Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR11MB3796.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4e3be6b3-3fed-48b8-650d-08d96d0787da X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Sep 2021 05:15:35.9142 (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: y8asMXHh2YXM8tjG79QXwO+nfSkDTo6lJ/9ILKsIECqoHa7SZZa71lDq06ixHx580idpLePAa3OBUOaD2Tolfw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR11MB2676 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 12:06 AM > 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 >=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 representor= s but > do not fill in a new parert_port_id field in rte_eth_dev_data structure. = Do we > care? >=20 > mlx5 changes should be reviwed by maintainers very carefully, since we ar= e > 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 i40e part, Acked-by: Beilei Xing