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 EA41042B6A; Mon, 22 May 2023 04:41:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C1D90410DD; Mon, 22 May 2023 04:41:30 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 54A4B410D1 for ; Mon, 22 May 2023 04:41:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684723289; x=1716259289; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=4qkud+3izZNhhjeOyP4yaud0AsHxyzvNrbpULL+NwHQ=; b=WzxulGZLQmgJVJ+a0ItAiL1ylT3ndmtlTvS7oWVJVzpmb1T1uU6wQeUk vzgFIIkqBqEKLMV+JyAsYH3OnXgmddeQV9FdnBrl4yf4lH3j390DiJvkv mE8A6KO6U6F+CzQVYwltWfgVXsFxVIP3LYp8wFzi3irM4rTfsBmYTP2dJ 15pqi0jBzh/1e0VnDay0kG/cWbUN0qRloiWrakPBuRzzEK/baTHLEARj0 yvC7SlpFemzefGMz2wj6G/QhYH9GJ7/R28VMLJ5CVHgo9EzPwPpI18rEP cGtp5yU6rMuPgEnWp8hWUTAHi3iaaQhxhIcGpO+t6kPA7wm0pa8cTfTSO A==; X-IronPort-AV: E=McAfee;i="6600,9927,10717"; a="355156745" X-IronPort-AV: E=Sophos;i="6.00,183,1681196400"; d="scan'208";a="355156745" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2023 19:41:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10717"; a="793120952" X-IronPort-AV: E=Sophos;i="6.00,183,1681196400"; d="scan'208";a="793120952" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by FMSMGA003.fm.intel.com with ESMTP; 21 May 2023 19:41:28 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Sun, 21 May 2023 19:41:27 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Sun, 21 May 2023 19:41:27 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Sun, 21 May 2023 19:41:27 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.173) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Sun, 21 May 2023 19:41:27 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nYyDxhscS5RsbtXB5g8P2+DlNAqUwW0Hl9Dbsf+Zm+XPOH2/GNGYUBP1QPLAe8zDoXqxfK2fpYGi4AN9F7iptjZDSsQEBnMNJbqXAaZ+9ujVo1BGtnUbYDkyoeGT2laVyMVR93JKwuGCyWOUugJSd8xty8kQR75gqejASDxtsItDVIUP7wte0ZCxq1rhL+Yg8yfl5NdkEsE0Ijs5Cyfvcq1uULEWRfUGVMJmp52e6wk/+gC2naIQkRgAPWLCXJYbBfW396xGu92d/WHkEaKZpvsOciU7y3f/ZdON95X4NH1nPpYI58TJuaKZ+TGFPBU8s89BGf7glTJtaVS1hsUpPQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wsko/RbDKCdy21P+8eZMCs9+Zy3Hct+RfNjJj0/aZ0U=; b=d+e6nMR6yZkhKLL0kzDObhTLTS91cFdpK75btBp041suZJnmQJHgvnh+rU7SZxMICe+sGd/Ud+cGYqkiCHt6N2Mlu0o4Y/zGcIfh+YoCMuZ5qIqSdgygHuNVrGdCm+SRR/GGMWIuLQfHmqFm7QJxbxqAn8i36gD2Dk24G0Zcjm8Wpnq4FDwLy1chGWKS9xfTRQH0xrTy8SdQgsjm9egxxVfGhK8SzOhRXfrkl2xEmRF3r35knGMdOmBD4cfYYwfXy/0cic+0topp5FwI5sg43GgJDvht93KLHwpXTXACCNROO0ki4Xe42rDY9NgfubLXi8g8K+ppI3Gtk0prj4Q1Yw== 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 Received: from CO1PR11MB4900.namprd11.prod.outlook.com (2603:10b6:303:9e::8) by DS7PR11MB7836.namprd11.prod.outlook.com (2603:10b6:8:e3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.27; Mon, 22 May 2023 02:41:25 +0000 Received: from CO1PR11MB4900.namprd11.prod.outlook.com ([fe80::61a9:60d1:6cb1:8d38]) by CO1PR11MB4900.namprd11.prod.outlook.com ([fe80::61a9:60d1:6cb1:8d38%7]) with mapi id 15.20.6411.028; Mon, 22 May 2023 02:41:24 +0000 From: "Li, Miao" To: Stephen Hemminger CC: "dev@dpdk.org" , "skori@marvell.com" , "thomas@monjalon.net" , "david.marchand@redhat.com" , "ferruh.yigit@amd.com" , "Xia, Chenbo" , "Cao, Yahui" , "Burakov, Anatoly" Subject: RE: [PATCH v1 4/4] bus/pci: add VFIO sparse mmap support Thread-Topic: [PATCH v1 4/4] bus/pci: add VFIO sparse mmap support Thread-Index: AQHZhvk4utkWn+9ytUqxFee9+wddTa9bfKaAgAohGAA= Date: Mon, 22 May 2023 02:41:24 +0000 Message-ID: References: <20230418053012.10667-1-chenbo.xia@intel.com> <20230515064700.624054-1-miao.li@intel.com> <20230515064700.624054-5-miao.li@intel.com> <20230515085249.283dd7d0@hermes.local> In-Reply-To: <20230515085249.283dd7d0@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO1PR11MB4900:EE_|DS7PR11MB7836:EE_ x-ms-office365-filtering-correlation-id: a6e7964e-8174-42b9-9dc4-08db5a6e08d0 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: coV8QGi7BAACBNX8jL1z4raAYQMZcn4HXpZgxpIJHOEpeOgZmQ452LFVb6RWHmFUkNJcYU+ly12701mn5xMJzAO0iYF8XwD5/h5Yr7A2ko76Ql6CwblNlswDJNXXm+rE7JH03QUKvBemAURuD/auV/DphepDVQBSd2TxnPM6MML5GwwburhutFhVTTzIujTXJ53/nmn4iNfv5x0eQLm1ins/mGLxJTFJV/tDtoG2LtcZjvRLTSyPP4ASRIbQOiCZqvmD6gBLMMn5k+CRtPK9Tdg6wi5uYj8uPEbyCv4YQuSXzGBF8CeHwcWMQ3guWZVTfoDdes0nUbh36pox8CHNMv2RGvnucnqdxOUxqfJYYbTlzU7ddScjnRxU24FiJKB3e3T2w56WkB0b4baWkUFrn/Z366cxGn8cWT8Zb8Ev/jC1LgKO4ukVgogqoNgqPhOXvVz5LD2kwD981xKqru+ysqYo41hVhJODSYea+5/1gMtmNRO6sNbRoD1StVqteshvKGcRqd/QFNobp/nHM1AUuqdhPxPm2PkyUr2Y3wK/Q4tGgCc32sMbyadNKNL0nUwb+jO9GfjHoeAdU9Av59bGw6Aq1s5jM3M1/ptIBVSFQXf4/QQV5SutvYADs0fO0Rj3 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR11MB4900.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(39860400002)(376002)(366004)(346002)(136003)(396003)(451199021)(38100700002)(122000001)(82960400001)(38070700005)(33656002)(86362001)(55016003)(8676002)(8936002)(52536014)(107886003)(26005)(5660300002)(9686003)(6506007)(4744005)(2906002)(186003)(83380400001)(41300700001)(7696005)(316002)(66446008)(66476007)(76116006)(66946007)(66556008)(64756008)(54906003)(71200400001)(478600001)(53546011)(6916009)(4326008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?6Bc3Bdb7Hw0fESRcBi30eyaksd337847we7OkhU4gi1ZVYSE9onnw6CkerLY?= =?us-ascii?Q?5iQMOo+B4UXod7aYLDx3vSMMLtoGuSpuY2MHRtrIKd2wZsZwnITFBrh5iAVZ?= =?us-ascii?Q?nuujnDtlPpAeLPhhb46KlvwOTIChwMynjCtC9l2DKrzTmcEW2UH7JTPYDeiw?= =?us-ascii?Q?bOKGfLLrhaTeJivy2o6//PySm5J9AR4ocMBwDMyyo8Nk6Gs6EWienkPGFZfB?= =?us-ascii?Q?vyeNCVck6h3F9OV6XEcu7TgbllNKVSHXVoLNqMVPcDVev9aVZMh7vYgbKGbI?= =?us-ascii?Q?Dm0G+lhc49ju4+hXv1evo6gNtGkz8oSyj/rJ5SxMUQtrC0xrEPgEN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ChxdTg2+rZFc51dPOd0NR1MsQ59aWkW9+0X?= =?us-ascii?Q?HsBwkbU0E1Qj/Z3dS8ggcYbLkg2yYxIySQwNKmlu2iXbY/+IyYH4+IA9ltRM?= =?us-ascii?Q?8U4fPc6jV4jhLodhTV57In8Jf6s2odoxFzFW9YHBhuOBE7DhBTc3KItt/Y5F?= =?us-ascii?Q?/qTKdspToDjXbJrQbdD/KNd7Ne46l1Z6abJHtsONW+YHR9/xsYcLJScSEjHK?= =?us-ascii?Q?JlVK9EVCcd8bhHeK3RU0pu3I+QAtc+olkBHenbX2cZk58RZBLgI43DJik6Bt?= =?us-ascii?Q?qKBsKCjk2X+WvPqlvutiH7zpqDfzWQAbRKBobYMHEk1pXwyXExz2RiP9dWma?= =?us-ascii?Q?0XIY8SYSTwK6cilrI3o=3D?= 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: CO1PR11MB4900.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a6e7964e-8174-42b9-9dc4-08db5a6e08d0 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 May 2023 02:41:24.3268 (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: tVBevMJ54vWZ5y74+cQXWCuo/NBzTd6rwtPB8HERr+JX1jD73AtOIljvV5t7tKULFyMTGD9Kb8Sj46Au8CM1yw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB7836 X-OriginatorOrg: intel.com 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 Hi, I will add errno print in patch v3. > -----Original Message----- > From: Stephen Hemminger > Sent: Monday, May 15, 2023 11:53 PM > To: Li, Miao > Cc: dev@dpdk.org; skori@marvell.com; thomas@monjalon.net; > david.marchand@redhat.com; ferruh.yigit@amd.com; Xia, Chenbo > ; Cao, Yahui ; Burakov, Anatol= y > > Subject: Re: [PATCH v1 4/4] bus/pci: add VFIO sparse mmap support >=20 > On Mon, 15 May 2023 06:47:00 +0000 > Miao Li wrote: >=20 > > + map_addr =3D pci_map_resource(addr, > vfio_dev_fd, > > + bar->offset + sparse->offset, sparse- > >size, > > + RTE_MAP_FORCE_ADDRESS); > > + if (map_addr =3D=3D NULL) { > > + munmap(bar_addr, bar->size); > > + RTE_LOG(ERR, EAL, "Failed to map pci > BAR%d\n", > > + bar_index); >=20 > If mmap() fails then printing errno would help diagnose why.