From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0074.outbound.protection.outlook.com [104.47.41.74]) by dpdk.org (Postfix) with ESMTP id 3144A25D9 for ; Sun, 29 Jul 2018 10:45:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ow5EH7lhm/GVvC5wYxKpb9Vqk7gUdy7tsYpQTx07L/k=; b=EYcuv2Hp1RCG6Ibs4RP0124YBGTcD7tAv5CwtB4HxZKxVY5wsPYvQxXTPUoKFiWS4XfRP/zWqbnORC7yApAQ8Ni6JbLzGY3f95P3WtVGFWiOM1BKDHcG7A8yfaEu7rqxWYG5ZyqcLi4lFtBZNPOep5t8utIp3RuzhIF/Bt0IgnU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (122.167.109.76) by SN6PR07MB5005.namprd07.prod.outlook.com (2603:10b6:805:ac::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.19; Sun, 29 Jul 2018 08:45:10 +0000 Date: Sun, 29 Jul 2018 14:14:59 +0530 From: Jerin Jacob To: Thomas Monjalon Cc: Takeshi Yoshimura , dev@dpdk.org, Anatoly Burakov Message-ID: <20180729084457.GA8905@jerin> References: <20180712030833.4887-1-t.yoshimura8869@gmail.com> <20180720081347.6123-1-t.yoshimura8869@gmail.com> <30652783.zuAJVELDdt@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <30652783.zuAJVELDdt@xps> User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: [122.167.109.76] X-ClientProxiedBy: SG2PR02CA0025.apcprd02.prod.outlook.com (2603:1096:3:18::13) To SN6PR07MB5005.namprd07.prod.outlook.com (2603:10b6:805:ac::31) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7fad4841-8efc-48ad-af43-08d5f52f98dd X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:SN6PR07MB5005; X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB5005; 3:u3J5BdFt5eRuDmUz3CkU1dP4MEATVg284nCmnKX04YLaf2yaR+qhP44u+MxjkrlACC6+02cKRMuI/loowylX07EEKGUTWpn3Cs7vkugm+AjSSVUn4FvBOP7Aq8R5hCjlbeUX2dehhmlHauV7y6gf8zig3iDZVml0IJAJXrtbv8iCCGT8+drmJniLylwIDPNyiLQPAYsV4wsth8xHaWUTRxD97MrkZWl3RoYmxWqUHhwws5U9no7qw8WMHRNqWxM1; 25:tZ1X3jeM6VyX0mckmw7l6f311GttPJyW75NYN/AvNDlIKoQNmQ7uF46rF+wrWvCMKQrPpeACB7bW+kxOzqlcSqvgZjdU9EpyrarCtvF9lJflxCMQqkuxoHvZiO9oosK0D/sEXTwkACEzQZ6xbn1DeYTSqsIwgq4KhIOEGQGtwyTriFqQkNKsLcu94NfuwbFnLX+D9L6iTzr/pTvULXG0gasS+CY8XL+6fgWSaaGn6irtdI49wAnr1PnnTghj8jMwM6RBpb4MwHbO/wandSf881K7hfvtFpqswTt6CzQeLh/J+G4hb5h6Td1JCMOerSFxlgGIB971rhhEvNkvO74DDw==; 31:sg9IFnLTGLRh4tnA2vfxD1Xa8KW+c+5JZJQrj7kj0Hj+2yvdwClWC3hmgCJjZMX+XFXk9+FQp2qioaZJCzVQeeh4j0DSHpO0cb8gPbH8+aKp+WdbsKE98uYSpnpbn8/Qs+eLx9Zx24h2rSV3eehARszACghUmHcHS7vka1wRMPAcvs83Yok4DyUHAUWvHDNQwHs+KgzmYw94CQJQxnDCOEEjkyfKZeQjj9TOG72pz4I= X-MS-TrafficTypeDiagnostic: SN6PR07MB5005: X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB5005; 20:Owuvpk+ws+tqAtvOOkt9DH5UHIpRtHaEsEFDD6QyGXxVWPuKGDTZmNRJ11gp5l+thxjdIrD3/kFWRAN+vG8+PkrzSWme7c1cpLVtPiQCRSGjqLptm3hzNmrtR4FuPRlOisvBKrYVQuIKFK2GQqacMh+D1fzX1lMW+EXcBrQLg4Kve93zP+br/SGu8hcaVB3fWdV3DRZLgLk2Eh3hbXTUaERwVv6BJtc5bN0Nl4NKevd/N0pkJtVsUhvPgojX7rwBKwFETxOKqkfdFkNRlQR0X1MgdDfAJmDYcqBSnmOZLggTVrAP6uPFvRzH5bRDvOPzgbtMmKnPJyZ03r7S52NJAb3iZ5Qb3N0Ewh1IHRgZKSaDVmRPal8uAYXXu0QquQGn5QPX8NGfbbbAK9CbypUBy9desBSG9v1gi6Vpftc8fzkGDY36DTQ5/iSgAROOERCscWswGDlfb6fAQ1NoMVWsEKW5zX6Hwl38wYJEdvGs3AQ3KCIfcPaT3o/Lk3QK5x0ZT0MJSHWMf1uymWevRkfb9KNz/0k3QmAWtLSki6Jm/zYkx2edgUZle96OR74tgkrUp8Azqh0zjM8BmSRvSJJ+77Gg/etvWij7wR+8J3cPz2c= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(85827821059158)(84791874153150)(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(3231311)(944501410)(52105095)(3002001)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:SN6PR07MB5005; BCL:0; PCL:0; RULEID:; SRVR:SN6PR07MB5005; X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB5005; 4:3gOIdrkrzDQQFpeBuIMtpPFkbPN1QaWsLTreVF1DoTmMAKK0USsx1+Mfijs2Cs+xZyRP4bh6EYWK9HwPXRNCz2jgmr3XinDttYExOoVktdbKn6EuiZod5ZSmO2O9g5hg+YaLC7zvCarOnL7JjAoejK4mmJe7QX/HQGwAdZjvsZ7lCCzq28UCZAw+Dsgy4v5lzqBS4KgEd2G9eXDndza6JOaAlpcBi9iWMeyXt3jOynUXQusrdqRSrmwqAECRhFkvPXW6X/CqwJsGn2YcH/4AZeaHLd5+QVGJ4zDC+K/O2Qam2UkvtiD5ClzcZVxsEVO/LZryIy4igTZG8m5rwjGTOVG+2BEOF8BuU3axph0rYpD4IcTVrA0YriZq9MagGz5H X-Forefront-PRVS: 0748FF9A04 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(39850400004)(396003)(376002)(366004)(136003)(13464003)(189003)(199004)(33656002)(14444005)(33716001)(50466002)(68736007)(58126008)(54906003)(6496006)(81156014)(8676002)(81166006)(5660300001)(1076002)(16586007)(316002)(6916009)(8936002)(6666003)(44832011)(486006)(16526019)(476003)(26005)(186003)(956004)(2906002)(42882007)(7736002)(52116002)(76176011)(386003)(33896004)(25786009)(39060400002)(6246003)(4326008)(106356001)(105586002)(305945005)(53936002)(23726003)(3846002)(6116002)(478600001)(966005)(72206003)(11346002)(446003)(97736004)(55016002)(9686003)(229853002)(575784001)(6306002)(47776003)(66066001)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB5005; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN6PR07MB5005; 23:UZOp0G2BizkbXuJjnToRT9Bda2yHjOOMPmzLopvMA?= =?us-ascii?Q?GkKCDP/jY89yZKg9QsP4Sd99gPHlQ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CWIr+eWzmT5GcETNkqn1skF+4IXy2Nwy+v8ZZK9aIIkpmamWDH1bYi0PV5rdwKeTZTfKgfxP+VsS3DluP5RdKWLWYTcq2qgAmlDPdtrpu5bd9nTLZxpZOqkPameNlMJ6sHERq4SI3CBLQ6YwRL78VFW+D2uaZ6jzoIJYCWyi4y3EERzLynThHaYb5fnZxa2Zz1Md87lx/IeHqP8F5eH8O8j4SNmHSGcaaPmVTv59WGWtqgGysVxrk8wdaPwuidsefKm+McUo+neKneGsWTFuMkuvemYlsXEH2LcWzLt8nuNGyu7jMHJ/APmm637IG6Z0pVQ0ORmDka52CT3eGU4ysWAbov42lRUBNRxCR+cfykAk40nk38IEpEIi/7y1kiAY1fNKksmi1pid2cmP50GH9BL4zD5UL/u199KbzQO1s5jkuJKf1ZnxIzepJ8TAjLrcQ==; 5:L+K4q/V4UI6Dipt52CJRinEuZWcYYwNS+jWeRVigqiQ51rjNzKGNfpeaRzvXnxAQNy8coMSdNlHk9rXBOKr9MSwiMrXJwxCmEWxpFCqBFOvj9C7mgbdteExKbx+sPIzo0ChPZsJcsSkSa8ew84PHhZWsop1yX1nibCxO8N+AjwI=; 7:Vw7HZswsA/Q91rZjpT2MADh4JVWGBSCHiJvbkLzzIa2j8ekFJiN9Wc8KZ6OC/wsoC+JXcIKXmsN5ZH829jEIkAKn/aZn9hTy1DHRimh6Gb6IAzSD6x+SzbXHZ01LRgSOq2/Ah+X4p7v608mcRfx/LE3wP4ZEBc8WMDw+ehFl8Q8Ojk1kp/BkYB84Pwx9WrttXIVJKhBj2QAtUcl6T9mY6CSLr4TRkAZxay4k07vQqnasbmAXKbnRlkkGD9+bf7nW SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2018 08:45:10.3504 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7fad4841-8efc-48ad-af43-08d5f52f98dd X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB5005 Subject: Re: [dpdk-dev] [PATCH v5] vfio: fix workaround of BAR mapping 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: , X-List-Received-Date: Sun, 29 Jul 2018 08:45:14 -0000 -----Original Message----- > Date: Thu, 26 Jul 2018 11:35:43 +0200 > From: Thomas Monjalon > To: Takeshi Yoshimura > Cc: dev@dpdk.org, Anatoly Burakov > Subject: Re: [dpdk-dev] [PATCH v5] vfio: fix workaround of BAR mapping > > > 20/07/2018 10:13, Takeshi Yoshimura: > > Currently, VFIO will try to map around MSI-X table in the BARs. When > > MSI-X table (page-aligned) size is equal to (page-aligned) size of BAR, > > VFIO will just skip the BAR. > > > > Recent kernel versions will allow VFIO to map the entire BAR containing > > MSI-X tables (*), so instead of trying to map around the MSI-X vector > > or skipping the BAR entirely if it's not possible, we can now try > > mapping the entire BAR first. If mapping the entire BAR doesn't > > succeed, fall back to the old behavior of mapping around MSI-X table or > > skipping the BAR. > > > > (*): "vfio-pci: Allow mapping MSIX BAR", > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ > > commit/?id=a32295c612c57990d17fb0f41e7134394b2f35f6 > > > > Fixes: 90a1633b2347 ("eal/linux: allow to map BARs with MSI-X tables") > > > > Signed-off-by: Takeshi Yoshimura > > Reviewed-by: Anatoly Burakov This change set breaks thunderx/octeontx platform with following error.(Tested with 4.9.0 kernel) EAL: probe driver: 177d:a034 net_thunderx EAL: using IOMMU type 1 (Type 1) EAL: pci_map_resource(): cannot mmap(44, 0xffff60200000, 0x200000, 0x40000000000): Invalid argument (0xffffffffffffffff) EAL: PCI device 0001:01:00.2 on NUMA socket 0 EAL: probe driver: 177d:a034 net_thunderx EAL: pci_map_resource(): cannot mmap(47, 0xffff60600000, 0x200000, 0x40000000000): Invalid argument (0xffffffffffffffff) According Linux kernel change, user space application suppose to use VFIO_REGION_INFO_CAP_MSIX_MAPPABLE capability to detect this feature to work < 4.15 kernel. Right? if so, Why we are doing this retry based logic? > > Applied, thanks > > >