From owner-freebsd-current@freebsd.org Tue Mar 14 06:37:13 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74811D0B82E for ; Tue, 14 Mar 2017 06:37:13 +0000 (UTC) (envelope-from mulichao@outlook.com) Received: from APC01-HK2-obe.outbound.protection.outlook.com (mail-oln040092255014.outbound.protection.outlook.com [40.92.255.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E3BE9123F for ; Tue, 14 Mar 2017 06:37:12 +0000 (UTC) (envelope-from mulichao@outlook.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=jpMYe9Ay5il57sN/ieObWyIKvvb7s3TiD8mYf5oFxeU=; b=ppNrI4V3fUcaIniWo+9qaSIR7luw0TSNLXwSUq8kXW51KQQBJZu7nDPWAVDXnOLusUOT69xw9gU2Snif9jwoSzRZQsXwWX5Pw7gQvDb2FyQX2jj2zRwIv956/mlI+vhPoYh2Eop9IPmzVrGRlY6VXl5UOs9KoHHlSqDeHE7i6thrKsw2w2AEM37Mmw7Auo+1kpcS/7M6AzYnOF0FN73jvryLEMyjekFYdNgwy3FquULz2QUvlLeoS2iAZScpXlsDlR2+OYEJ2YmIfiuuH9w83gyYGEeUl/0P6dyprb+A2EvMluK57iw/CfjdXew0+Vlm5Ajnt9s9JWukjP5Lv3MR3w== Received: from SG2APC01FT006.eop-APC01.prod.protection.outlook.com (10.152.250.57) by SG2APC01HT127.eop-APC01.prod.protection.outlook.com (10.152.251.43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.7; Tue, 14 Mar 2017 06:37:09 +0000 Received: from HK2PR02MB0772.apcprd02.prod.outlook.com (10.152.250.51) by SG2APC01FT006.mail.protection.outlook.com (10.152.250.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.7 via Frontend Transport; Tue, 14 Mar 2017 06:37:09 +0000 Received: from HK2PR02MB0772.apcprd02.prod.outlook.com ([fe80::6523:244a:cb1b:f3bf]) by HK2PR02MB0772.apcprd02.prod.outlook.com ([fe80::6523:244a:cb1b:f3bf%14]) with mapi id 15.01.0961.021; Tue, 14 Mar 2017 06:37:09 +0000 From: Mu Lichao To: "freebsd-current@freebsd.org" Subject: PCI slot and function number for ARI enabled devices Thread-Topic: PCI slot and function number for ARI enabled devices Thread-Index: AQHSnIqKQ1B4saqSW0mDi1v/MWkR0w== Date: Tue, 14 Mar 2017 06:37:09 +0000 Message-ID: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: freebsd.org; dkim=none (message not signed) header.d=none;freebsd.org; dmarc=none action=none header.from=outlook.com; x-incomingtopheadermarker: OriginalChecksum:162ACAD900499B9DA46E63D97BB5A6ACE8E67D92B8E000ADEDE7ADB85F1258C8; UpperCasedChecksum:D2A85C031E80C8ACBDF93067CCB08E2B2A43281F7EB75905BCDCB0441EA6E2AB; SizeAsReceived:7642; Count:36 x-tmn: [dOLkfSLfV8e3HfBBpBtE4htk9P05o0vUZckXSt+4GAM=] x-incomingheadercount: 36 x-eopattributedmessage: 0 x-microsoft-exchange-diagnostics: 1; SG2APC01HT127; 5:xaGCC0xWRgV7xZ3lpuXMz9sbwHCwh+Jx4yxpZ/Vpq623TpSPu+m0x4Mfq8lG9+phkZPiZ93w3REY64DS7IPrzPewk0wX7u9w+t+Q5AQdpQbkLtxBafYTK+Wo52FVShmaNAIpKjWcCKZzUnqP6caxpA==; 24:mMbhgwwr8B/pxv+6a+7/+dwr8XvoDm6SskpOLWROjCntUfCcAYiHorC1scGNjteQVtOmUaoKZuhzgQPkxWBSsysfEJsAQVdhAPXMN/uYLjE=; 7:Hs36NvsSEuWA+RLA42+lsFb160x0qN+RU/O5ZwNyxzFOH1rqYB7udr5kbSw88dkNMvniFlofk1xazBddqqltYUlL3QpcX/vxwXtj5qRRYem0sZbZKa/AVoaZvkfNWlzduMinLb85tbZKUb0fusLQp2YEmW9W7LN1YdQgUTbfnBJPBbCZP4ot/USQG2QKwQn7YljwVHyR8STZ6e0wwv9DtzQQq9K1KixTG38wLOCjkS0qFmaUst7nLwUc4RBtJERDepfihV/AO5ZTeJtWfjrk5JoRMMudIGApcOOyUEs7I68rBoOhg1Lp/Af40Q+bb8RM x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(7070007)(98900017); DIR:OUT; SFP:1901; SCL:1; SRVR:SG2APC01HT127; H:HK2PR02MB0772.apcprd02.prod.outlook.com; FPR:; SPF:None; LANG:en; x-ms-office365-filtering-correlation-id: 492e0abf-b604-4716-7b91-08d46aa48a30 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201702061074)(5061506573)(5061507331)(1603103135)(1603101448)(1601125254)(1701031045); SRVR:SG2APC01HT127; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444000031); SRVR:SG2APC01HT127; BCL:0; PCL:0; RULEID:; SRVR:SG2APC01HT127; x-forefront-prvs: 02462830BE spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Mar 2017 06:37:09.0602 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2APC01HT127 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Mar 2017 06:37:13 -0000 Hi, I am trying to enable Intel 82599 10GbE SR-IOV VFs on FreeBSD 12-CURRENT, a= nd after enabled, the SR-IOV VFs can be seen by pciconf(1), but can not be = seen by lspci(1), which is installed from ports/sysutils/pciutils: # pciconf -l | tail -2 ixv0@pci0:1:0:128: class=3D0x020000 card=3D0x002a1fc1 chip=3D0x10ed808= 6 rev=3D0x01 hdr=3D0x00 ixv1@pci0:1:0:130: class=3D0x020000 card=3D0x002a1fc1 chip=3D0x10ed808= 6 rev=3D0x01 hdr=3D0x00 # lspci | grep 82599 01:00.0 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ = Network Connection (rev 01) 01:00.1 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ = Network Connection (rev 01) After some debugging, I found that it is because of ARI. After ARI is enabl= ed, the slot number is always 0 and the function number can be range betwee= n 0 and 255 when reading from /dev/pci, and this breaks lspci(1). Is it a behavior by design or not? Regards, Lichao Mu