From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 75284A09E0; Sat, 14 Nov 2020 22:23:30 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 49385C88A; Sat, 14 Nov 2020 22:23:28 +0100 (CET) Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by dpdk.org (Postfix) with ESMTP id 89653C882 for ; Sat, 14 Nov 2020 22:23:25 +0100 (CET) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sat, 14 Nov 2020 13:23:16 -0800 Received: from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sat, 14 Nov 2020 21:23:23 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.168) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Sat, 14 Nov 2020 21:23:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CvGNS4IdEeo66AfMM3YCcdR245d7wx/uEBh+T613/0D0Dui0Pmy4ZFYVaYxpok9KBpjsBwAPKC6xK2y2NuSzImMywrml1zx3Sbuqq7D89nNOu+9hMH+9jU9jHNDG/3ecOR21h7GvWNm0ZoyRnKHk4W7CpqUVoRX6pIXnIr9PgBogiHLsOa6C9UMh9QeMdmWr9qM1JOmpw1nJL8PNUTY7c9Q/gZ966dNqup26O4wYZydxwX/UEHc+GrFCNGMXtEVTK9J1E3JdWfPyo/v7JmKZMaf3Ug3vpKTXbCdTMt90fCF/leiHgVCxMS2dN118eAnR1cuFfQnkM4pjiwZXqgQ27A== 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-SenderADCheck; bh=YV5pgbZ5ORWquHEjsJS25O5txIM9i24tQyBf62rsQWs=; b=dW9y2TOKr339FKmcxGWkiUWJeiyNnGNaoD+tLqrt7Wk48asIMqXsraJ2szNmJxRjp4/00Vu11IuqnD+/SD4ni/OYrXjy79n6/Zgg6PTWftCqMBmEy5Sus1v0u4sY1R+Grp/PDuposGxZzEpo/ehJ9QZMUHYMArN8i6FMZtnmaaxte869q0OW6qMQEe2I7jrdeUl2GOcsM+JvMGQ2oNKEvWSPuKIEAlhPe5Te3h24zJBUwfIc5Mast3cbGPk+2/wpxPZVZHRmK6QW3b41lx1gUr1VxB2Lx+o4s0H50KR1jIIcczfuBdC+zauHICNmI/Z/FMrUChaKC1BAb8qsTd7FXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from CY4PR1201MB2548.namprd12.prod.outlook.com (2603:10b6:903:d8::18) by CY4PR1201MB0038.namprd12.prod.outlook.com (2603:10b6:910:19::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.21; Sat, 14 Nov 2020 21:23:21 +0000 Received: from CY4PR1201MB2548.namprd12.prod.outlook.com ([fe80::bc62:8762:4cb9:52dd]) by CY4PR1201MB2548.namprd12.prod.outlook.com ([fe80::bc62:8762:4cb9:52dd%12]) with mapi id 15.20.3541.026; Sat, 14 Nov 2020 21:23:21 +0000 From: Tal Shnaiderman To: Narcisa Ana Maria Vasile , Ophir Munk CC: "dev@dpdk.org" , Raslan Darawsheh , Matan Azrad , NBU-Contact-Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v1 59/72] net/mlx5/windows: support VF PCI address Thread-Index: AQHWrLhqdGaTA10MQUOBSvJsyu0UQanCIwUAgAYbs0A= Date: Sat, 14 Nov 2020 21:23:21 +0000 Message-ID: References: <20201027232335.31427-1-ophirmu@nvidia.com> <20201027232335.31427-60-ophirmu@nvidia.com> <20201111000432.GC9449@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> In-Reply-To: <20201111000432.GC9449@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linux.microsoft.com; dkim=none (message not signed) header.d=none;linux.microsoft.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [77.137.114.72] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3739655f-992b-434c-6295-08d888e3833b x-ms-traffictypediagnostic: CY4PR1201MB0038: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: BfAPiME0knEr2cl0TyqVDTVq0BTUsKbHG35/vzS/6xyaIuitD/+nijFKbrofcfsxxM0R4dhDAn6BYXqufcz2l+B0Zwx7SRzEBRCYwhCDcugCUuOW7WKaCwTMmZUNht3DW1cMYqBLCcdOY7FEAmpq93iviTloUmJ19m4Y6PAH5AACIJSuoXkgNco1fEnqYipe7oBhsy9bkNpmcAX3Dcuf4a1OQqH60QQXztrstf6p6OSuwNunwIOS4zoVqEF6DUz0lYLXER9RM73duSR2XfUEngPUr5rpeB/AvK4a0aJ1O5K16zcUuUPHl4EANBtdypsB9Ezz6YB+yvM+1ctiPnXz2w== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY4PR1201MB2548.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(376002)(396003)(136003)(39860400002)(366004)(76116006)(54906003)(6636002)(66476007)(7696005)(9686003)(55016002)(478600001)(26005)(8936002)(86362001)(71200400001)(64756008)(52536014)(66446008)(33656002)(5660300002)(2906002)(316002)(66946007)(6506007)(66556008)(110136005)(8676002)(83380400001)(186003)(4326008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: RrlcR2tFvWZaZr7Fg8GXwSyRWK9gKkYgAMbNmRVlOf1gn6iszl8QtxR6STMLA6te2NZlkbWG197rnztNdJoBaJfARmKTo9Rj6L/huYlQRIsd93C4W4Q7gOhO+c1Upqb7D1mYxHtiU/0ExsPJml2f/4J/MDNtV6WxoV5vdzr/xSC1iCOyxLv8ixSdHb+zhxIjWnLQ/KOxNIZVrLOB0aP8L1DHhVZMRsUIfobkG4AhubLbEUdPD4bKCFOoe+VJmbCCgwssHlHmhA6OXKEJ1WgmyA6SkJUYR/9AcdK7KdlE0zxNHACW3cP5yfZj/6vKqPa5/Wn5+5UWK1GAMlGI4L2cdhTXAXOnJyYluu+AeDB6N+cT1kGQgI3tIlmT2m+CdzE/7zmimZAlhd8YVUjEPISDWFCx8DjkB1gAJkj0FOZgBuF/tID1/Hf6ZRGkfdDSHwYuZdezVopziz4qxKyoL6GIbTcF3GPMuc7U8rqE5mszH9af8IrcjwLrF4SEUhWBkaywBw4KXVVdfh8cZIYgKc+MU96kw3/SvN+jVzYbTyodGPVexZGeGyja67xLcBJrqfttKLmkir5NvoVHuzKwarbacZFzlA9PrD02+MHe685d+63EvI8FVTO3PmnIYuXKC2p1zQNSTiMUt2ahPuAkHbBAlZeMcanXPr2IpRB7tNljzOozUb0uqNXLVknL1MkvTnAsMndf5WebYy6NtIs//hN2AeZvRTROuqfIsmA3ZR9ax7Tum5X+LIykWdb8IPrdrTtYrX2WAsrilrR6dozIjhan8UIcVklmgzMs8WXzMrN9KnTlsBr28hj2nqS9GU48l7XaKj4D/9tKNMEcRiCP+I8v3T3W1VT/1HIXg2zqgZ5Pp9fSaYBvrMDkiXt6OGRK09wgCNFfqikConaUsJiuEFqxLw== 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: CY4PR1201MB2548.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3739655f-992b-434c-6295-08d888e3833b X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Nov 2020 21:23:21.2146 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 6duyqVoHQSj4IGONL1IfvNuvrkJ3CXUHbEkGcY8TO9LAsfdjGqgilzRH38wkk7a90r+6DAuCundS/cRbtqlAXQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB0038 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1605388996; bh=YV5pgbZ5ORWquHEjsJS25O5txIM9i24tQyBf62rsQWs=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ld-processed: x-ms-exchange-transport-forked:x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: Content-Type:Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=Beng6IKTJlOyi33y/0aWmA5R5K1Xi/Z6OFCSRETNs7Y8ftR3PUQLKeYaEOWoGvD8x 8G6QVnKkutskW7+MgE3lMCbtFEFqueaImnGcVaMQV1kBkDcL2J6Fn2qyuq8bJ7/R6P To50k4vsY6vg5aBc3sHc/0elCqE2hdJEtWFsC/1qXfcae80ncLvNbgKgXvgFX1NVrD MrzkyeIF2XWPOt8hbb6ELgs04WlRhlU4E1j4KkV2Dqo2V5R94enGQzumzseSqkZBjl 8PLzqf17AF7rcjJnol112BgN1xLP6ENt9z9I7TBcPsl499TRjRLJbeCdHLgJBrX1Q2 GKOri+aDVOqfA== Subject: Re: [dpdk-dev] [PATCH v1 59/72] net/mlx5/windows: support VF PCI address X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" > Subject: Re: [dpdk-dev] [PATCH v1 59/72] net/mlx5/windows: support VF PCI > address >=20 > On Tue, Oct 27, 2020 at 11:23:22PM +0000, Ophir Munk wrote: > > From: Tal Shnaiderman > > > > Support VF BDF scanning by checking both the BDF and raw BDF provided > > by DevX. In Linux a PCI address is formatted as: domain, bus, device, > > function (DBDF). This is right for both a PF and a VF. In Windows a > > PF also has a DBDF format, but the domain is always 0, while a VF has > > a special "domain" called "Virtual PCI Bus, Serial" (for example: > > "Virtual PCI Bus Slot 2 Serial 2") or segment. The full VF format > > under Windows is called raw DBF. Windows special domain must be > > considered and DevX must be called to support it. > > > > Signed-off-by: Tal Shnaiderman > > --- > > drivers/net/mlx5/windows/mlx5_os.c | 67 > > ++++++++++++++++++++++++++++++++++++-- > > 1 file changed, 64 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/net/mlx5/windows/mlx5_os.c > > b/drivers/net/mlx5/windows/mlx5_os.c > > index f9b469f..4374b05 100644 > > --- a/drivers/net/mlx5/windows/mlx5_os.c > > +++ b/drivers/net/mlx5/windows/mlx5_os.c > > @@ -901,6 +901,68 @@ mlx5_os_set_allmulti(struct rte_eth_dev *dev, int > > enable) } > > + * @return > > + * 1 on Device match, 0 on mismatch, rte_errno code on failure. > > + */ > > +static int > > +mlx5_match_devx_devices_to_addr(struct devx_device_bdf *devx_bdf, > > + struct rte_pci_addr *addr) > > +{ > > + err =3D mlx5_glue->query_device(devx_bdf, &mlx5_dev); > > + if (err) { > > + DRV_LOG(ERR, "query_device failed"); > > + rte_errno =3D err; > > + return 0; >=20 > Return rte_errno. Actually updating rte_errno is enough in the function, but the caller need = to check it, I'll fix in v2. >=20 > > + } > > + if (mlx5_match_devx_bdf_to_addr(&mlx5_dev.raw_bdf, addr)) > > + return 1; > > + return 0; > > +} > > + > > -- > > 2.8.4