List patch comments

GET /api/patches/73521/comments/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Link: 
<https://patches.dpdk.org/api/patches/73521/comments/?format=api&page=1>; rel="first",
<https://patches.dpdk.org/api/patches/73521/comments/?format=api&page=1>; rel="last"
Vary: Accept
[ { "id": 115479, "web_url": "https://patches.dpdk.org/comment/115479/", "msgid": "<CAJFAV8z0U9K+BCcn71DpVhhFoASPTfBvTNC0Q9DJdYoB4jm6ZA@mail.gmail.com>", "list_archive_url": "https://inbox.dpdk.org/dev/CAJFAV8z0U9K+BCcn71DpVhhFoASPTfBvTNC0Q9DJdYoB4jm6ZA@mail.gmail.com", "date": "2020-07-08T09:38:55", "subject": "Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "submitter": { "id": 1173, "url": "https://patches.dpdk.org/api/people/1173/?format=api", "name": "David Marchand", "email": "david.marchand@redhat.com" }, "content": "On Wed, Jul 8, 2020 at 11:26 AM <alvinx.zhang@intel.com> wrote:\n>\n> From: Alvin Zhang <alvinx.zhang@intel.com>\n>\n> When mapping a PCI BAR containing an MSI-X table, some devices do not\n> need to actually map this BAR or only need to map part of them, which\n> may cause the mapping to fail. Now some checks are added and a non-NULL\n> initial value is set to the variable to avoid this situation.\n>\n> Fixes: 2fd3567e5425 (\"pci: use OS generic memory mapping functions\")\n> Cc: talshn@mellanox.com\n>\n> Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>\n\n\nI guess this had to do with:\nhttps://bugs.dpdk.org/show_bug.cgi?id=503\n\nReview please.", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 1DB6CA00BE;\n\tWed, 8 Jul 2020 11:39:24 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 77CBC1D9CF;\n\tWed, 8 Jul 2020 11:39:23 +0200 (CEST)", "from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com\n [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 766441D9AC\n for <dev@dpdk.org>; Wed, 8 Jul 2020 11:39:21 +0200 (CEST)", "from mail-vk1-f200.google.com (mail-vk1-f200.google.com\n [209.85.221.200]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-350-Kqn0UwJoOJO1c7129jKt_w-1; Wed, 08 Jul 2020 05:39:07 -0400", "by mail-vk1-f200.google.com with SMTP id e12so7326715vkd.3\n for <dev@dpdk.org>; Wed, 08 Jul 2020 02:39:07 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1594201160;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=JAd6BKaA0SzwMqLYb/nnQTzyb2XAbzqmg62uF6UxxIE=;\n b=jC/wm1Z8BZBsVVRhEF4Tz1ZLv2cfvgmbhSKJ9u5J2FY9E7//Ku4fp+T223U4WWIc4voDhk\n qRcNF898CNN8wa3wy4E63PS+ieU6xtFbMcEbvJEG9efDw0pBp3pzuq0LDbRINfpZFYa+pi\n x5lDpoD37V7xU5PznThWhtTiAdmXuPQ=", "X-MC-Unique": "Kqn0UwJoOJO1c7129jKt_w-1", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:mime-version:references:in-reply-to:from:date\n :message-id:subject:to:cc;\n bh=JAd6BKaA0SzwMqLYb/nnQTzyb2XAbzqmg62uF6UxxIE=;\n b=p1JKTbAD6o6TTjyVYcrx15L18/l/uR0fVyEm3sjTyQdh5jgbMhO+k6x6QuJWl6MahV\n 3OirDjNqvKpYjInpNQO3DyDjq75s3ErgaT3wdEP6F2by/a6QYRlgQ/NAAngqVUo+MAEE\n v7N40KFLbRWIvGAPlFO+HCLpRRowZCNcVJTc/SJLPvNWONfdhWW2U9HHnlVZeTxCaAyA\n KXdi+APNlk9ZsyE0fU71JVOUlXn2cAoHxjsSfOO/kYnX+Q3N1S/yhDDuPHbYdAzh0kgC\n 1aWwL879GBLBGhjk3be/98ExTc+fnQjv+PYpM+07oNtxg0z2n1bWoHzNT0ikNL5Bcwba\n qxzg==", "X-Gm-Message-State": "AOAM532MphvLorIz+KW5oqNzFBrICiH2IX9ppksWSNH2freIFu0ruJhY\n XvBoXj2B8LJdJ1f2Cgw4UUP4RTdGBSDdIW4SOwdgJ8D1B/BiPGM8R/h5k2XOXszC+52o/VF5H/z\n GyrHHv3dTgEd2s//Rj7g=", "X-Received": [ "by 2002:a67:c58c:: with SMTP id\n h12mr35783298vsk.141.1594201146741;\n Wed, 08 Jul 2020 02:39:06 -0700 (PDT)", "by 2002:a67:c58c:: with SMTP id\n h12mr35783287vsk.141.1594201146481;\n Wed, 08 Jul 2020 02:39:06 -0700 (PDT)" ], "X-Google-Smtp-Source": "\n ABdhPJwSssdeYL5k82db0luYyJFD4h1RfF4tLaqopGFo3m/bovWqMUcVnriYyM0vT/G4dmhDhgxofdS1fb7wEPEIw14=", "MIME-Version": "1.0", "References": "<20200708092435.9776-1-alvinx.zhang@intel.com>", "In-Reply-To": "<20200708092435.9776-1-alvinx.zhang@intel.com>", "From": "David Marchand <david.marchand@redhat.com>", "Date": "Wed, 8 Jul 2020 11:38:55 +0200", "Message-ID": "\n <CAJFAV8z0U9K+BCcn71DpVhhFoASPTfBvTNC0Q9DJdYoB4jm6ZA@mail.gmail.com>", "To": "Tal Shnaiderman <talshn@mellanox.com>, \"Burakov,\n Anatoly\" <anatoly.burakov@intel.com>", "Cc": "dev <dev@dpdk.org>, Beilei Xing <beilei.xing@intel.com>,\n Jeff Guo <jia.guo@intel.com>,\n \"Ma, LihongX\" <lihongx.ma@intel.com>, \"Zhang,\n AlvinX\" <alvinx.zhang@intel.com>", "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Type": "text/plain; charset=\"UTF-8\"", "Subject": "Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 115526, "web_url": "https://patches.dpdk.org/comment/115526/", "msgid": "<MN2PR11MB4063A9376C7FFFC772C2C1909C670@MN2PR11MB4063.namprd11.prod.outlook.com>", "list_archive_url": "https://inbox.dpdk.org/dev/MN2PR11MB4063A9376C7FFFC772C2C1909C670@MN2PR11MB4063.namprd11.prod.outlook.com", "date": "2020-07-08T13:58:09", "subject": "Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "submitter": { "id": 1276, "url": "https://patches.dpdk.org/api/people/1276/?format=api", "name": "Chenbo Xia", "email": "chenbo.xia@intel.com" }, "content": "Hi Alvin,\n\nCC the maintainers. Comments below.\n\n> -----Original Message-----\n> From: dev <dev-bounces@dpdk.org> On Behalf Of alvinx.zhang@intel.com\n> Sent: Wednesday, July 8, 2020 5:25 PM\n> To: dev@dpdk.org\n> Cc: Xing, Beilei <beilei.xing@intel.com>; Guo, Jia <jia.guo@intel.com>\n> Subject: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource\n> \n> From: Alvin Zhang <alvinx.zhang@intel.com>\n> \n> When mapping a PCI BAR containing an MSI-X table, some devices do not need\n> to actually map this BAR or only need to map part of them, which may cause the\n> mapping to fail. Now some checks are added and a non-NULL initial value is set\n> to the variable to avoid this situation.\n> \n> Fixes: 2fd3567e5425 (\"pci: use OS generic memory mapping functions\")\n> Cc: talshn@mellanox.com\n> \n> Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>\n> ---\n> drivers/bus/pci/linux/pci_vfio.c | 12 +++++++++++-\n> 1 file changed, 11 insertions(+), 1 deletion(-)\n> \n> diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c\n> index fdeb9a8..9143bfc 100644\n> --- a/drivers/bus/pci/linux/pci_vfio.c\n> +++ b/drivers/bus/pci/linux/pci_vfio.c\n> @@ -547,6 +547,14 @@\n> \t\t\tbar_index,\n> \t\t\tmemreg[0].offset, memreg[0].size,\n> \t\t\tmemreg[1].offset, memreg[1].size);\n> +\n> +\t\tif (memreg[0].size == 0 && memreg[1].size == 0) {\n> +\t\t\t/* No need to map this BAR */\n> +\t\t\tRTE_LOG(DEBUG, EAL, \"Skipping BAR%d\\n\", bar_index);\n> +\t\t\tbar->size = 0;\n> +\t\t\tbar->addr = 0;\n> +\t\t\treturn 0;\n> +\t\t}\n\nI'm not sure if this corner case will happen. If you confirmed it,\nJust ignore this.\n\n> \t} else {\n> \t\tmemreg[0].offset = bar->offset;\n> \t\tmemreg[0].size = bar->size;\n> @@ -556,7 +564,9 @@\n> \tbar_addr = mmap(bar->addr, bar->size, 0, MAP_PRIVATE |\n> \t\t\tMAP_ANONYMOUS | additional_flags, -1, 0);\n> \tif (bar_addr != MAP_FAILED) {\n> -\t\tvoid *map_addr = NULL;\n> +\t\t/* Set non NULL initial value for in case of no PCI mapping */\n> +\t\tvoid *map_addr = bar_addr;\n> +\n\nI see the issue that this patch wants to fix is based on an old kernel.\nIn older vfio-pci kernel module, MSI related reg cannot be mmaped\nin userspace while in newer kernel it can be. That's why sometimes\nit cannot be reproduced (https://bugs.dpdk.org/show_bug.cgi?id=503)\n\nSo under the condition of old kernel, there could be an example that\nMemreg 0 has size 0 but Memreg 1 has non-zero size, which leads to\nMemreg 1 cannot be mmaped.\n\nSo I'm fine with this part of code change. As this issue is blocking test,\nwe should do fast confirm and review.\n\nThanks,\nChenbo\n\n> \t\tif (memreg[0].size) {\n> \t\t\t/* actual map of first part */\n> \t\t\tmap_addr = pci_map_resource(bar_addr, vfio_dev_fd,\n> --\n> 1.8.3.1", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 167A8A0526;\n\tWed, 8 Jul 2020 15:58:15 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id DF4C51DD89;\n\tWed, 8 Jul 2020 15:58:14 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id E07271DD89\n for <dev@dpdk.org>; Wed, 8 Jul 2020 15:58:12 +0200 (CEST)", "from orsmga004.jf.intel.com ([10.7.209.38])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 08 Jul 2020 06:58:12 -0700", "from orsmsx102.amr.corp.intel.com ([10.22.225.129])\n by orsmga004.jf.intel.com with ESMTP; 08 Jul 2020 06:58:11 -0700", "from ORSEDG001.ED.cps.intel.com (10.7.248.4) by\n ORSMSX102.amr.corp.intel.com (10.22.225.129) with Microsoft SMTP Server (TLS)\n id 14.3.439.0; Wed, 8 Jul 2020 06:58:11 -0700", "from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.168)\n by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS)\n id 14.3.439.0; Wed, 8 Jul 2020 06:58:11 -0700", "from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22)\n by MN2PR11MB4048.namprd11.prod.outlook.com (2603:10b6:208:153::29)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.29; Wed, 8 Jul\n 2020 13:58:09 +0000", "from MN2PR11MB4063.namprd11.prod.outlook.com\n ([fe80::7cde:8326:5010:c47e]) by MN2PR11MB4063.namprd11.prod.outlook.com\n ([fe80::7cde:8326:5010:c47e%7]) with mapi id 15.20.3153.029; Wed, 8 Jul 2020\n 13:58:09 +0000" ], "IronPort-SDR": [ "\n L61WxFM7I0eNJPb53aG36dQCOmOt4zTLoYBZmerccvvWQu/gGl5jx1MameReJIv20Vi1f2FgW0\n GIdLSBCs1qIg==", "\n 2Y1DEUyXbP1dwKGraI18c+EFDLIvsTcRnPpOcnki44KCrGWPURaQs5aP2LLjxhgcQgJhqjyiwS\n nYsJljDrtTkw==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9675\"; a=\"149305768\"", "E=Sophos;i=\"5.75,327,1589266800\"; d=\"scan'208\";a=\"149305768\"", "E=Sophos;i=\"5.75,327,1589266800\"; d=\"scan'208\";a=\"427845832\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=IM+7oxFrvXljq5jFg/uEX02+upeG3wxhRrP1IpknvwXqxKNeVLUz4iy3hjfJ04QUKEzPEz3TyPtniz41KyipsT2Rn5YK3F9oPMI5vNO+HYVySsZpQDwdJOAR0h9eeXtmG2WhJn+FmwVt37judQWQ3iMKgk4hk6khn4a3tWjp+7fL/BBMWvjCBNmdacLnHUXrcY0TwBDou5MHiyiH2NezffzMHYpwZzmBFpCDECKcuTRAZLO4ebgNeQsApTYg1SctTiV7T26GcG0zyv6kYNHjvpnZDvkO0MwyKGnK1K+ynROsk5JGVjMnlh5o0rawu6w3giD6BVtr50zUlTSk0lu5wA==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=JQfXFFr9hqvQNzC4Q+xM9wjc9tDzzLLl90E035w4nbE=;\n b=fjZg6UihVW52TshFfQPUEgIR0lDJoajd+OQ9s1cI44/rNn0QkDynWr9rYwCayXIjZq/9j1b1vlUg172iaqM0v7x9DoYxvf/z/lv/HqtEeqqMbWUFfTQ6Fcy0rKcHQBjr1ZwWhRi3HLVly+5CE34aBt9MmGZRklqvfOrAyTSDBe+gg7OswFHgU3gOt0kjP3yldhY0zfOeXePRxGF4DkgHXxhD0ckO/5x7Qv2yn3REb4KrYIQmu4Jz//owTZu3hWwVCbyIM+i+Uqj5Xdfb/g0OsZsC9d7dAd+aD5pW2Ih/mKp99W0JwC/EqmqadJL4b7xC7oEGuCNPzjVF4cx+Ri6p6g==", "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;\n dkim=pass header.d=intel.com; arc=none", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com;\n s=selector2-intel-onmicrosoft-com;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=JQfXFFr9hqvQNzC4Q+xM9wjc9tDzzLLl90E035w4nbE=;\n b=qPmPveCbbPND/QW7P872i3X3CRSREfboBrweim/zxA+6ZW32/sAaM3anv8QYVrvAbOtBjAafwMtxoAW9k6g1mKB7Z7ZuY0Rcc1KJa7U2PeZr9IU2tVlcQqDKHzalUzwC1pe+Z2IWPGcj0KLOURFsjXBgUIcsLTY+2JNGuL0eDTk=", "From": "\"Xia, Chenbo\" <chenbo.xia@intel.com>", "To": "\"Zhang, AlvinX\" <alvinx.zhang@intel.com>, \"dev@dpdk.org\" <dev@dpdk.org>", "CC": "\"Xing, Beilei\" <beilei.xing@intel.com>, \"Guo, Jia\" <jia.guo@intel.com>,\n David Marchand <david.marchand@redhat.com>, Tal Shnaiderman\n <talshn@mellanox.com>, \"Burakov, Anatoly\" <anatoly.burakov@intel.com>,\n \"thomas@monjalon.net\" <thomas@monjalon.net>", "Thread-Topic": "[dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "Thread-Index": "AQHWVQny4OL7AABPaUCG1PWCsxlEOaj9sExQ", "Date": "Wed, 8 Jul 2020 13:58:09 +0000", "Message-ID": "\n <MN2PR11MB4063A9376C7FFFC772C2C1909C670@MN2PR11MB4063.namprd11.prod.outlook.com>", "References": "<20200708092435.9776-1-alvinx.zhang@intel.com>", "In-Reply-To": "<20200708092435.9776-1-alvinx.zhang@intel.com>", "Accept-Language": "zh-CN, en-US", "Content-Language": "en-US", "X-MS-Has-Attach": "", "X-MS-TNEF-Correlator": "", "dlp-product": "dlpe-windows", "dlp-reaction": "no-action", "dlp-version": "11.2.0.6", "authentication-results": "intel.com; dkim=none (message not signed)\n header.d=none;intel.com; dmarc=none action=none header.from=intel.com;", "x-originating-ip": "[192.198.147.199]", "x-ms-publictraffictype": "Email", "x-ms-office365-filtering-correlation-id": "68b3049c-75de-4e1e-bfbd-08d82346f296", "x-ms-traffictypediagnostic": "MN2PR11MB4048:", "x-ld-processed": "46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr", "x-ms-exchange-transport-forked": "True", "x-microsoft-antispam-prvs": "\n <MN2PR11MB4048351C00D0C0CC0D0F46C99C670@MN2PR11MB4048.namprd11.prod.outlook.com>", "x-ms-oob-tlc-oobclassifiers": "OLM:10000;", "x-forefront-prvs": "04583CED1A", "x-ms-exchange-senderadcheck": "1", "x-microsoft-antispam": "BCL:0;", "x-microsoft-antispam-message-info": "\n sWl12OzHyfIpGs+AswLPaZoj6gZCP5K450zo39Zd6dfulrVTgtxLXXujoQT76S7CDF4clkYF+fjroCetz+xIaFwD8wUMZFa38GQ5EHseylt3MpVZHVBNDnhhwIxmjlOKn9LwUqQtGU0eSMtjWyUGb5twGYbl8V6l3X/BqNwFo+Vc1YwngsXIQtKRhbx94iSb27sqMe34oyBPnNS8ukH0OLqJQLNhQRVR9Z2PS2Gk5IFHZgYQFw8XMxN08JsiL6XjhTsUPpT15iNF8QB3FnTD3/qx5ZNS99aBvrva+oMdeC1I8QXI3JBM7xwxWeaUdmcaP8sPhTaHCWrQ2l/Qu2Snbn2vcc4WNwkC0uitsyfAB34=", "x-forefront-antispam-report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE;\n SFTY:;\n SFS:(4636009)(136003)(366004)(39860400002)(346002)(396003)(376002)(6506007)(53546011)(4326008)(7696005)(76116006)(9686003)(66446008)(66476007)(66946007)(66556008)(64756008)(52536014)(55016002)(86362001)(2906002)(186003)(26005)(71200400001)(8676002)(5660300002)(8936002)(33656002)(316002)(478600001)(110136005)(83380400001)(54906003);\n DIR:OUT; SFP:1102;", "x-ms-exchange-antispam-messagedata": "\n DSPiikRz7jahQwny8yu2BMSQ5vJMqvaUcQtyZrXPDE+oe2GVnlP5UdCjou6TOrLT7SXj75Z8tHawwSV2mMPNu8lFemRqVX33bxOxlZALtSea4fhnGjRUCdBiJeSYTDMjRwO1mQlPmdI0IRDYZy4ZNjTb/yJ7B78sgiuGb6mRE55Y37a8Yj05cMrZn6UCECjlWXrn1xTOs5JnGWTTuxjDF6VOhFakjQA155M1WROnm/Nl7g6gLWZVmazTLh6AJJlGLO7EgbRI+5tY2yS791ZexXeg3ztPISXgvAYOcL7oIzSWuDk1HAiDZaWrBQLKs47eJjV37WueXurukOA7XNvypBxg+i9YgmZ2ihj5cOur2ei71NCV1/RjiHTC+wrLC6TUcMjtMI/CSCwFCNVyBtcfVR1hWLCkYCSAn2ARhKYRFGHnRuuJuD3eYT2tfiwqLNrQzU5WF452aXmtPvVQ6MLCbwUMZ1HPQZHSFNZShpooScZ3DXgeUPUi+bq+75/B0ipi", "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": "MN2PR11MB4063.namprd11.prod.outlook.com", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 68b3049c-75de-4e1e-bfbd-08d82346f296", "X-MS-Exchange-CrossTenant-originalarrivaltime": "08 Jul 2020 13:58:09.5574 (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": "\n RDeRRYgWDjGm/DP08hktP5eAdM++V7JBEvKPM04X/0bVBu/w75O5HDwD2oA0EVYhRDTGJeOip2Np79xB0LA8Gw==", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "MN2PR11MB4048", "X-OriginatorOrg": "intel.com", "Subject": "Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 115573, "web_url": "https://patches.dpdk.org/comment/115573/", "msgid": "<MWHPR1101MB22540DE860C4BC63B67FF9E0FB640@MWHPR1101MB2254.namprd11.prod.outlook.com>", "list_archive_url": "https://inbox.dpdk.org/dev/MWHPR1101MB22540DE860C4BC63B67FF9E0FB640@MWHPR1101MB2254.namprd11.prod.outlook.com", "date": "2020-07-09T02:25:41", "subject": "Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "submitter": { "id": 1303, "url": "https://patches.dpdk.org/api/people/1303/?format=api", "name": "Xiao, QimaiX", "email": "qimaix.xiao@intel.com" }, "content": "Tested-by: Xiao Qimai <qimaix.xiao@intel.com>\n\nRegards,\nXiao Qimai\n\n> -----Original Message-----\n> From: dev <dev-bounces@dpdk.org> On Behalf Of alvinx.zhang@intel.com\n> Sent: Wednesday, July 8, 2020 5:25 PM\n> To: dev@dpdk.org\n> Cc: Xing, Beilei <beilei.xing@intel.com>; Guo, Jia <jia.guo@intel.com>\n> Subject: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource\n> \n> From: Alvin Zhang <alvinx.zhang@intel.com>\n> \n> When mapping a PCI BAR containing an MSI-X table, some devices do not\n> need to actually map this BAR or only need to map part of them, which may\n> cause the mapping to fail. Now some checks are added and a non-NULL initial\n> value is set to the variable to avoid this situation.\n> \n> Fixes: 2fd3567e5425 (\"pci: use OS generic memory mapping functions\")\n> Cc: talshn@mellanox.com\n> \n> Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>\n> ---\n> drivers/bus/pci/linux/pci_vfio.c | 12 +++++++++++-\n> 1 file changed, 11 insertions(+), 1 deletion(-)\n> \n> diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c\n> index fdeb9a8..9143bfc 100644\n> --- a/drivers/bus/pci/linux/pci_vfio.c\n> +++ b/drivers/bus/pci/linux/pci_vfio.c\n> @@ -547,6 +547,14 @@\n> \t\t\tbar_index,\n> \t\t\tmemreg[0].offset, memreg[0].size,\n> \t\t\tmemreg[1].offset, memreg[1].size);\n> +\n> +\t\tif (memreg[0].size == 0 && memreg[1].size == 0) {\n> +\t\t\t/* No need to map this BAR */\n> +\t\t\tRTE_LOG(DEBUG, EAL, \"Skipping BAR%d\\n\",\n> bar_index);\n> +\t\t\tbar->size = 0;\n> +\t\t\tbar->addr = 0;\n> +\t\t\treturn 0;\n> +\t\t}\n> \t} else {\n> \t\tmemreg[0].offset = bar->offset;\n> \t\tmemreg[0].size = bar->size;\n> @@ -556,7 +564,9 @@\n> \tbar_addr = mmap(bar->addr, bar->size, 0, MAP_PRIVATE |\n> \t\t\tMAP_ANONYMOUS | additional_flags, -1, 0);\n> \tif (bar_addr != MAP_FAILED) {\n> -\t\tvoid *map_addr = NULL;\n> +\t\t/* Set non NULL initial value for in case of no PCI mapping */\n> +\t\tvoid *map_addr = bar_addr;\n> +\n> \t\tif (memreg[0].size) {\n> \t\t\t/* actual map of first part */\n> \t\t\tmap_addr = pci_map_resource(bar_addr,\n> vfio_dev_fd,\n> --\n> 1.8.3.1", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 98FD8A0526;\n\tThu, 9 Jul 2020 04:25:48 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E9CA11DBC6;\n\tThu, 9 Jul 2020 04:25:47 +0200 (CEST)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by dpdk.org (Postfix) with ESMTP id EC4B51D8D1\n for <dev@dpdk.org>; Thu, 9 Jul 2020 04:25:45 +0200 (CEST)", "from orsmga005.jf.intel.com ([10.7.209.41])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 08 Jul 2020 19:25:44 -0700", "from fmsmsx107.amr.corp.intel.com ([10.18.124.205])\n by orsmga005.jf.intel.com with ESMTP; 08 Jul 2020 19:25:44 -0700", "from fmsmsx156.amr.corp.intel.com (10.18.116.74) by\n fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS)\n id 14.3.439.0; Wed, 8 Jul 2020 19:25:44 -0700", "from FMSEDG001.ED.cps.intel.com (10.1.192.133) by\n fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS)\n id 14.3.439.0; Wed, 8 Jul 2020 19:25:43 -0700", "from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.52) by\n edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server\n (TLS) id 14.3.439.0; Wed, 8 Jul 2020 19:25:43 -0700", "from MWHPR1101MB2254.namprd11.prod.outlook.com\n (2603:10b6:301:58::11) by MWHPR11MB1807.namprd11.prod.outlook.com\n (2603:10b6:300:112::20) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20; Thu, 9 Jul\n 2020 02:25:41 +0000", "from MWHPR1101MB2254.namprd11.prod.outlook.com\n ([fe80::f192:356f:89f:c71f]) by MWHPR1101MB2254.namprd11.prod.outlook.com\n ([fe80::f192:356f:89f:c71f%9]) with mapi id 15.20.3174.022; Thu, 9 Jul 2020\n 02:25:41 +0000" ], "IronPort-SDR": [ "\n Cery14g+2HxrqHpceqPhlNiYko7Tq/tv89TFmCMJV/5wjv0goQtffm/uj4EGNcqA0YRnsRzpam\n PXO2B40sXANw==", "\n hmt4p57hmUlszWCfLczsu00dB8ftyuPL2xw0XoXpWtwdiC0O4jN3ZszjUj02wKo6UX8pTz3dAX\n x81jx38A28mw==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9676\"; a=\"147002465\"", "E=Sophos;i=\"5.75,330,1589266800\"; d=\"scan'208\";a=\"147002465\"", "E=Sophos;i=\"5.75,330,1589266800\"; d=\"scan'208\";a=\"457727694\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=bZXENwosWMN2Jlz8Ew+sEy2fUphMaEQuKP7vDvkedcdP2dzpLuBeu1yAroOIGUSMVBC2Tw8c/vX4IBIva0edQEl6Yajfm++SDE8AEn1BYXebL4LgWBK++B0xHFZJPqiKTGgpzm6ySTpiW0mcd0EdGj0vVeHdn7fmK4WPNovkE5mjn7bYH9mC0TUDSa5YgpKyMXTvAGr+SaAB6mDuBA4+yTRu2Rl2i9wCyKBGMXC1MLXUZVZY84Bc5MNkbgl9ZrnrjjTVEnVD6+9dNHqLqh+tUqGRUSUQy/gQWQFBximPLH58Wp0cOP0+bbmH62ioQJziHfAuEem9vZdAAj+HzQH/EQ==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=1kGPTuqW/IutCfRdzqTpwPQ22hN969aTLRUi717tVCg=;\n b=NasMoew5VL9p6kZ4K0HoLhJU6nfT8soR5uC6/jbbVvyYfqOXr9BN9YecMQ7W0ko8G2v4E3QpyfjKVcs9dH8+k8FFTs/Uzn0GFJibkBr03IeJrgc+dHsscT8tRqzeytrNOY8cmyfXp3eAKdfc9Sp2FMfeZcMsyFtHiu2t8WxMfOEOVLpjMIrLIctFrSPC4keTIP9zUn/n4VL4X4fxi63SV7yszFiTgKoHUdvAI4Cnsc64PzP+2Lv4f1Gi+GfFqFZM2i9mKxf07XSoNQpTSbV7lwgKJzrLUluSLD6DBoX6xey5tKOpXhV3SD+CeHzM/eI5+ERi/RysndkcNwfdaskkfA==", "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;\n dkim=pass header.d=intel.com; arc=none", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com;\n s=selector2-intel-onmicrosoft-com;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=1kGPTuqW/IutCfRdzqTpwPQ22hN969aTLRUi717tVCg=;\n b=VcGRDaG2oR3bnrxoxQCW0JatuivEaPbDPNSvk3v7/JwgJwvBEnb7MhD8pRS5nMIGAV74pRMlGIDpktr9roovj3IIXudqppc8J/zpF5paHvXBrMfqni1SFpxQEq7Zco1KpC9QL4teQSlDkJHaAjXNvOvb6n6E8LIr+EZD/HcYCZs=", "From": "\"Xiao, QimaiX\" <qimaix.xiao@intel.com>", "To": "\"Zhang, AlvinX\" <alvinx.zhang@intel.com>, \"dev@dpdk.org\" <dev@dpdk.org>", "CC": "\"Xing, Beilei\" <beilei.xing@intel.com>, \"Guo, Jia\" <jia.guo@intel.com>", "Thread-Topic": "[dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "Thread-Index": "AQHWVQn1Kv3hVKap6kmUnzcuDo7yvqj+hfTA", "Date": "Thu, 9 Jul 2020 02:25:41 +0000", "Message-ID": "\n <MWHPR1101MB22540DE860C4BC63B67FF9E0FB640@MWHPR1101MB2254.namprd11.prod.outlook.com>", "References": "<20200708092435.9776-1-alvinx.zhang@intel.com>", "In-Reply-To": "<20200708092435.9776-1-alvinx.zhang@intel.com>", "Accept-Language": "en-US", "Content-Language": "en-US", "X-MS-Has-Attach": "", "X-MS-TNEF-Correlator": "", "authentication-results": "intel.com; dkim=none (message not signed)\n header.d=none;intel.com; dmarc=none action=none header.from=intel.com;", "x-originating-ip": "[192.55.46.46]", "x-ms-publictraffictype": "Email", "x-ms-office365-filtering-correlation-id": "ea114845-641f-4d8f-7b65-08d823af605d", "x-ms-traffictypediagnostic": "MWHPR11MB1807:", "x-ld-processed": "46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr", "x-ms-exchange-transport-forked": "True", "x-microsoft-antispam-prvs": "\n <MWHPR11MB18079DB5E2DBE76D8BF76AE2FB640@MWHPR11MB1807.namprd11.prod.outlook.com>", "x-ms-oob-tlc-oobclassifiers": "OLM:6108;", "x-ms-exchange-senderadcheck": "1", "x-microsoft-antispam": "BCL:0;", "x-microsoft-antispam-message-info": "\n 7EjllpnZw59HQpfxSKdHXXUhxbtFSliXw6rGfW/VRQ0u/EVsB1SDgWP26wvYIo5Ct/SkQdsOuRpZEqzpzyLmLSGaOEj7j/90lpN8vZqAy+apiDGZorKWavFyF2cUzZp+aUgTNdPVIlFN6D62hk0E8CVoE5YCbEL11G9JW0x9jyY/UdPrTH00Tl+oiy3cxtmdqs982TissoiP+4nLew1iODw5XGLkzVwdxwl6dFEabq1RanDbp0iG9e3zzXxj67hy2fd8wtP3ocC3bHYCiKmAdCoPj8xaZekkeP8hOltiXM1++3T+VbdJ0rB98chbyy7JOLE2XOjKOwNx5Y2+Px7hbg==", "x-forefront-antispam-report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:MWHPR1101MB2254.namprd11.prod.outlook.com; PTR:;\n CAT:NONE;\n SFTY:;\n SFS:(4636009)(396003)(39860400002)(346002)(136003)(366004)(376002)(7696005)(107886003)(26005)(66446008)(66476007)(83380400001)(186003)(64756008)(53546011)(316002)(55016002)(76116006)(6506007)(4326008)(66946007)(66556008)(110136005)(478600001)(86362001)(8936002)(9686003)(54906003)(52536014)(5660300002)(71200400001)(2906002)(33656002)(8676002);\n DIR:OUT; SFP:1102;", "x-ms-exchange-antispam-messagedata": "\n CVDwEFYU3rr6mXJ8HO5HEsHddnsrJtuR37s756QdsiJOUVgVg7Eqq2dwTFA0NsS/16FjKQb1klW0P7THY15mj//7tYwbJPHHYQK92e/pm3B6i8N50/x+mdxpmiuIahSicHrlrGzF5QBstVrIQsX4Oj5HvayMJme5uVd8avJZup91fC+7PRxgizAqwjeUqHSbC8EXgWK2IIH1qLJU+SpO62rWfnb7YxwYTZa7wspcypT51H4gIwvZ5ev3KOh3NeLR27+r+0lU9+4fUUzO0JJkgqHje+lTAY7pOfU+xyzvTze4wfjW/tg9f4qyyQ7BGURV6wOKYMjYaNff/P+tPJbsq75gHHfn+aHiMhH/7A9j8wXxpaVbhF6D7DEq+YYIGgS97ZSHS117pWcH+9/jQxbX6xvyZuhu0jiblSOA0qe9T4NmYLYZf2MyI2CqlkGF+geZa4sWXF2+atBbdfl2e4bqBrk+7QOprZz5GF7LdhMWKGM=", "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": "\n MWHPR1101MB2254.namprd11.prod.outlook.com", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n ea114845-641f-4d8f-7b65-08d823af605d", "X-MS-Exchange-CrossTenant-originalarrivaltime": "09 Jul 2020 02:25:41.4543 (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": "\n Y+pDEfJQudEFsOjqtfARBwKARFE3VYxAi8Yai5Q+sU4WeA6weLmrLjhJxpPmJbmdUslNVkAdejPcFYRR3fkyaQ==", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "MWHPR11MB1807", "X-OriginatorOrg": "intel.com", "Subject": "Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 115581, "web_url": "https://patches.dpdk.org/comment/115581/", "msgid": "<SN6PR11MB29607F6D22C26D2FD2F1EE0B9F640@SN6PR11MB2960.namprd11.prod.outlook.com>", "list_archive_url": "https://inbox.dpdk.org/dev/SN6PR11MB29607F6D22C26D2FD2F1EE0B9F640@SN6PR11MB2960.namprd11.prod.outlook.com", "date": "2020-07-09T05:13:53", "subject": "Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "submitter": { "id": 1398, "url": "https://patches.dpdk.org/api/people/1398/?format=api", "name": "Alvin Zhang", "email": "alvinx.zhang@intel.com" }, "content": "Hi Chenbo,\n\nThanks your comments.\n\n> -----Original Message-----\n> From: Xia, Chenbo <chenbo.xia@intel.com>\n> Sent: Wednesday, July 8, 2020 9:58 PM\n> To: Zhang, AlvinX <alvinx.zhang@intel.com>; dev@dpdk.org\n> Cc: Xing, Beilei <beilei.xing@intel.com>; Guo, Jia <jia.guo@intel.com>; David\n> Marchand <david.marchand@redhat.com>; Tal Shnaiderman\n> <talshn@mellanox.com>; Burakov, Anatoly <anatoly.burakov@intel.com>;\n> thomas@monjalon.net\n> Subject: RE: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource\n> \n> Hi Alvin,\n> \n> CC the maintainers. Comments below.\n> \n> > -----Original Message-----\n> > From: dev <dev-bounces@dpdk.org> On Behalf Of alvinx.zhang@intel.com\n> > Sent: Wednesday, July 8, 2020 5:25 PM\n> > To: dev@dpdk.org\n> > Cc: Xing, Beilei <beilei.xing@intel.com>; Guo, Jia <jia.guo@intel.com>\n> > Subject: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource\n> >\n> > From: Alvin Zhang <alvinx.zhang@intel.com>\n> >\n> > When mapping a PCI BAR containing an MSI-X table, some devices do not\n> > need to actually map this BAR or only need to map part of them, which\n> > may cause the mapping to fail. Now some checks are added and a\n> > non-NULL initial value is set to the variable to avoid this situation.\n> >\n> > Fixes: 2fd3567e5425 (\"pci: use OS generic memory mapping functions\")\n> > Cc: talshn@mellanox.com\n> >\n> > Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>\n> > ---\n> > drivers/bus/pci/linux/pci_vfio.c | 12 +++++++++++-\n> > 1 file changed, 11 insertions(+), 1 deletion(-)\n> >\n> > diff --git a/drivers/bus/pci/linux/pci_vfio.c\n> > b/drivers/bus/pci/linux/pci_vfio.c\n> > index fdeb9a8..9143bfc 100644\n> > --- a/drivers/bus/pci/linux/pci_vfio.c\n> > +++ b/drivers/bus/pci/linux/pci_vfio.c\n> > @@ -547,6 +547,14 @@\n> > \t\t\tbar_index,\n> > \t\t\tmemreg[0].offset, memreg[0].size,\n> > \t\t\tmemreg[1].offset, memreg[1].size);\n> > +\n> > +\t\tif (memreg[0].size == 0 && memreg[1].size == 0) {\n> > +\t\t\t/* No need to map this BAR */\n> > +\t\t\tRTE_LOG(DEBUG, EAL, \"Skipping BAR%d\\n\", bar_index);\n> > +\t\t\tbar->size = 0;\n> > +\t\t\tbar->addr = 0;\n> > +\t\t\treturn 0;\n> > +\t\t}\n> \n> I'm not sure if this corner case will happen. If you confirmed it, Just ignore this.\n\nIn theory, it is entirely possible if the misx-table size is equal to the bar size.\n\n> \n> > \t} else {\n> > \t\tmemreg[0].offset = bar->offset;\n> > \t\tmemreg[0].size = bar->size;\n> > @@ -556,7 +564,9 @@\n> > \tbar_addr = mmap(bar->addr, bar->size, 0, MAP_PRIVATE |\n> > \t\t\tMAP_ANONYMOUS | additional_flags, -1, 0);\n> > \tif (bar_addr != MAP_FAILED) {\n> > -\t\tvoid *map_addr = NULL;\n> > +\t\t/* Set non NULL initial value for in case of no PCI mapping */\n> > +\t\tvoid *map_addr = bar_addr;\n> > +\n> \n> I see the issue that this patch wants to fix is based on an old kernel.\n> In older vfio-pci kernel module, MSI related reg cannot be mmaped in userspace\n> while in newer kernel it can be. That's why sometimes it cannot be reproduced\n> (https://bugs.dpdk.org/show_bug.cgi?id=503)\n> \n> So under the condition of old kernel, there could be an example that Memreg 0\n> has size 0 but Memreg 1 has non-zero size, which leads to Memreg 1 cannot be\n> mmaped.\n\nYes, it is.\n\n> \n> So I'm fine with this part of code change. As this issue is blocking test, we should\n> do fast confirm and review.\n> \n> Thanks,\n> Chenbo\n> \n> > \t\tif (memreg[0].size) {\n> > \t\t\t/* actual map of first part */\n> > \t\t\tmap_addr = pci_map_resource(bar_addr, vfio_dev_fd,\n> > --\n> > 1.8.3.1", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 57C9DA0526;\n\tThu, 9 Jul 2020 07:14:04 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id AA5C61DA6E;\n\tThu, 9 Jul 2020 07:14:03 +0200 (CEST)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by dpdk.org (Postfix) with ESMTP id BD9271D57F\n for <dev@dpdk.org>; Thu, 9 Jul 2020 07:14:01 +0200 (CEST)", "from orsmga006.jf.intel.com ([10.7.209.51])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 08 Jul 2020 22:13:57 -0700", "from orsmsx106.amr.corp.intel.com ([10.22.225.133])\n by orsmga006.jf.intel.com with ESMTP; 08 Jul 2020 22:13:57 -0700", "from ORSEDG001.ED.cps.intel.com (10.7.248.4) by\n ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS)\n id 14.3.439.0; Wed, 8 Jul 2020 22:13:56 -0700", "from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.172)\n by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS)\n id 14.3.439.0; Wed, 8 Jul 2020 22:13:56 -0700", "from SN6PR11MB2960.namprd11.prod.outlook.com (2603:10b6:805:d4::12)\n by SN6PR11MB3423.namprd11.prod.outlook.com (2603:10b6:805:db::22)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.22; Thu, 9 Jul\n 2020 05:13:54 +0000", "from SN6PR11MB2960.namprd11.prod.outlook.com\n ([fe80::20d6:bb89:9836:e68a]) by SN6PR11MB2960.namprd11.prod.outlook.com\n ([fe80::20d6:bb89:9836:e68a%7]) with mapi id 15.20.3174.022; Thu, 9 Jul 2020\n 05:13:54 +0000" ], "IronPort-SDR": [ "\n UnuwpL2z+R7YNjDSht5ofInkW+79gl3BJ9r7yvGodGDSTfnOpmMv83/J8XL3uI+rq7nDC7/M6E\n tG+1g1X//2Gg==", "\n d+li3QHK01dBvfzeg5lSGVvZrKtd+p22PMgqvj3uWBQxs3oHU2dM/DwkPlXzWuAXEy2YBzy0dm\n DpeXZnMiQObA==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9676\"; a=\"147014055\"", "E=Sophos;i=\"5.75,330,1589266800\"; d=\"scan'208\";a=\"147014055\"", "E=Sophos;i=\"5.75,330,1589266800\"; d=\"scan'208\";a=\"284023694\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=VXqK+1kD35sGyWV1bD3zriLyY/vfy3ywBtZsdve26YQdwVEwQWG9b4qsh7l8RXXVsiuok8XABfowdiDqAGYG4FBy2UPH6hlhsLtcW20aFyRwdLFKbTSLMu+96nHrpBAWFdeAC/UOFHc2vY5YkyXuO3CiEf8TQ/QP/mfwyuiKBVbHXEcVo7UIRia5G1o7F6SqqfZQQUhVferJD2f1vt789m8i6Dl+ilbZFx5w5s7mvn29yndTlBhk7m9PQ2lIoxz89P6QDUpjLLxHkU50ndxK64yMyqyHE+wPGW9DhCAAHy0BsuE03Tjfxjt1QTgQukOlXsSISuoVKah46sdcRF2D1w==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=ddF0Or70Yu3QblYTMAqMRDIbLEeY55U3o6RU3Hsy2fU=;\n b=czC9skqjCEPmK62FDiyg2DhRpAGEaiVaHH2KrXIhD36FGdTg5DWVZsge2M0CLe2KY6kbITNkJuaWU4GWZWLr255gG5fiFFCAFZ98fJbbzeJBycWy0d5Igu/HTTWh3VBo0KVeBxPHVm1TZ23eJ5qKnkvh73hcrhXHJN8nE9elFB1bTALj1ia2GvXZd36oz4vZw9s8tqoyAk0rUVSyW1HTUBL+YjKSU8ApBzVleuIG5r1ygb7VTKZI2X1mLJBOQUrhCTWgcuRyflmJQSSwR+OG9k7IzJxHJNCf9Va8DJQkHZgHhM/lFU1vtHtxyqdKI3nWAkPOE1ZYHWQb5J6/Waw9Pw==", "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;\n dkim=pass header.d=intel.com; arc=none", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com;\n s=selector2-intel-onmicrosoft-com;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=ddF0Or70Yu3QblYTMAqMRDIbLEeY55U3o6RU3Hsy2fU=;\n b=zpQa/TVWjqUZj0+WbLk6wUkRVr5XQ9qJSM9yknVvveffDJ7WLmlhFjQSITmql8DB/39VcRRsgmtqrCLxbAXlwuWmooMXtk1KtVgjX/DprkWleUSQvlyQ5oL0ujhaT+bzBEq0kON9dpDvAVCNBvIbyNGU8fYun0D2t3nPysUm1g8=", "From": "\"Zhang, AlvinX\" <alvinx.zhang@intel.com>", "To": "\"Xia, Chenbo\" <chenbo.xia@intel.com>, \"dev@dpdk.org\" <dev@dpdk.org>", "CC": "David Marchand <david.marchand@redhat.com>, Tal Shnaiderman\n <talshn@mellanox.com>, \"Burakov, Anatoly\" <anatoly.burakov@intel.com>,\n \"thomas@monjalon.net\" <thomas@monjalon.net>", "Thread-Topic": "[dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "Thread-Index": "AQHWVQnn1RDxUua/TUiFOP0g9lYVRKj9tYuAgAD9q1A=", "Date": "Thu, 9 Jul 2020 05:13:53 +0000", "Message-ID": "\n <SN6PR11MB29607F6D22C26D2FD2F1EE0B9F640@SN6PR11MB2960.namprd11.prod.outlook.com>", "References": "<20200708092435.9776-1-alvinx.zhang@intel.com>\n <MN2PR11MB4063A9376C7FFFC772C2C1909C670@MN2PR11MB4063.namprd11.prod.outlook.com>", "In-Reply-To": "\n <MN2PR11MB4063A9376C7FFFC772C2C1909C670@MN2PR11MB4063.namprd11.prod.outlook.com>", "Accept-Language": "en-US", "Content-Language": "en-US", "X-MS-Has-Attach": "", "X-MS-TNEF-Correlator": "", "authentication-results": "intel.com; dkim=none (message not signed)\n header.d=none;intel.com; dmarc=none action=none header.from=intel.com;", "x-originating-ip": "[192.55.46.46]", "x-ms-publictraffictype": "Email", "x-ms-office365-filtering-correlation-id": "3d3be8dd-999b-44b2-267b-08d823c6dfea", "x-ms-traffictypediagnostic": "SN6PR11MB3423:", "x-ld-processed": "46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr", "x-ms-exchange-transport-forked": "True", "x-microsoft-antispam-prvs": "\n <SN6PR11MB342356E201D8D24F6B4369849F640@SN6PR11MB3423.namprd11.prod.outlook.com>", "x-ms-oob-tlc-oobclassifiers": "OLM:10000;", "x-ms-exchange-senderadcheck": "1", "x-microsoft-antispam": "BCL:0;", "x-microsoft-antispam-message-info": "\n JYJ1T3brUODyUD9ASJ4mrH8/4s0cD617q3GHSGIXH6zvAtvJ/Mml2FfMN1ZrAMggoKi7Moq6Z1HAx5tISzIysi07XT26vetceimTbJ1FS8LAEf+D02QdJKclZSB/jkqn3DLiY0Ya4YwGOgyG5umt/RvTge97HOjm2QjTECYF0d3athtQo+CZn0nKOOsv+/A3GWnmNsnB0LEbXFoNdliuVqFBYFn6w+K1MsgLvwgxlAdjme9oe/Hbc2Khw1TNMnjJcFcpWAE8Zu92zmmrl8EzAtt+rnwjn3XxoJFHfKsJqJwhKO2RN1gUNeKjXwuPdse6aJ03xRmHTNkXqonk5Mv0rATWtwuCBvyzXKjYEVFDT+3phSCd0Cq/INm16rTia9q68S1ZqgWclKRBpUXMWnV54A==", "x-forefront-antispam-report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:SN6PR11MB2960.namprd11.prod.outlook.com; PTR:; CAT:NONE;\n SFTY:;\n SFS:(4636009)(366004)(39860400002)(396003)(136003)(376002)(346002)(8936002)(4326008)(6506007)(53546011)(26005)(186003)(52536014)(7696005)(9686003)(86362001)(54906003)(66946007)(316002)(5660300002)(110136005)(8676002)(71200400001)(66446008)(64756008)(33656002)(83380400001)(55016002)(76116006)(2906002)(66556008)(478600001)(66476007);\n DIR:OUT; SFP:1102;", "x-ms-exchange-antispam-messagedata": "\n 9AdZblvWUpNs4kY5hpgeHNn1ufVoUdycs59+Ymbe6FOFKWD00d81LU1ha5RGew7GDgSVstOo8U4GUChCyHFinW1uZOUZO6Sym6xCqdoJyPerLekOO/TzDCzmIhEAfrU4Qk+Yk8x/fcU08QIwmwEHgSMU0tAgK2eblbmf/gV5psFb0HMIYiKSQ7EHIogSCQNLwbOA0/XDe3TM/1xPYtbqEJUtT8PCu3cm9YiIcMh68C5P/FW1BG570ZmemQUu+us3zBDYpbK0MHCxe025yj6svhScAMrgEshR3/5SpmFKlXvvNmH5LfQJA51ulyXZFm6iY7N6EU1nC7CxGZIM+ClxPawZvhXlDWSXS36kU7v1NbawsPZ/fwJ6rELATkH//KYBXJjcILf/T+NG2G7XR3/k8K1bdDp10dvYNQIHGCEcH/c=", "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": "SN6PR11MB2960.namprd11.prod.outlook.com", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 3d3be8dd-999b-44b2-267b-08d823c6dfea", "X-MS-Exchange-CrossTenant-originalarrivaltime": "09 Jul 2020 05:13:53.8447 (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": "\n Cc5pll1nvBkiGEFGZN2ZcDDKGXUo90LNLfMtYJqfgicqi4Fgib3u06mQLfkVmrG13fuVWxNQKV/u+g3B5sxRbg==", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "SN6PR11MB3423", "X-OriginatorOrg": "intel.com", "Subject": "Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 115583, "web_url": "https://patches.dpdk.org/comment/115583/", "msgid": "<MN2PR11MB40638532949F0DCD3549FB6E9C640@MN2PR11MB4063.namprd11.prod.outlook.com>", "list_archive_url": "https://inbox.dpdk.org/dev/MN2PR11MB40638532949F0DCD3549FB6E9C640@MN2PR11MB4063.namprd11.prod.outlook.com", "date": "2020-07-09T05:21:18", "subject": "Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "submitter": { "id": 1276, "url": "https://patches.dpdk.org/api/people/1276/?format=api", "name": "Chenbo Xia", "email": "chenbo.xia@intel.com" }, "content": "> -----Original Message-----\n> From: Zhang, AlvinX <alvinx.zhang@intel.com>\n> Sent: Thursday, July 9, 2020 1:14 PM\n> To: Xia, Chenbo <chenbo.xia@intel.com>; dev@dpdk.org\n> Cc: David Marchand <david.marchand@redhat.com>; Tal Shnaiderman\n> <talshn@mellanox.com>; Burakov, Anatoly <anatoly.burakov@intel.com>;\n> thomas@monjalon.net\n> Subject: RE: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource\n> \n> Hi Chenbo,\n> \n> Thanks your comments.\n> \n> > -----Original Message-----\n> > From: Xia, Chenbo <chenbo.xia@intel.com>\n> > Sent: Wednesday, July 8, 2020 9:58 PM\n> > To: Zhang, AlvinX <alvinx.zhang@intel.com>; dev@dpdk.org\n> > Cc: Xing, Beilei <beilei.xing@intel.com>; Guo, Jia\n> > <jia.guo@intel.com>; David Marchand <david.marchand@redhat.com>; Tal\n> > Shnaiderman <talshn@mellanox.com>; Burakov, Anatoly\n> > <anatoly.burakov@intel.com>; thomas@monjalon.net\n> > Subject: RE: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource\n> >\n> > Hi Alvin,\n> >\n> > CC the maintainers. Comments below.\n> >\n> > > -----Original Message-----\n> > > From: dev <dev-bounces@dpdk.org> On Behalf Of alvinx.zhang@intel.com\n> > > Sent: Wednesday, July 8, 2020 5:25 PM\n> > > To: dev@dpdk.org\n> > > Cc: Xing, Beilei <beilei.xing@intel.com>; Guo, Jia\n> > > <jia.guo@intel.com>\n> > > Subject: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource\n> > >\n> > > From: Alvin Zhang <alvinx.zhang@intel.com>\n> > >\n> > > When mapping a PCI BAR containing an MSI-X table, some devices do\n> > > not need to actually map this BAR or only need to map part of them,\n> > > which may cause the mapping to fail. Now some checks are added and a\n> > > non-NULL initial value is set to the variable to avoid this situation.\n> > >\n> > > Fixes: 2fd3567e5425 (\"pci: use OS generic memory mapping functions\")\n> > > Cc: talshn@mellanox.com\n> > >\n> > > Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>\n> > > ---\n> > > drivers/bus/pci/linux/pci_vfio.c | 12 +++++++++++-\n> > > 1 file changed, 11 insertions(+), 1 deletion(-)\n> > >\n> > > diff --git a/drivers/bus/pci/linux/pci_vfio.c\n> > > b/drivers/bus/pci/linux/pci_vfio.c\n> > > index fdeb9a8..9143bfc 100644\n> > > --- a/drivers/bus/pci/linux/pci_vfio.c\n> > > +++ b/drivers/bus/pci/linux/pci_vfio.c\n> > > @@ -547,6 +547,14 @@\n> > > \t\t\tbar_index,\n> > > \t\t\tmemreg[0].offset, memreg[0].size,\n> > > \t\t\tmemreg[1].offset, memreg[1].size);\n> > > +\n> > > +\t\tif (memreg[0].size == 0 && memreg[1].size == 0) {\n> > > +\t\t\t/* No need to map this BAR */\n> > > +\t\t\tRTE_LOG(DEBUG, EAL, \"Skipping BAR%d\\n\", bar_index);\n> > > +\t\t\tbar->size = 0;\n> > > +\t\t\tbar->addr = 0;\n> > > +\t\t\treturn 0;\n> > > +\t\t}\n> >\n> > I'm not sure if this corner case will happen. If you confirmed it, Just ignore this.\n> \n> In theory, it is entirely possible if the misx-table size is equal to the bar size.\n> \n> >\n> > > \t} else {\n> > > \t\tmemreg[0].offset = bar->offset;\n> > > \t\tmemreg[0].size = bar->size;\n> > > @@ -556,7 +564,9 @@\n> > > \tbar_addr = mmap(bar->addr, bar->size, 0, MAP_PRIVATE |\n> > > \t\t\tMAP_ANONYMOUS | additional_flags, -1, 0);\n> > > \tif (bar_addr != MAP_FAILED) {\n> > > -\t\tvoid *map_addr = NULL;\n> > > +\t\t/* Set non NULL initial value for in case of no PCI mapping */\n> > > +\t\tvoid *map_addr = bar_addr;\n> > > +\n> >\n> > I see the issue that this patch wants to fix is based on an old kernel.\n> > In older vfio-pci kernel module, MSI related reg cannot be mmaped in\n> > userspace while in newer kernel it can be. That's why sometimes it\n> > cannot be reproduced\n> > (https://bugs.dpdk.org/show_bug.cgi?id=503)\n> >\n> > So under the condition of old kernel, there could be an example that\n> > Memreg 0 has size 0 but Memreg 1 has non-zero size, which leads to\n> > Memreg 1 cannot be mmaped.\n> \n> Yes, it is.\n> \n> >\n> > So I'm fine with this part of code change. As this issue is blocking\n> > test, we should do fast confirm and review.\n> >\n> > Thanks,\n> > Chenbo\n> >\n> > > \t\tif (memreg[0].size) {\n> > > \t\t\t/* actual map of first part */\n> > > \t\t\tmap_addr = pci_map_resource(bar_addr, vfio_dev_fd,\n> > > --\n> > > 1.8.3.1\n\nAcked-by: Chenbo Xia <chenbo.xia@intel.com>", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 647A9A0526;\n\tThu, 9 Jul 2020 07:21:25 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 38B0B1DA6E;\n\tThu, 9 Jul 2020 07:21:24 +0200 (CEST)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by dpdk.org (Postfix) with ESMTP id 491341D9D4\n for <dev@dpdk.org>; Thu, 9 Jul 2020 07:21:22 +0200 (CEST)", "from fmsmga008.fm.intel.com ([10.253.24.58])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 08 Jul 2020 22:21:21 -0700", "from fmsmsx105.amr.corp.intel.com ([10.18.124.203])\n by fmsmga008.fm.intel.com with ESMTP; 08 Jul 2020 22:21:21 -0700", "from fmsmsx102.amr.corp.intel.com (10.18.124.200) by\n FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS)\n id 14.3.439.0; Wed, 8 Jul 2020 22:21:21 -0700", "from FMSEDG001.ED.cps.intel.com (10.1.192.133) by\n FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS)\n id 14.3.439.0; Wed, 8 Jul 2020 22:21:20 -0700", "from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.172)\n by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id\n 14.3.439.0; Wed, 8 Jul 2020 22:21:20 -0700", "from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22)\n by MN2PR11MB3869.namprd11.prod.outlook.com (2603:10b6:208:138::16)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.28; Thu, 9 Jul\n 2020 05:21:18 +0000", "from MN2PR11MB4063.namprd11.prod.outlook.com\n ([fe80::7cde:8326:5010:c47e]) by MN2PR11MB4063.namprd11.prod.outlook.com\n ([fe80::7cde:8326:5010:c47e%7]) with mapi id 15.20.3153.031; Thu, 9 Jul 2020\n 05:21:18 +0000" ], "IronPort-SDR": [ "\n uVVZg5McqgcBn8l1zKcaEACGMYgLq3/YX2PJ9K9joNEOzrZQm5ZKcWsCPoCi8U08LneXY8sZpe\n 1jPrg+m87eVw==", "\n fsdofnxMowc5dLzOg/si4pHXLt3tY3lNQUilukulQuvM8tFJzquhrno85L1blfJr3tZG1JUrrT\n k4+JtDqLIinw==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9676\"; a=\"166036983\"", "E=Sophos;i=\"5.75,330,1589266800\"; d=\"scan'208\";a=\"166036983\"", "E=Sophos;i=\"5.75,330,1589266800\"; d=\"scan'208\";a=\"268659451\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=b80SD2QKBaBQmJ5jjmEBrcFqcIJ32iP6C3ixPiFFbU5uQUzd1tgSiFI/rMt+WL+HLQp4yMy/h3eRhildFxlGLB0zDgquLDPz0q2xdSk7NwkPh5wCboRDrduQhfNbb+1B3p7TXAN8zccfuuyZhE4iJTYdKzCmhUNGermy0jR3VqxSaq+vI6Sn8zrZpL9omv+PBn1llfglZq9SS86x14qZlMpHf2pTcimQ9DPTY1tEq9jlm0s4C9TrHDzITZW+SYAwtSdtEr260kXYBAbDyuWcFsEr62DMFsSNOLnEnA80Em5B2JZsTupF6i7X6VaEYBh2DotdXZtG2S+GpCpIYhVekg==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=6Lcur2E1FLF+6p0gRBTOuTQ36In5DbPm5Rx33fHPu7I=;\n b=SlAJUO00Bm5T/on61ZexoV+xtGvY5rLtlxmVjoQEbnlhl1b/yu3/maKdigqbOeDm9Lp3UTE/lneFaECnImk6OTRlQFuUq2SylaI3u9zzmpVPAjzZltdxsqqJgX6pqK/8j6LNvPkJaWSspzu+5BhrahB7+7TW6Lymrm6TL/pm0QXo7VocgYmPOMvLwxe03lQHw/p4Z4+Z30UhnNdLSc892ENMlAW2o5DRuTQq7wfHE3vBEJ+ctJUMYuq9GhqdWNSZrWEag7g8lHyfdbOf/OD2D5qCx6jfjckjYq+feNLu3dZGchBR4sepayPG7BugqyK6/lMsyTrWSWD+Tiez6wTUOw==", "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;\n dkim=pass header.d=intel.com; arc=none", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com;\n s=selector2-intel-onmicrosoft-com;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=6Lcur2E1FLF+6p0gRBTOuTQ36In5DbPm5Rx33fHPu7I=;\n b=MCKkbvQqlgVslDBtnIi9qPdADIcVyqCSRyjCO9U84AUWd7uskn2ZSQdjAsDYVlSa0vz4/E9W8uPwRAl0ScPqIgd8qjpe3EDi3cp+9lCAgiJrvaHPmU05rXBw4aOc/biURb+4AnJn7FqwxDwLS8oQSGeEbC3/csbiLB3is8CmBCc=", "From": "\"Xia, Chenbo\" <chenbo.xia@intel.com>", "To": "\"Zhang, AlvinX\" <alvinx.zhang@intel.com>, \"dev@dpdk.org\" <dev@dpdk.org>", "CC": "David Marchand <david.marchand@redhat.com>, Tal Shnaiderman\n <talshn@mellanox.com>, \"Burakov, Anatoly\" <anatoly.burakov@intel.com>,\n \"thomas@monjalon.net\" <thomas@monjalon.net>", "Thread-Topic": "[dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "Thread-Index": "AQHWVQny4OL7AABPaUCG1PWCsxlEOaj9sExQgAEFGYCAAAFVAA==", "Date": "Thu, 9 Jul 2020 05:21:18 +0000", "Message-ID": "\n <MN2PR11MB40638532949F0DCD3549FB6E9C640@MN2PR11MB4063.namprd11.prod.outlook.com>", "References": "<20200708092435.9776-1-alvinx.zhang@intel.com>\n <MN2PR11MB4063A9376C7FFFC772C2C1909C670@MN2PR11MB4063.namprd11.prod.outlook.com>\n <SN6PR11MB29607F6D22C26D2FD2F1EE0B9F640@SN6PR11MB2960.namprd11.prod.outlook.com>", "In-Reply-To": "\n <SN6PR11MB29607F6D22C26D2FD2F1EE0B9F640@SN6PR11MB2960.namprd11.prod.outlook.com>", "Accept-Language": "zh-CN, en-US", "Content-Language": "en-US", "X-MS-Has-Attach": "", "X-MS-TNEF-Correlator": "", "authentication-results": "intel.com; dkim=none (message not signed)\n header.d=none;intel.com; dmarc=none action=none header.from=intel.com;", "x-originating-ip": "[192.198.147.218]", "x-ms-publictraffictype": "Email", "x-ms-office365-filtering-correlation-id": "af2e02a2-189e-4d6a-cbf1-08d823c7e8d7", "x-ms-traffictypediagnostic": "MN2PR11MB3869:", "x-ld-processed": "46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr", "x-ms-exchange-transport-forked": "True", "x-microsoft-antispam-prvs": "\n <MN2PR11MB3869E6D0BBA1B5B611D2BF559C640@MN2PR11MB3869.namprd11.prod.outlook.com>", "x-ms-oob-tlc-oobclassifiers": "OLM:10000;", "x-forefront-prvs": "04599F3534", "x-ms-exchange-senderadcheck": "1", "x-microsoft-antispam": "BCL:0;", "x-microsoft-antispam-message-info": "\n Hd66JOopQyI/lg9TqRLxUL+qZOION63izNhHWuY+8HGTwAUhij9Na0OtlNSfuivLbu+1r4NrwVH4hQPm8vZSQLNmUAKML+11PMy9XEKy/rDNRHDrUWlBotk9e9hfVBhqXWqyb6EzPfBSUx6AKXvxWETpnLo2B2BJpoHcj1HRpwex23+SsM68RLIOIg3hMpu10+esakIcbNBp8lmx/FZnS3h6zcLeOPi4E92UJf0ZxgowfGyFtVGTa/BA1J16M97b9vMiLvx27OSqcXRCgqy6TgGqtEzR6bPrr8K8ZggG8I4kULAv3YOjIFt4LuihXi/aNlaF8cx/ZZVrtCjWR9zSbdxVWxeW6aiPzpXT1BlhuHNPO8XzxdaTNOPeFpADZzpU9tlvVk5W+oT2EfLmBTdjZA==", "x-forefront-antispam-report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE;\n SFTY:;\n SFS:(4636009)(39860400002)(376002)(396003)(136003)(366004)(346002)(76116006)(7696005)(9686003)(53546011)(55016002)(110136005)(54906003)(6506007)(4326008)(33656002)(71200400001)(2906002)(478600001)(26005)(316002)(5660300002)(186003)(52536014)(83380400001)(66476007)(66446008)(66556008)(64756008)(66946007)(86362001)(8676002)(8936002);\n DIR:OUT; SFP:1102;", "x-ms-exchange-antispam-messagedata": "\n lpl9b2hRQJ6L//PN5JUoyh9uG6MMiKNfT6JZdh7VwP6hRXFtk1Bc9YbOVfzXxQxz0jA240HP7DucRVHKhMoc/93/UXFTzOw45pheQlCjuxD2WJ/21MD3uvMuaAgP4lO6KaXi4N22jFKZ7wCBqnzrLLFQdd++vvzB7B8Lj6KAgjpAELWQ3727LgYmRGqZPOp2Z4pzrVPl4FsCWnuRs9P/jUGz3pS1iTMeXBWf/B0uRLB+46hJlMpgWOoni1+JfMubog+HQBJEVHWPw3LBSwvTGyTluKZg9aWdbRdbe+RPy6buDO2jL1UUlBatMOMIW+0/mfFUE+y4oCzPCEe/gwGET3pr3Zq0OeI3bTqgxLfzsf6MEIbds890i/USXnQw1LBWeIlUY3+XBEMrFPa2UzNKf491ae+fD+AHfiUASNvQpN06OJ09Alio+5gXyTAG2QsEFm4QBOwNUXcgF1jtf2kaB7nmX93pQ4Z/+rwORYnHEtqKtlOO9QfvgkA5Rg9MsY0H", "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": "MN2PR11MB4063.namprd11.prod.outlook.com", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n af2e02a2-189e-4d6a-cbf1-08d823c7e8d7", "X-MS-Exchange-CrossTenant-originalarrivaltime": "09 Jul 2020 05:21:18.3956 (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": "\n hQGmDeSUSDXIV3tIrRO0Q2TJSD4juzdoUU965lSSAf7cwlYbYe4Fy0jixhJMN1UGXOi1R+9BnGT1yBET/+3njQ==", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "MN2PR11MB3869", "X-OriginatorOrg": "intel.com", "Subject": "Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 115680, "web_url": "https://patches.dpdk.org/comment/115680/", "msgid": "<CAJFAV8xNh2XHS1YO4TwAi54_UAVaYj60jwAovnqgaPySS3yKbQ@mail.gmail.com>", "list_archive_url": "https://inbox.dpdk.org/dev/CAJFAV8xNh2XHS1YO4TwAi54_UAVaYj60jwAovnqgaPySS3yKbQ@mail.gmail.com", "date": "2020-07-10T09:54:02", "subject": "Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "submitter": { "id": 1173, "url": "https://patches.dpdk.org/api/people/1173/?format=api", "name": "David Marchand", "email": "david.marchand@redhat.com" }, "content": "On Wed, Jul 8, 2020 at 11:26 AM <alvinx.zhang@intel.com> wrote:\n>\n> From: Alvin Zhang <alvinx.zhang@intel.com>\n>\n> When mapping a PCI BAR containing an MSI-X table, some devices do not\n> need to actually map this BAR or only need to map part of them, which\n> may cause the mapping to fail. Now some checks are added and a non-NULL\n> initial value is set to the variable to avoid this situation.\n>\n> Fixes: 2fd3567e5425 (\"pci: use OS generic memory mapping functions\")\n> Cc: talshn@mellanox.com\n>\n> Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>\n> ---\n> drivers/bus/pci/linux/pci_vfio.c | 12 +++++++++++-\n> 1 file changed, 11 insertions(+), 1 deletion(-)\n>\n> diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c\n> index fdeb9a8..9143bfc 100644\n> --- a/drivers/bus/pci/linux/pci_vfio.c\n> +++ b/drivers/bus/pci/linux/pci_vfio.c\n> @@ -547,6 +547,14 @@\n> bar_index,\n> memreg[0].offset, memreg[0].size,\n> memreg[1].offset, memreg[1].size);\n> +\n> + if (memreg[0].size == 0 && memreg[1].size == 0) {\n> + /* No need to map this BAR */\n> + RTE_LOG(DEBUG, EAL, \"Skipping BAR%d\\n\", bar_index);\n> + bar->size = 0;\n> + bar->addr = 0;\n> + return 0;\n> + }\n\nWe already have a check on bar size == 0.\nWhy would we have this condition?\nBroken hw?\n\n\n> } else {\n> memreg[0].offset = bar->offset;\n> memreg[0].size = bar->size;\n> @@ -556,7 +564,9 @@\n> bar_addr = mmap(bar->addr, bar->size, 0, MAP_PRIVATE |\n> MAP_ANONYMOUS | additional_flags, -1, 0);\n> if (bar_addr != MAP_FAILED) {\n> - void *map_addr = NULL;\n> + /* Set non NULL initial value for in case of no PCI mapping */\n> + void *map_addr = bar_addr;\n> +\n\nIt took me some time to understand this code...\nAnyway, we have a regression in the librte_pci.\nThis is where the fix should be.\n\nWe can cleanup this code later.\n\n> if (memreg[0].size) {\n> /* actual map of first part */\n> map_addr = pci_map_resource(bar_addr, vfio_dev_fd,\n> --\n> 1.8.3.1\n>\n\n\nThanks.", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id CB4FCA052A;\n\tFri, 10 Jul 2020 11:54:17 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 83A6C1DCF6;\n\tFri, 10 Jul 2020 11:54:17 +0200 (CEST)", "from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com\n [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 884E72B9C\n for <dev@dpdk.org>; Fri, 10 Jul 2020 11:54:16 +0200 (CEST)", "from mail-ua1-f69.google.com (mail-ua1-f69.google.com\n [209.85.222.69]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-469-jVNoMTsXMp2IIe2HnG_FGg-1; Fri, 10 Jul 2020 05:54:14 -0400", "by mail-ua1-f69.google.com with SMTP id l2so2255701uae.19\n for <dev@dpdk.org>; Fri, 10 Jul 2020 02:54:14 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1594374856;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=w153qHBf8nx8QpYHNKgwtvYcsz4iqgILU27yPlZlFIs=;\n b=WaaOAVf0SLCksN1fqR69wRnpdBHRRZCNm4sMVW4ZkvzIyT8D+J8YlTMfKkJ6+fo1isiLS1\n 84pgCExPeFftY1IZjk6+OsYHbYKx0TH5V4lC7fJjxmXL9zc6uw0uXyCdXHv/WWbmeBtz4P\n bZSxcvfWeu3wGhwZTGvsMvjC0YCyw3k=", "X-MC-Unique": "jVNoMTsXMp2IIe2HnG_FGg-1", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:mime-version:references:in-reply-to:from:date\n :message-id:subject:to:cc;\n bh=w153qHBf8nx8QpYHNKgwtvYcsz4iqgILU27yPlZlFIs=;\n b=F1C/FmXyHWy5lc3Ab/eY8pfYgF0z08egajnvaxrTPzi87fE7yLLZD6dG+3vqASvk0+\n Ovw7S5gRUrMT1/PpKux01Yci8CYqEvN0IwuRhl+MZIHxBmdQ4+SypmQQ4hy18FZh9Y+S\n vIJD8BQngb9npEVwnOp795JHDvXATrG+JQBj7LENmtfHJWxDrhG/LY81tAR0tGUSDFK3\n QKwcdUSwjyZJydXs8kQDjdkR8RXpkl9W8u9ryGI2nghzFz67eRGm40NJZyx6Jqa7xm+j\n k6YhEBLQuExU729Fn0SRf8T+qjLTgNbXXo62ec8PqmrK47Oe5r+pzzkCH7Tw6cPM4Fzj\n MBYw==", "X-Gm-Message-State": "AOAM532YcBRwf0zSf0xoLc3NneNWXWIbXw75sy75gVXSko8xytUaRMiu\n /PcKgZSF4pJ2a8ipDV1MLfvo1O0lgLt6oZOoHndkspmb+R5DlENdkTmFpiHW5Kalmyxqu73bCKj\n DcCXpxvGPZsW21w9ScOs=", "X-Received": [ "by 2002:a1f:acc2:: with SMTP id\n v185mr12598401vke.18.1594374853795;\n Fri, 10 Jul 2020 02:54:13 -0700 (PDT)", "by 2002:a1f:acc2:: with SMTP id\n v185mr12598388vke.18.1594374853402;\n Fri, 10 Jul 2020 02:54:13 -0700 (PDT)" ], "X-Google-Smtp-Source": "\n ABdhPJxqcoCOAt8Nh3Hj8BeyDCghgxsXcuMdM7pwUNWUhg5xZMV1RiyIhbcPX6+Z3SKl29b+iM0mfVkTbENCE7Xcl4I=", "MIME-Version": "1.0", "References": "<20200708092435.9776-1-alvinx.zhang@intel.com>", "In-Reply-To": "<20200708092435.9776-1-alvinx.zhang@intel.com>", "From": "David Marchand <david.marchand@redhat.com>", "Date": "Fri, 10 Jul 2020 11:54:02 +0200", "Message-ID": "\n <CAJFAV8xNh2XHS1YO4TwAi54_UAVaYj60jwAovnqgaPySS3yKbQ@mail.gmail.com>", "To": "\"Zhang, AlvinX\" <alvinx.zhang@intel.com>", "Cc": "dev <dev@dpdk.org>, Beilei Xing <beilei.xing@intel.com>,\n Jeff Guo <jia.guo@intel.com>", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Type": "text/plain; charset=\"UTF-8\"", "Subject": "Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 115681, "web_url": "https://patches.dpdk.org/comment/115681/", "msgid": "<3033441.08XpM1RNeG@thomas>", "list_archive_url": "https://inbox.dpdk.org/dev/3033441.08XpM1RNeG@thomas", "date": "2020-07-10T10:07:58", "subject": "Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "submitter": { "id": 685, "url": "https://patches.dpdk.org/api/people/685/?format=api", "name": "Thomas Monjalon", "email": "thomas@monjalon.net" }, "content": "10/07/2020 11:54, David Marchand:\n> On Wed, Jul 8, 2020 at 11:26 AM <alvinx.zhang@intel.com> wrote:\n> > From: Alvin Zhang <alvinx.zhang@intel.com>\n> >\n> > When mapping a PCI BAR containing an MSI-X table, some devices do not\n> > need to actually map this BAR or only need to map part of them, which\n> > may cause the mapping to fail. Now some checks are added and a non-NULL\n> > initial value is set to the variable to avoid this situation.\n\nNote: this regression would not have happened if we had some CI tests\nfor simple device probing.\nPlease let's invest more in CI.\n\n\n> > Fixes: 2fd3567e5425 (\"pci: use OS generic memory mapping functions\")\n> > Cc: talshn@mellanox.com\n\nNo he was not Cc in the thread. Same for Anatoly.\nAdding more people in Cc...\n\n> > Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>\n> > ---\n> > --- a/drivers/bus/pci/linux/pci_vfio.c\n> > +++ b/drivers/bus/pci/linux/pci_vfio.c\n> > @@ -547,6 +547,14 @@\n> > bar_index,\n> > memreg[0].offset, memreg[0].size,\n> > memreg[1].offset, memreg[1].size);\n> > +\n> > + if (memreg[0].size == 0 && memreg[1].size == 0) {\n> > + /* No need to map this BAR */\n> > + RTE_LOG(DEBUG, EAL, \"Skipping BAR%d\\n\", bar_index);\n> > + bar->size = 0;\n> > + bar->addr = 0;\n> > + return 0;\n> > + }\n> \n> We already have a check on bar size == 0.\n> Why would we have this condition?\n> Broken hw?\n> \n> \n> > } else {\n> > memreg[0].offset = bar->offset;\n> > memreg[0].size = bar->size;\n> > @@ -556,7 +564,9 @@\n> > bar_addr = mmap(bar->addr, bar->size, 0, MAP_PRIVATE |\n> > MAP_ANONYMOUS | additional_flags, -1, 0);\n> > if (bar_addr != MAP_FAILED) {\n> > - void *map_addr = NULL;\n> > + /* Set non NULL initial value for in case of no PCI mapping */\n> > + void *map_addr = bar_addr;\n> > +\n> \n> It took me some time to understand this code...\n> Anyway, we have a regression in the librte_pci.\n> This is where the fix should be.\n\nYes, I am going to send a fix.\n\n> We can cleanup this code later.\n\nYes please, this function isn't understandable and lack of comments.\nAnatoly please?", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id DA605A052A;\n\tFri, 10 Jul 2020 12:08:05 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 382E21D702;\n\tFri, 10 Jul 2020 12:08:05 +0200 (CEST)", "from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com\n [66.111.4.224]) by dpdk.org (Postfix) with ESMTP id 14D1E1C1BB;\n Fri, 10 Jul 2020 12:08:04 +0200 (CEST)", "from compute7.internal (compute7.nyi.internal [10.202.2.47])\n by mailnew.nyi.internal (Postfix) with ESMTP id A063C580467;\n Fri, 10 Jul 2020 06:08:01 -0400 (EDT)", "from mailfrontend1 ([10.202.2.162])\n by compute7.internal (MEProxy); Fri, 10 Jul 2020 06:08:01 -0400", "from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])\n by mail.messagingengine.com (Postfix) with ESMTPA id 9C8713280059;\n Fri, 10 Jul 2020 06:07:59 -0400 (EDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding:content-type; s=fm1; bh=\n JXscnLo6SBasOyAbu/D1wZhBBRoO7ZMkUgdLm87hBBA=; b=CbgvF/RdA/OrqCYi\n Ad8r/LFXfO+0Fp76YR7UZmT7542yDcevA44zuOq0uf5v5jf2hFIXvjhSNR7EIxct\n xcr2ZFXrDb6EAC98z+Ym3KG7+++oy6xCdK26qg5asXMQSvftzuyzUAdmoEgFQjV8\n 53u1Ygc1DnJuzLNnsmBHSdXULHhYmW61si46gzLCq5m49WWxKXqKyJjd3vKn7IVO\n oRmLXD8BmpOiOu2qCV9bJ1rz6RXjQZn2hLOinKfb9WFYFSfCBziaj92K9uxkcVKr\n s/jwC2HkYhjPom23tjPEkCPvxEo3CpLJKdkr+EsFC7ztJGXuhz/oqj2v60P5RzY2\n LAB4zw==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n messagingengine.com; h=cc:content-transfer-encoding:content-type\n :date:from:in-reply-to:message-id:mime-version:references\n :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender\n :x-sasl-enc; s=fm3; bh=JXscnLo6SBasOyAbu/D1wZhBBRoO7ZMkUgdLm87hB\n BA=; b=VRjg52H8eqqMUyo1SPX9m3oEd5Zpb5OyYUKEB7DSTBWABvUj/s4haLETs\n kPIaeY578l+oYaLdsuAInzyVwpGUeIvP7EmWpds6BOvSVHGn4+R9R0U0OAqzhM3Z\n iI4MC+sb1PaTCuPtwF9E4LQABN7x13YjH5+WaRFFlXqPxmBuRhoPX115mymOaeKt\n DKoT9YVXbJZRI+c15sRKuQmbn1g9glI4PuL8m3Ez/uAb54hzERCJ/nSOrw24q7Mv\n F/ikXklpYdyDxDwbcE2M1S/2f9Li4k/700dMf64RVxPwki7W5z/pAPOtScPwbvSN\n 9GBcNSxlekfZ4KFV9KnpJKAtRlK7A==" ], "X-ME-Sender": "<xms:AT4IX2PgYzKYG8slfKJYuzEsCGtB3FrNdMoozYU0PCa8Txa4QzV_Pg>", "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgeduiedrvddugddviecutefuodetggdotefrodftvf\n curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu\n uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc\n fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs\n ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf\n frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei\n iedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih\n iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho\n nhdrnhgvth", "X-ME-Proxy": "<xmx:AT4IX0-YWS1sJeIqLTrtOLaiulzI6COKAFOVfhRbpGRdCSrwtrxW7A>\n <xmx:AT4IX9QrMbB1R7-YDo7lC5qaHGAi5Fh2sG9q3-gO4YDK-oxe4QJWJA>\n <xmx:AT4IX2uNo7ZPJeHZ72E4AcMeMlYvovZfGCVvn_dTjzjaTOp9h6ex1Q>\n <xmx:AT4IX_W2LPuNrZ99TWqyHmS0lKDVSTsrB2yRXxEIcccRDUrcShIwgg>", "From": "Thomas Monjalon <thomas@monjalon.net>", "To": "\"Zhang, AlvinX\" <alvinx.zhang@intel.com>", "Cc": "dev@dpdk.org, Beilei Xing <beilei.xing@intel.com>,\n Jeff Guo <jia.guo@intel.com>, David Marchand <david.marchand@redhat.com>,\n anatoly.burakov@intel.com, ci@dpdk.org, ferruh.yigit@intel.com,\n bruce.richardson@intel.com, qian.q.xu@intel.com, john.mcnamara@intel.com,\n talshn@mellanox.com, rasland@mellanox.com, asafp@mellanox.com", "Date": "Fri, 10 Jul 2020 12:07:58 +0200", "Message-ID": "<3033441.08XpM1RNeG@thomas>", "In-Reply-To": "\n <CAJFAV8xNh2XHS1YO4TwAi54_UAVaYj60jwAovnqgaPySS3yKbQ@mail.gmail.com>", "References": "<20200708092435.9776-1-alvinx.zhang@intel.com>\n <CAJFAV8xNh2XHS1YO4TwAi54_UAVaYj60jwAovnqgaPySS3yKbQ@mail.gmail.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "7Bit", "Content-Type": "text/plain; charset=\"us-ascii\"", "Subject": "Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 115688, "web_url": "https://patches.dpdk.org/comment/115688/", "msgid": "<4953813.kqYPlVRg1Q@thomas>", "list_archive_url": "https://inbox.dpdk.org/dev/4953813.kqYPlVRg1Q@thomas", "date": "2020-07-10T12:31:34", "subject": "Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "submitter": { "id": 685, "url": "https://patches.dpdk.org/api/people/685/?format=api", "name": "Thomas Monjalon", "email": "thomas@monjalon.net" }, "content": "10/07/2020 12:07, Thomas Monjalon:\n> 10/07/2020 11:54, David Marchand:\n> > On Wed, Jul 8, 2020 at 11:26 AM <alvinx.zhang@intel.com> wrote:\n> > > From: Alvin Zhang <alvinx.zhang@intel.com>\n> > >\n> > > When mapping a PCI BAR containing an MSI-X table, some devices do not\n> > > need to actually map this BAR or only need to map part of them, which\n> > > may cause the mapping to fail. Now some checks are added and a non-NULL\n> > > initial value is set to the variable to avoid this situation.\n[...]\n> > > --- a/drivers/bus/pci/linux/pci_vfio.c\n> > > +++ b/drivers/bus/pci/linux/pci_vfio.c\n> > > @@ -547,6 +547,14 @@\n> > > bar_index,\n> > > memreg[0].offset, memreg[0].size,\n> > > memreg[1].offset, memreg[1].size);\n> > > +\n> > > + if (memreg[0].size == 0 && memreg[1].size == 0) {\n> > > + /* No need to map this BAR */\n> > > + RTE_LOG(DEBUG, EAL, \"Skipping BAR%d\\n\", bar_index);\n> > > + bar->size = 0;\n> > > + bar->addr = 0;\n> > > + return 0;\n> > > + }\n> > \n> > We already have a check on bar size == 0.\n> > Why would we have this condition?\n> > Broken hw?\n> > \n> > \n> > > } else {\n> > > memreg[0].offset = bar->offset;\n> > > memreg[0].size = bar->size;\n> > > @@ -556,7 +564,9 @@\n> > > bar_addr = mmap(bar->addr, bar->size, 0, MAP_PRIVATE |\n> > > MAP_ANONYMOUS | additional_flags, -1, 0);\n> > > if (bar_addr != MAP_FAILED) {\n> > > - void *map_addr = NULL;\n> > > + /* Set non NULL initial value for in case of no PCI mapping */\n> > > + void *map_addr = bar_addr;\n> > > +\n> > \n> > It took me some time to understand this code...\n> > Anyway, we have a regression in the librte_pci.\n> > This is where the fix should be.\n> \n> Yes, I am going to send a fix.\n\nPatch sent: https://patches.dpdk.org/patch/73741/\n\nThis patch is marked as rejected, but please follow-up on cleanup.\n\n> > We can cleanup this code later.\n> \n> Yes please, this function isn't understandable and lack of comments.\n> Anatoly please?", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 8CB6BA052A;\n\tFri, 10 Jul 2020 14:31:41 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0C1F01DC45;\n\tFri, 10 Jul 2020 14:31:40 +0200 (CEST)", "from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com\n [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 7E78A1D8EC;\n Fri, 10 Jul 2020 14:31:37 +0200 (CEST)", "from compute7.internal (compute7.nyi.internal [10.202.2.47])\n by mailout.nyi.internal (Postfix) with ESMTP id E03745C0120;\n Fri, 10 Jul 2020 08:31:36 -0400 (EDT)", "from mailfrontend2 ([10.202.2.163])\n by compute7.internal (MEProxy); Fri, 10 Jul 2020 08:31:36 -0400", "from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])\n by mail.messagingengine.com (Postfix) with ESMTPA id 2690E30600B4;\n Fri, 10 Jul 2020 08:31:35 -0400 (EDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding:content-type; s=fm1; bh=\n dSZWwGwNyKSshzJ0Y8FSZkfuNdaP8XUOZ8knID8tIas=; b=tOKsB6AZkA7oJEqs\n dY8SJNUbYU0YWq5Gc9OAnB+Qf1KCxtoJBakPnFBn6gANTminbupWSNqr+9Gqqk8Y\n 1C79igt5G1TSLWWwv8P6VeOj/Hi5E0++BNOz5oEXYFLZeu9/ieFjklkhVfW6UVAa\n Gq2AKNbqaB54+/UKQhfmw0s4MuNVQrtg0F+fqpmTMS96MjhuDwpzhowWMWqwV8bD\n hqQ8G5kpHSb9IM7PfkTWgbDV+8tWpq7RszvQES7T41MA3mJ3tLj1gKUn8zH28uk4\n og8gPvww7n9LlYnjRW1uBxFb3L5C0EuoLwlu5jN76ksVcR+aYUKkqJr2iRs9HQ0R\n g3z5Ng==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n messagingengine.com; h=cc:content-transfer-encoding:content-type\n :date:from:in-reply-to:message-id:mime-version:references\n :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender\n :x-sasl-enc; s=fm3; bh=dSZWwGwNyKSshzJ0Y8FSZkfuNdaP8XUOZ8knID8tI\n as=; b=OeSdM301B1IfoigdZpsqsOnJ8cXaVU7x1sADdo3Tu+cw70C39+tzlo0bo\n xj47P/0VTglYJWptRr/Fs2lUgoWtOQnJV28vWWxbsv/Z/oNc5t9ZoaIvS62ZqQ7U\n AonUsE1LaGhNxKVsl5SYePBrsi/ngx7LYcOQjUM+DP/6Bessc1OQvpyHSj1hv1a3\n kN6cVrIcWI0AowXOtktc1LPtaawAOnJ3lqH1hKRe41VVcFVOPDPbOTWe++tY1FmO\n Sde8S3Y6jCzlHz0ARAIaUWG4kZKTVhLI/IrwkGLmRVgwt7Su4EDg37mDOpXkg6X+\n Mlha8ggkXk4AM2bY74vlG+7Nhgrjw==" ], "X-ME-Sender": "<xms:qF8IX8qQ2fZzw_63o3JL9lKAQ8RnpWn_Mcn1Bd_M6JQkotFQqquFNw>", "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgeduiedrvddugdehjecutefuodetggdotefrodftvf\n curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu\n uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc\n fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs\n ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf\n frrghtthgvrhhnpeffvdffjeeuteelfeeileduudeugfetjeelveefkeejfeeigeehteff\n vdekfeegudenucffohhmrghinhepughpughkrdhorhhgnecukfhppeejjedrudefgedrvd\n dtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr\n ohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght", "X-ME-Proxy": "<xmx:qF8IXyo-5oCpGtmAv3FTW65D3jyS7s4JCIGY5-itF63dw3Tgk05bNw>\n <xmx:qF8IXxOM-m_fDS3Dg6TmI-0Ts1rdLOagYjJqTW-nKJGEdFs3nKWavQ>\n <xmx:qF8IXz4i7qeE7IX7Y7SLGl9by3CwTc17Q1W_PuNXqgZjxf1Lx4puEA>\n <xmx:qF8IX4u8VGftnVeSbJtMVhrACTrUEok96E9KSclW5qIv1Haze5ePHw>", "From": "Thomas Monjalon <thomas@monjalon.net>", "To": "\"Zhang, AlvinX\" <alvinx.zhang@intel.com>, anatoly.burakov@intel.com", "Cc": "dev@dpdk.org, Beilei Xing <beilei.xing@intel.com>,\n Jeff Guo <jia.guo@intel.com>, David Marchand <david.marchand@redhat.com>,\n ci@dpdk.org, ferruh.yigit@intel.com, bruce.richardson@intel.com,\n talshn@mellanox.com", "Date": "Fri, 10 Jul 2020 14:31:34 +0200", "Message-ID": "<4953813.kqYPlVRg1Q@thomas>", "In-Reply-To": "<3033441.08XpM1RNeG@thomas>", "References": "<20200708092435.9776-1-alvinx.zhang@intel.com>\n <CAJFAV8xNh2XHS1YO4TwAi54_UAVaYj60jwAovnqgaPySS3yKbQ@mail.gmail.com>\n <3033441.08XpM1RNeG@thomas>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "7Bit", "Content-Type": "text/plain; charset=\"us-ascii\"", "Subject": "Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 115694, "web_url": "https://patches.dpdk.org/comment/115694/", "msgid": "<CAOE1vsPsgtDywVH1iJ0fYVa7E3-EyOyjDeM9-hahVRbBMS64Vw@mail.gmail.com>", "list_archive_url": "https://inbox.dpdk.org/dev/CAOE1vsPsgtDywVH1iJ0fYVa7E3-EyOyjDeM9-hahVRbBMS64Vw@mail.gmail.com", "date": "2020-07-10T12:43:37", "subject": "Re: [dpdk-dev] [dpdk-ci] [PATCH] bus/pci: fix mmap PCI resource", "submitter": { "id": 1677, "url": "https://patches.dpdk.org/api/people/1677/?format=api", "name": "Lincoln Lavoie", "email": "lylavoie@iol.unh.edu" }, "content": "On Fri, Jul 10, 2020 at 6:08 AM Thomas Monjalon <thomas@monjalon.net> wrote:\n\n> 10/07/2020 11:54, David Marchand:\n> > On Wed, Jul 8, 2020 at 11:26 AM <alvinx.zhang@intel.com> wrote:\n> > > From: Alvin Zhang <alvinx.zhang@intel.com>\n> > >\n> > > When mapping a PCI BAR containing an MSI-X table, some devices do not\n> > > need to actually map this BAR or only need to map part of them, which\n> > > may cause the mapping to fail. Now some checks are added and a non-NULL\n> > > initial value is set to the variable to avoid this situation.\n>\n> Note: this regression would not have happened if we had some CI tests\n> for simple device probing.\n> Please let's invest more in CI.\n>\n> Are you referring to adding tests to specifically check these conditions,\nor would this have been caught just from the continued expansion of testing\non real hardware / NICs, or both? It seems like the issue is caused by a\ncombination of hardware behaviors and \"broken code\". My point is, without\nhaving some of those behaviors in the CI, we might still not have caught\nthis issue, even with probing checks. Of course, more checks are always a\ngood thing.\n\n>\n> > > Fixes: 2fd3567e5425 (\"pci: use OS generic memory mapping functions\")\n> > > Cc: talshn@mellanox.com\n>\n> No he was not Cc in the thread. Same for Anatoly.\n> Adding more people in Cc...\n>\n> > > Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>\n> > > ---\n> > > --- a/drivers/bus/pci/linux/pci_vfio.c\n> > > +++ b/drivers/bus/pci/linux/pci_vfio.c\n> > > @@ -547,6 +547,14 @@\n> > > bar_index,\n> > > memreg[0].offset, memreg[0].size,\n> > > memreg[1].offset, memreg[1].size);\n> > > +\n> > > + if (memreg[0].size == 0 && memreg[1].size == 0) {\n> > > + /* No need to map this BAR */\n> > > + RTE_LOG(DEBUG, EAL, \"Skipping BAR%d\\n\",\n> bar_index);\n> > > + bar->size = 0;\n> > > + bar->addr = 0;\n> > > + return 0;\n> > > + }\n> >\n> > We already have a check on bar size == 0.\n> > Why would we have this condition?\n> > Broken hw?\n> >\n> >\n> > > } else {\n> > > memreg[0].offset = bar->offset;\n> > > memreg[0].size = bar->size;\n> > > @@ -556,7 +564,9 @@\n> > > bar_addr = mmap(bar->addr, bar->size, 0, MAP_PRIVATE |\n> > > MAP_ANONYMOUS | additional_flags, -1, 0);\n> > > if (bar_addr != MAP_FAILED) {\n> > > - void *map_addr = NULL;\n> > > + /* Set non NULL initial value for in case of no PCI\n> mapping */\n> > > + void *map_addr = bar_addr;\n> > > +\n> >\n> > It took me some time to understand this code...\n> > Anyway, we have a regression in the librte_pci.\n> > This is where the fix should be.\n>\n> Yes, I am going to send a fix.\n>\n> > We can cleanup this code later.\n>\n> Yes please, this function isn't understandable and lack of comments.\n> Anatoly please?\n>\n>\n>", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 3C6D1A052A;\n\tFri, 10 Jul 2020 14:44:19 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A43F51D6A4;\n\tFri, 10 Jul 2020 14:44:18 +0200 (CEST)", "from mail-ej1-f65.google.com (mail-ej1-f65.google.com\n [209.85.218.65]) by dpdk.org (Postfix) with ESMTP id 986271D67E\n for <dev@dpdk.org>; Fri, 10 Jul 2020 14:44:17 +0200 (CEST)", "by mail-ej1-f65.google.com with SMTP id ga4so5864812ejb.11\n for <dev@dpdk.org>; Fri, 10 Jul 2020 05:44:17 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu;\n s=unh-iol;\n h=mime-version:references:in-reply-to:from:date:message-id:subject:to\n :cc; bh=3SWvRfUZD6F0Ltj+GAJJMJvjtCLZp5h7bA4yInMH1Ls=;\n b=hJ1/aku1rTz7ag7GU92ZRcmdWkEcg0TIP5uVRjab9RBKsJRlPwxQYP234V1PNbK0zd\n /+mWZIJogLCGNsO05DzALV67J9lHYBkyPKGDCOZfjLfMicgzeBlTE6hEZkgHV6XsUfwR\n P9GD/QtmfIJKDT4sZ6xNkJxXFoUW5I5kQqxXw=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:mime-version:references:in-reply-to:from:date\n :message-id:subject:to:cc;\n bh=3SWvRfUZD6F0Ltj+GAJJMJvjtCLZp5h7bA4yInMH1Ls=;\n b=KI8XUEuPu1yXhqBFe5Yvgi9LOpDCu6mFfs7FhRCoXYxUXH37W/k9KFeRnat7+s9UTZ\n lEh7VvU9q6K8bFUeml00U9TM+SZUGeniLIdC1bBCjQ2IleQaYEGaXkXvVjQkzw3zkHJv\n rEk+g2frfSDSaQ3WsCgX3uYTPwbkTuotntCE1KlqqTNKv2hsZgNdAEdKG+sMHu1AwYiu\n cCYNWffnnow9/ZLqSZAVTlaGOYnEkurGihEzIQg/RIsEDtbee53qXzaompwOK84VC7iD\n ElefOOgvdVAYmrN3hyNPkdLbyPe78laxCmTA4xn3+dECLNjO19kJHB+tQpyjys4Q05Yk\n Sxgg==", "X-Gm-Message-State": "AOAM531n7QvpBvevRc1Smo/UQX/BXPaNmwmybP+zncSgLXXTDJU7U56Q\n G3yAzzeUAYVaA8zZet1RxPoJnPCKt+kiG+CII48OTQ==", "X-Google-Smtp-Source": "\n ABdhPJxmlZA6KXfIWiXFVs9wvnstFu3xTDZ8YSxfCaRPohkkTXD3cAbjoE3uEzj6lSq1WZ6sYSjt17FmhO6SxwB6pDM=", "X-Received": "by 2002:a17:906:d784:: with SMTP id\n pj4mr59297319ejb.405.1594385057284;\n Fri, 10 Jul 2020 05:44:17 -0700 (PDT)", "MIME-Version": "1.0", "References": "<20200708092435.9776-1-alvinx.zhang@intel.com>\n <CAJFAV8xNh2XHS1YO4TwAi54_UAVaYj60jwAovnqgaPySS3yKbQ@mail.gmail.com>\n <3033441.08XpM1RNeG@thomas>", "In-Reply-To": "<3033441.08XpM1RNeG@thomas>", "From": "Lincoln Lavoie <lylavoie@iol.unh.edu>", "Date": "Fri, 10 Jul 2020 08:43:37 -0400", "Message-ID": "\n <CAOE1vsPsgtDywVH1iJ0fYVa7E3-EyOyjDeM9-hahVRbBMS64Vw@mail.gmail.com>", "To": "Thomas Monjalon <thomas@monjalon.net>", "Cc": "\"Zhang, AlvinX\" <alvinx.zhang@intel.com>, dev@dpdk.org,\n Beilei Xing <beilei.xing@intel.com>, Jeff Guo <jia.guo@intel.com>,\n David Marchand <david.marchand@redhat.com>, anatoly.burakov@intel.com,\n ci@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>, \"Richardson,\n Bruce\" <bruce.richardson@intel.com>,\n \"Xu, Qian Q\" <qian.q.xu@intel.com>, john.mcnamara@intel.com,\n talshn@mellanox.com,\n Raslan Darawsheh <rasland@mellanox.com>, asafp@mellanox.com", "Content-Type": "text/plain; charset=\"UTF-8\"", "X-Content-Filtered-By": "Mailman/MimeDel 2.1.15", "Subject": "Re: [dpdk-dev] [dpdk-ci] [PATCH] bus/pci: fix mmap PCI resource", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 115778, "web_url": "https://patches.dpdk.org/comment/115778/", "msgid": "<SN6PR11MB2960D4B28FC2C511A282F0CD9F620@SN6PR11MB2960.namprd11.prod.outlook.com>", "list_archive_url": "https://inbox.dpdk.org/dev/SN6PR11MB2960D4B28FC2C511A282F0CD9F620@SN6PR11MB2960.namprd11.prod.outlook.com", "date": "2020-07-11T06:57:36", "subject": "Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "submitter": { "id": 1398, "url": "https://patches.dpdk.org/api/people/1398/?format=api", "name": "Alvin Zhang", "email": "alvinx.zhang@intel.com" }, "content": "> -----Original Message-----\n> From: David Marchand <david.marchand@redhat.com>\n> Sent: Friday, July 10, 2020 5:54 PM\n> To: Zhang, AlvinX <alvinx.zhang@intel.com>\n> Cc: dev <dev@dpdk.org>; Xing, Beilei <beilei.xing@intel.com>; Guo, Jia\n> <jia.guo@intel.com>\n> Subject: Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource\n> \n> On Wed, Jul 8, 2020 at 11:26 AM <alvinx.zhang@intel.com> wrote:\n> >\n> > From: Alvin Zhang <alvinx.zhang@intel.com>\n> >\n> > When mapping a PCI BAR containing an MSI-X table, some devices do not\n> > need to actually map this BAR or only need to map part of them, which\n> > may cause the mapping to fail. Now some checks are added and a\n> > non-NULL initial value is set to the variable to avoid this situation.\n> >\n> > Fixes: 2fd3567e5425 (\"pci: use OS generic memory mapping functions\")\n> > Cc: talshn@mellanox.com\n> >\n> > Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>\n> > ---\n> > drivers/bus/pci/linux/pci_vfio.c | 12 +++++++++++-\n> > 1 file changed, 11 insertions(+), 1 deletion(-)\n> >\n> > diff --git a/drivers/bus/pci/linux/pci_vfio.c\n> > b/drivers/bus/pci/linux/pci_vfio.c\n> > index fdeb9a8..9143bfc 100644\n> > --- a/drivers/bus/pci/linux/pci_vfio.c\n> > +++ b/drivers/bus/pci/linux/pci_vfio.c\n> > @@ -547,6 +547,14 @@\n> > bar_index,\n> > memreg[0].offset, memreg[0].size,\n> > memreg[1].offset, memreg[1].size);\n> > +\n> > + if (memreg[0].size == 0 && memreg[1].size == 0) {\n> > + /* No need to map this BAR */\n> > + RTE_LOG(DEBUG, EAL, \"Skipping BAR%d\\n\",\n> bar_index);\n> > + bar->size = 0;\n> > + bar->addr = 0;\n> > + return 0;\n> > + }\n> \n> We already have a check on bar size == 0.\n> Why would we have this condition?\n> Broken hw?\n> \n\nIf the misx-table size is equal to the bar size, the memreg[0].size and memreg[1].size will be zero at same time although the bar size is not zero\n\n> \n> > } else {\n> > memreg[0].offset = bar->offset;\n> > memreg[0].size = bar->size; @@ -556,7 +564,9 @@\n> > bar_addr = mmap(bar->addr, bar->size, 0, MAP_PRIVATE |\n> > MAP_ANONYMOUS | additional_flags, -1, 0);\n> > if (bar_addr != MAP_FAILED) {\n> > - void *map_addr = NULL;\n> > + /* Set non NULL initial value for in case of no PCI mapping\n> */\n> > + void *map_addr = bar_addr;\n> > +\n> \n> It took me some time to understand this code...\n> Anyway, we have a regression in the librte_pci.\n> This is where the fix should be.\n> \n> We can cleanup this code later.\n\nThe key cause is the value of memreg[0].size is 0\n\n\n> \n> > if (memreg[0].size) {\n> > /* actual map of first part */\n> > map_addr = pci_map_resource(bar_addr,\n> > vfio_dev_fd,\n> > --\n> > 1.8.3.1\n> >\n> \n> \n> Thanks.\n> \n> --\n> David Marchand", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 19CDBA0528;\n\tSat, 11 Jul 2020 08:58:01 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 680DF1D9E1;\n\tSat, 11 Jul 2020 08:58:00 +0200 (CEST)", "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by dpdk.org (Postfix) with ESMTP id 37EE81D9DD\n for <dev@dpdk.org>; Sat, 11 Jul 2020 08:57:58 +0200 (CEST)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 10 Jul 2020 23:57:57 -0700", "from fmsmsx103.amr.corp.intel.com ([10.18.124.201])\n by fmsmga002.fm.intel.com with ESMTP; 10 Jul 2020 23:57:57 -0700", "from fmsmsx114.amr.corp.intel.com (10.18.116.8) by\n FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS)\n id 14.3.439.0; Fri, 10 Jul 2020 23:57:56 -0700", "from FMSEDG002.ED.cps.intel.com (10.1.192.134) by\n FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS)\n id 14.3.439.0; Fri, 10 Jul 2020 23:57:38 -0700", "from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.104)\n by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id\n 14.3.439.0; Fri, 10 Jul 2020 23:57:38 -0700", "from SN6PR11MB2960.namprd11.prod.outlook.com (2603:10b6:805:d4::12)\n by SN6PR11MB2575.namprd11.prod.outlook.com (2603:10b6:805:57::20)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.22; Sat, 11 Jul\n 2020 06:57:36 +0000", "from SN6PR11MB2960.namprd11.prod.outlook.com\n ([fe80::20d6:bb89:9836:e68a]) by SN6PR11MB2960.namprd11.prod.outlook.com\n ([fe80::20d6:bb89:9836:e68a%7]) with mapi id 15.20.3174.022; Sat, 11 Jul 2020\n 06:57:36 +0000" ], "IronPort-SDR": [ "\n RbJaKtJfyQ5qldMsT0kdBYn2dQHLzQ9as7626vKb+bViRe7TMJI1qXChblTbqWYq9xI5AdtX1V\n naVCwpvXBfyw==", "\n BGN6rOxO1P8LLqI/lyOI+mEUs187ZvlSQJ4QLWqbAEfkm/u02fj9nlX7QxRoa9KE0RtY1JZKxz\n dc0XmbptWq6A==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9678\"; a=\"135827541\"", "E=Sophos;i=\"5.75,338,1589266800\"; d=\"scan'208\";a=\"135827541\"", "E=Sophos;i=\"5.75,338,1589266800\"; d=\"scan'208\";a=\"316826606\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=TCuC81fkJs74uw2NTmdWsllBN5/V/M4LkLeWzHnS9Fs8iqj5BHVFD7rrHWxMJJ/krW9sch2N3st8ZfJD9oqVE5u7AXozs/q2frasM0+DnhemUTUDC29aqtAkYYt9j4CkE2Q+qN1gGUDERDLNd35qbJZsYvQlkYshP+ehTXc3dhOGbFJ5wY+oD5BeiaWl6Lr4ueUhhxLVbK3F0SfcybVuby0d8mpDk1zG18lMMFl16Xz9Vm8MkyD+SWGBY+T07nA1PwrMz+UNLh1oOEcgnI+KupGe5tnwmLQwJpPRE/+St+LluRBNsHyAdL20CXxaUM2bhnf/nNInBScAa6otWiwRVw==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=5+5zVt3Q5PVSj7W58YDfIxYtmTqE7hP8wqzrU1dr65g=;\n b=AOvm3Yj4+PoBg+VsBZP+m0AAQdHwCgNdBo/2fiUUd/1T22+agybVe27T6r3Ex4a4JdA5pJ9uZIYEvapY95cOg6dTigB8ZtNQJDz9KxxnYltWwMIsv648gbN+V0I/KE1Ns9zk4wvRC/sd/a0ri1IiFPyOFFSkvsU7QzH4iX/wLDfmi6TvUP9FFw9GWK8guL6HLh92n3mtY9lKUVU+OC93mxQIBoqs/e/8YhzV5BhO1PSHWkEKVkt7i8PA/btetbGv/yO3siXb54iEIMR+0Bo+FlmBJPCNphZMGWj+1yTWdGMoSopsKUBwM3tjn0iRe0LMd+BvGEfXrgevaNBvi3ep8w==", "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;\n dkim=pass header.d=intel.com; arc=none", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com;\n s=selector2-intel-onmicrosoft-com;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=5+5zVt3Q5PVSj7W58YDfIxYtmTqE7hP8wqzrU1dr65g=;\n b=jTlvJb6ssxcmBc2ebqN+mR78cWolboXUjXZYLoxgXYhGu5rEy36EJEdKJaG/qnFle6OxzUBbT0DxvzkICcIkmT1t1FUOp0Za4JpgEVxdbfnNDPXRyPi9Pz3KdOHQTQL9ogysuVwmNKOCUIDbOuWmfj+MNsBPqZdDt/9lcrXnD98=", "From": "\"Zhang, AlvinX\" <alvinx.zhang@intel.com>", "To": "David Marchand <david.marchand@redhat.com>", "CC": "dev <dev@dpdk.org>", "Thread-Topic": "[dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "Thread-Index": "AQHWVQnn1RDxUua/TUiFOP0g9lYVRKkAlgAAgAFe/lA=", "Date": "Sat, 11 Jul 2020 06:57:36 +0000", "Message-ID": "\n <SN6PR11MB2960D4B28FC2C511A282F0CD9F620@SN6PR11MB2960.namprd11.prod.outlook.com>", "References": "<20200708092435.9776-1-alvinx.zhang@intel.com>\n <CAJFAV8xNh2XHS1YO4TwAi54_UAVaYj60jwAovnqgaPySS3yKbQ@mail.gmail.com>", "In-Reply-To": "\n <CAJFAV8xNh2XHS1YO4TwAi54_UAVaYj60jwAovnqgaPySS3yKbQ@mail.gmail.com>", "Accept-Language": "en-US", "Content-Language": "en-US", "X-MS-Has-Attach": "", "X-MS-TNEF-Correlator": "", "authentication-results": "redhat.com; dkim=none (message not signed)\n header.d=none;redhat.com; dmarc=none action=none header.from=intel.com;", "x-originating-ip": "[192.102.204.38]", "x-ms-publictraffictype": "Email", "x-ms-office365-filtering-correlation-id": "70db3c3f-859d-4267-f412-08d82567b19c", "x-ms-traffictypediagnostic": "SN6PR11MB2575:", "x-microsoft-antispam-prvs": "\n <SN6PR11MB25755F1F1003964F00FA2D179F620@SN6PR11MB2575.namprd11.prod.outlook.com>", "x-ms-oob-tlc-oobclassifiers": "OLM:7691;", "x-ms-exchange-senderadcheck": "1", "x-microsoft-antispam": "BCL:0;", "x-microsoft-antispam-message-info": "\n /y0n29ljWmZppeQMdgHjOuewopuYevDADnQfHcBri3R2RnMaia4zi2JM5jgPiFr2Ckc6BtbXpGlryNwBos3womo8xfC2TnjlXgo9Ur0tCM5DqojQesgyuGb9VvrCZ1qFGlA5XCL20f1mkneJ1bW7LIbhikXLphxOI5AI+ceO4RrRI2CJIlUTD6HVilXX01JQvqejt14p19TbAkT01MW/dfQt5ORB7YZ53DQ4iPQDMgb9jnnD0HVR4gtZNVVVv+Zz0FDz8OfuRjtfSgjabslOe5akOBi1wVQPsixxAjkR/wx0xb5Zdp7ZbXWJ1yH7Fh6o+gcP1NvhHUMeEdGxfaYQ2w==", "x-forefront-antispam-report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:SN6PR11MB2960.namprd11.prod.outlook.com; PTR:; CAT:NONE;\n SFTY:;\n SFS:(4636009)(396003)(39860400002)(136003)(346002)(376002)(366004)(52536014)(33656002)(8936002)(478600001)(83380400001)(86362001)(5660300002)(66446008)(66556008)(71200400001)(64756008)(66476007)(76116006)(66946007)(6916009)(7696005)(6506007)(53546011)(26005)(316002)(186003)(55016002)(8676002)(4326008)(2906002)(9686003);\n DIR:OUT; SFP:1102;", "x-ms-exchange-antispam-messagedata": "\n l7YLThRez+eW2LANO/usRr8QiwPISGZ2rTN4U6qrdiB4UMeA+p6tLeULSgZ32V77YiYxuNXJjotuKAjsZ5nCWDx8yfBTv5fTe4FgChXsEt2/Zl+ulXn+U7n/zVmNNGhGkNMQngvfILuGADl571TSwkegbg8Rgt/9qvN+WkrQEZj4p7KpALtUREXZeOgK11fdSFzWMMMob1h1EM2jLuzpNrDAkxengdRcQtL7+pGMmFUl4w6nL85SBm7ALK9yHJ5OQQ7jj6mO8ae3eeL08Ln4jMmJ2YlIeTUemSw5L6OhsBLPFq7Sb/4Uv7sL7qjMn06YADqyg1BwaIDVchqC9KfnxrwQUr3mvPnRLHKdJFMIucd/4nPUEGub5jaTbKL1oJOPIdtFw/rTWUE6ybVFMxD+X8tUceCSzjX2dqkZUpWYYvF957K2XeE/ILx6/IHLoJW+OTSBDnWnmWKe+6+X9he8p9mn4AgzfoTnuLE7M75GJiFTjHnhbXn/SiXaNkfEIIX0", "x-ms-exchange-transport-forked": "True", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "MIME-Version": "1.0", "X-MS-Exchange-CrossTenant-AuthAs": "Internal", "X-MS-Exchange-CrossTenant-AuthSource": "SN6PR11MB2960.namprd11.prod.outlook.com", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 70db3c3f-859d-4267-f412-08d82567b19c", "X-MS-Exchange-CrossTenant-originalarrivaltime": "11 Jul 2020 06:57:36.3038 (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": "\n YFUAnnazhtu2cGjPz2gusDE8Q7ObdBENtHRgJuSZwH3dmi++EHgJfhL6nRuahTSll8QelFVJKKQP9D0Od0hyDw==", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "SN6PR11MB2575", "X-OriginatorOrg": "intel.com", "Subject": "Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 119385, "web_url": "https://patches.dpdk.org/comment/119385/", "msgid": "<CAJFAV8xxTMNM4cJHRRBwbZSkJ8E7YFk0sDpiAOytUezG4cuygg@mail.gmail.com>", "list_archive_url": "https://inbox.dpdk.org/dev/CAJFAV8xxTMNM4cJHRRBwbZSkJ8E7YFk0sDpiAOytUezG4cuygg@mail.gmail.com", "date": "2020-09-23T07:34:27", "subject": "Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "submitter": { "id": 1173, "url": "https://patches.dpdk.org/api/people/1173/?format=api", "name": "David Marchand", "email": "david.marchand@redhat.com" }, "content": "On Fri, Jul 10, 2020 at 12:08 PM Thomas Monjalon <thomas@monjalon.net> wrote:\n> > It took me some time to understand this code...\n> > Anyway, we have a regression in the librte_pci.\n> > This is where the fix should be.\n>\n> Yes, I am going to send a fix.\n>\n> > We can cleanup this code later.\n>\n> Yes please, this function isn't understandable and lack of comments.\n> Anatoly please?\n\nNow that the workaround on the pci mapping API has been reverted, we\nare back with this issue.\nhttps://bugs.dpdk.org/show_bug.cgi?id=539\n\nVolunteer(s) to fix and clean this code?\n\nThanks.", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 73A47A04B1;\n\tWed, 23 Sep 2020 09:35:10 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 58CBA1C2AA;\n\tWed, 23 Sep 2020 09:35:09 +0200 (CEST)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [63.128.21.124])\n by dpdk.org (Postfix) with ESMTP id 0FB4D1C211\n for <dev@dpdk.org>; Wed, 23 Sep 2020 09:35:07 +0200 (CEST)", "from mail-vs1-f71.google.com (mail-vs1-f71.google.com\n [209.85.217.71]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-528-NOkkV5t7PumAumeAyMKbFg-1; Wed, 23 Sep 2020 03:34:39 -0400", "by mail-vs1-f71.google.com with SMTP id b9so5691899vsd.13\n for <dev@dpdk.org>; Wed, 23 Sep 2020 00:34:39 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1600846507;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=FE8RtivvATHL2j67Fl1ez97ZKZN+ZAWb8trfmeMAVxk=;\n b=aGQH6zIPVIrp5GVlO2UfpoJWKTABW4nR5fzzvNN5Eb6Fr61QbQwo95IV8Kw5z+jleara+c\n JMrw9t9MdgrLhVlK/RjoAeObPozxdQN647sdwFmEL2biq7RnAA0xbgRgId9SKtPTvRxfBU\n s7KIKly81lDpJHhrl/9HYSASDAbDBzk=", "X-MC-Unique": "NOkkV5t7PumAumeAyMKbFg-1", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:mime-version:references:in-reply-to:from:date\n :message-id:subject:to:cc;\n bh=FE8RtivvATHL2j67Fl1ez97ZKZN+ZAWb8trfmeMAVxk=;\n b=MaZ0cqQAvH6UbK2Uy4seTrHegLWTAABr0cun/zrVsEQvlUw5pBu8J+oS1m+GzU8re5\n pBp/inVN/m81uHqEqu6d0Hk7+UeGnMZNtw1CGuHbpScF/pU0ULk14GqDL/DUcJ7luHto\n HFp3NMnBeJU5hwBvbNy6Ge2wwbU6Vr0YJHV6pk+vbocibhktRjys/qsagQBkUdbrAmcv\n XvHYHpX3rphqHc5RwkfYikqR30z7Ilu3x24Wielr53I2PQ0zM0kPpE6IVlZNVfV/u9Ix\n lKlp90ovxgnRiOlU+Vz/Xo+rDDNg4Rw86/IlM9dKCbXxs8MKLaqYew9NKcZRtzYKtt5C\n K1Vg==", "X-Gm-Message-State": "AOAM530IGx9r7X0jgNd9CrV7aoFZ79Ph5jJCWI6SZOGMZbead/rMcMNR\n YV4RcW/qPQoH1+1F+WvuEJmWeoo6wpXKWTmgPe+e66o5Wr0huNuUdlMdTKIzkrzXb9UowUGYbKK\n 5BvRH82YU5kxmEPicMT8=", "X-Received": [ "by 2002:ab0:20a:: with SMTP id 10mr5247855uas.86.1600846478583;\n Wed, 23 Sep 2020 00:34:38 -0700 (PDT)", "by 2002:ab0:20a:: with SMTP id 10mr5247840uas.86.1600846478348;\n Wed, 23 Sep 2020 00:34:38 -0700 (PDT)" ], "X-Google-Smtp-Source": "\n ABdhPJzUCJA0Gr2tx97gTJUxtLi/9GmImX/cysCYkBvDmK0fFxjV3vuEwRaBgQniPb3rAPcCYt77LbHk8x35/pNr8HQ=", "MIME-Version": "1.0", "References": "<20200708092435.9776-1-alvinx.zhang@intel.com>\n <CAJFAV8xNh2XHS1YO4TwAi54_UAVaYj60jwAovnqgaPySS3yKbQ@mail.gmail.com>\n <3033441.08XpM1RNeG@thomas>", "In-Reply-To": "<3033441.08XpM1RNeG@thomas>", "From": "David Marchand <david.marchand@redhat.com>", "Date": "Wed, 23 Sep 2020 09:34:27 +0200", "Message-ID": "\n <CAJFAV8xxTMNM4cJHRRBwbZSkJ8E7YFk0sDpiAOytUezG4cuygg@mail.gmail.com>", "To": "Thomas Monjalon <thomas@monjalon.net>, \"Zhang,\n AlvinX\" <alvinx.zhang@intel.com>,\n \"Burakov, Anatoly\" <anatoly.burakov@intel.com>", "Cc": "dev <dev@dpdk.org>, Beilei Xing <beilei.xing@intel.com>,\n Jeff Guo <jia.guo@intel.com>, \"Yigit, Ferruh\" <ferruh.yigit@intel.com>,\n Bruce Richardson <bruce.richardson@intel.com>,\n Qian Xu <qian.q.xu@intel.com>, \"Mcnamara, John\" <john.mcnamara@intel.com>,\n Tal Shnaiderman <talshn@mellanox.com>, Raslan <rasland@mellanox.com>,\n Asaf Penso <asafp@mellanox.com>", "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Type": "text/plain; charset=\"UTF-8\"", "Subject": "Re: [dpdk-dev] [PATCH] bus/pci: fix mmap PCI resource", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null } ]