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 EA93CA04B5; Thu, 10 Sep 2020 09:30:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E74511BFA2; Thu, 10 Sep 2020 09:30:53 +0200 (CEST) Received: from nat-hk.nvidia.com (nat-hk.nvidia.com [203.18.50.4]) by dpdk.org (Postfix) with ESMTP id 2E9A11B9B7 for ; Thu, 10 Sep 2020 09:30:51 +0200 (CEST) Received: from hkpgpgate102.nvidia.com (Not Verified[10.18.92.100]) by nat-hk.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 10 Sep 2020 15:30:50 +0800 Received: from HKMAIL101.nvidia.com ([10.18.16.10]) by hkpgpgate102.nvidia.com (PGP Universal service); Thu, 10 Sep 2020 00:30:50 -0700 X-PGP-Universal: processed; by hkpgpgate102.nvidia.com on Thu, 10 Sep 2020 00:30:50 -0700 Received: from HKMAIL104.nvidia.com (10.18.16.13) by HKMAIL101.nvidia.com (10.18.16.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 10 Sep 2020 07:30:42 +0000 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.46) by HKMAIL104.nvidia.com (10.18.16.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Thu, 10 Sep 2020 07:30:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CzjjxUjXehBKmnY5voWoXQcM3ccEl4wC+JgbFVhjdCWTEOjsRQxDY9a8VfheQshNXCOi0ikj0YnKOcSx8vZe3PN8t+4dZYM3y6s/7n2mvMoKXtKJCaNUmVzCh6eKTEiBf9j32pdIEe2eIil1+82z0f+zY/ivnCSPWGThVZ/zSJS2yYSdl/DJ/OWorzi1xzjTeOqKkX3UnCl9azkvVJycHsCNIEeOF7ZpwAfPzPNn3k96XLiIw/ST2GzzyPf5zBQysIL/yuIxqGi5nAYFn9Dp9bdKJ3ZImBIugIV0SBR86QOSuBzJ4vgBQ0kOfEFLkt2FN6qmsSx0abJMb07ASKAHhQ== 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=UlHlhNGZsyd9h/V9DOikEqajHEPWX9Ov0Ej5Ci0Be4o=; b=Z+lPb5w2zh6RQTRq29NvnFoGtLLP4Q4rjKxtGbNYhCuRtIWfmSGnPunc3hjeL3ySejTrjnfHMRrP70GSrOGcZRuVTSv3FRnlMf8RsPj2fS4DlLu0AmtIrHvHBFm6eA/AfruFgH+WUgwfYokN64tLXhyqgW1Ac0iLTlg7+0I+16XF2i+msLfY7aIXkpNqLxpWptAWvdKg/TnDsuSywq6I7kjGr5GkprgSQAHQupQxaHBDlIhUft/uKgm8dWFQooSHQE38eWEwTNISIF6FJFxndm/GzBmqdttTZWaX9WV6Jgc3ky2wNjv2T8OK8ZndXkWUszacTFjSfjlKN9yy7BxB7g== 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 BY5PR12MB4323.namprd12.prod.outlook.com (2603:10b6:a03:211::10) by BYAPR12MB2872.namprd12.prod.outlook.com (2603:10b6:a03:12e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Thu, 10 Sep 2020 07:30:40 +0000 Received: from BY5PR12MB4323.namprd12.prod.outlook.com ([fe80::7deb:c09a:50d6:e561]) by BY5PR12MB4323.namprd12.prod.outlook.com ([fe80::7deb:c09a:50d6:e561%3]) with mapi id 15.20.3370.016; Thu, 10 Sep 2020 07:30:40 +0000 From: Tal Shnaiderman To: Narcisa Ana Maria Vasile CC: "dev@dpdk.org" , NBU-Contact-Thomas Monjalon , "pallavi.kadam@intel.com" , "dmitry.kozliuk@gmail.com" , "ranjit.menon@intel.com" , "harini.ramakrishnan@microsoft.com" Thread-Topic: [PATCH] bus/pci: support segment value as address domain on Windows Thread-Index: AQHWhwAEPStwuRiib068+s4VSS1lpKlhdYcA Date: Thu, 10 Sep 2020 07:30:39 +0000 Message-ID: References: <20200825114316.10712-1-talshn@nvidia.com> <20200909232121.GB13311@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> In-Reply-To: <20200909232121.GB13311@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: [37.142.6.33] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8f0dca3b-d82f-4ba3-39a9-08d8555b6b3a x-ms-traffictypediagnostic: BYAPR12MB2872: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4714; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WjLwvV5Os4fUmrmNUbxXkFM93OlxdLxi6/zBVvzwCkHl7qfz/y+9NGvdOILOdqShmZAOySmb0G320EYT8abwtel5z70v4L8uNkRN02dIOSz9nFccVzKuTlqmvAqQbeBBjOMNaSKWd2yim30PCcHaeiSy9TdIoojvVDF2Am7/a2p9wNmgyEiZUNqgFiTlreGrTjHyu3R8Junoe0UFtAIU0Qi5zV8kGwnmGTw/iHNCJ+z1VC3j5lm75zUMorDQBjgk2+kUH+t8YR6fIk32bbcPtPZSMm+lDXIV0vof9sK+lCuKhswbKySwQyDJ6x0L9BW96ns0Ax97vmC7P77ylWv+Bw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB4323.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(376002)(136003)(396003)(366004)(39860400002)(6506007)(66556008)(316002)(478600001)(52536014)(66476007)(6916009)(186003)(4326008)(64756008)(66446008)(55016002)(8936002)(33656002)(71200400001)(83380400001)(66946007)(54906003)(8676002)(9686003)(76116006)(86362001)(7696005)(26005)(5660300002)(2906002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: TYt6OFenGVIHmvNzA9VKKtwB69XDSHQWXz42HzJQksME7iIuWH+/4ZZfiKHh6w/5xhe9U1wNJUPvoBb/qBrMMysV0yRJx4ayHvNCCloGcGMeEsnmnY5b5fkDhMfJgwVtlBZiS6pUiXhPy0CVVwKG0qwcI17d/PRJ8OUH9iI80f8Yfs/09qKU9AQJfklU0MC+hLFIGETNHPEPvbUqVwJqbkY77lv0JUK651GqgjIRMYifRXEYgT5R2y/jjDltKusRaSFcxMCEKf407BenNbLNGwjmBo8S/zB3vxjyOrCFVWvZ+xK1wMzVDM+ebOEO4vIl/BP/fFYPl6tu/N9zt/jxMVUyk1ns4hW3/N2dvIGfN/BssqnQpjGlE9wp0YhwHNLd4GyQi0l1ZjHz2wRQtJKuMQ2s+wZ06RwQfFAt36TTTyFKbH/QC1yu0oYtl3LqmaipHBvF+w1I+ivuaabWbw4FBsGfFpfpps3jLIv+bsa4cbd4DYObSmRCR/8D9BNALfs0koKUbY4U9OtvVPJrQ/tcE+c66o+1/xMWhjRlbMEe11dqfNcdMhPmjjHUbzVOZsBQbWNGH8CjhRj7bOwJXZcrUTTPLrWMKcll7/mpfub4oZ0UmX5Cfjp0AwD+rkxT0bYQ2dMG/AVoYseIIC4QmtNUNQ== x-ms-exchange-transport-forked: True 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: BY5PR12MB4323.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8f0dca3b-d82f-4ba3-39a9-08d8555b6b3a X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Sep 2020 07:30:40.0346 (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: y0qdUa9vFE/rLHOwUZjz3y2FVfw6KJed58Gq75aKZeaAA+OfS+vdM0yxbq1xnVShy82TMUEgXhVRvJM5EL/d0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2872 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1599723050; bh=UlHlhNGZsyd9h/V9DOikEqajHEPWX9Ov0Ej5Ci0Be4o=; h=X-PGP-Universal: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-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:x-ms-exchange-transport-forked: 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=kn0qkU2dmu/D6sJfjAsSLKbShW2mkdDECSX2pro2SXfm/6zva/NdhH4ce6T9BRNdB oG4txTTkE9AAlGB5Mbn9AsW2zFm/OQF3/zMMFz7uOD5trOD+CvP5nC1yF82JY320n0 yXedcnRNL+nP2QhHFyBL8xjUnYWYdBgP7qQCiGNzvRXiJOcDdyuobeWG6+VeHtXB0t LlEOTu5NvfYNjkt8sMYFeOWSXyohlbeR7jHhRnHl1+1OQtIBd0DrSknX7/X5WXhjOh 7hHz6w5nH2848kH+5hSMw9PwZqGGt5cV74631v4i8jdsaRl8senpfsMwxXd2iTsSBH cpgjQ5k81TlDg== Subject: Re: [dpdk-dev] [PATCH] bus/pci: support segment value as address domain on Windows 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: [PATCH] bus/pci: support segment value as address domain on > Windows >=20 > On Tue, Aug 25, 2020 at 02:43:16PM +0300, Tal Shnaiderman wrote: > > Set the domain value for rte_pci_addr probing on Windows to the value > > of the PCI segment returned by SPDRP_BUSNUMBER. > > > > Signed-off-by: Tal Shnaiderman > > --- > > drivers/bus/pci/windows/pci.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/bus/pci/windows/pci.c > > b/drivers/bus/pci/windows/pci.c index 489aa7902a..a40acec609 100644 > > --- a/drivers/bus/pci/windows/pci.c > > +++ b/drivers/bus/pci/windows/pci.c > > @@ -195,8 +195,8 @@ get_device_pci_address(HDEVINFO dev_info, > > return -1; > > } > > > > - addr->domain =3D 0; > > - addr->bus =3D bus_num; > > + addr->domain =3D bus_num >> 8; > > + addr->bus =3D bus_num & 0xff; > > addr->devid =3D dev_and_func >> 16; > > addr->function =3D dev_and_func & 0xffff; > > return 0; > > -- > Is this needed to avoid collision of devices with the same B:D:F? Right, it can happen in virtualization setups when several virtual function= s can have the same BDF, e.g.:=20 PS > Get-NetAdapterHardwareInfo Name Segment Bus Device Function Slot NumaNode Pc= ieLinkSpeed ---- ------- --- ------ -------- ---- -------- --= ----------- Ethernet 0 0 10 0 = Unknown Ethernet 4 58601 0 2 0 0 = Unknown Ethernet 5 52956 0 2 0 0 = Unknown DPDK currently can detect either Ethernet 4 or ethernet 5 if only BDF is ch= ecked. Unix uses the Domain value, the equivalent value for Windows is Segment.