Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/6202/?format=api
http://patches.dpdk.org/api/patches/6202/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1436395131-11205-1-git-send-email-stephen@networkplumber.org/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1436395131-11205-1-git-send-email-stephen@networkplumber.org>", "list_archive_url": "https://inbox.dpdk.org/dev/1436395131-11205-1-git-send-email-stephen@networkplumber.org", "date": "2015-07-08T22:38:51", "name": "[dpdk-dev,RFC] vfio: only map regions VFIO supports", "commit_ref": null, "pull_url": null, "state": "rfc", "archived": true, "hash": "8a55f13b8199507a05c03e5e0d3d3ef996804d52", "submitter": { "id": 27, "url": "http://patches.dpdk.org/api/people/27/?format=api", "name": "Stephen Hemminger", "email": "stephen@networkplumber.org" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1436395131-11205-1-git-send-email-stephen@networkplumber.org/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/6202/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/6202/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 6461A5A57;\n\tThu, 9 Jul 2015 00:38:45 +0200 (CEST)", "from mail-pa0-f45.google.com (mail-pa0-f45.google.com\n\t[209.85.220.45]) by dpdk.org (Postfix) with ESMTP id 933C4952\n\tfor <dev@dpdk.org>; Thu, 9 Jul 2015 00:38:43 +0200 (CEST)", "by pactm7 with SMTP id tm7so138822661pac.2\n\tfor <dev@dpdk.org>; Wed, 08 Jul 2015 15:38:42 -0700 (PDT)", "from urahara.home.lan (static-50-53-82-155.bvtn.or.frontiernet.net.\n\t[50.53.82.155]) by smtp.gmail.com with ESMTPSA id\n\tpc5sm3619024pbc.15.2015.07.08.15.38.41\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 08 Jul 2015 15:38:42 -0700 (PDT)" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=Rtbnp6DqDw6+2ouTo6o4LWa+l4EHDU65KLSWwhUjxgA=;\n\tb=hDVuG5bDCOKV7dvVhqTwY9h+I5m9EBpf0TSNigcgt5WY8QN0cfQuVddd5NXc4TQn5d\n\tddB5pvlwnGNsLCfw58BQOstQ/vV5J9w/XOrM8uh+oc1rrcNrh03dfZw1rr2+R9hw0m3w\n\tWMCLjrEWWpVS7wfbTrpnFLdJtD4qlmg5u200WuIgembC9TzX3n8fxUe6dGJAmDFwk+5g\n\tZpZAkSsC3i8KW8S6YQOjKKar7u34i5dilvLGRznyD/uzO29LTeSIcB0ygR0poq7hf7fs\n\tVgL1g5zyprV2MpL54qEmjO4/ghzy8lqgq7RrHBtwp/4M4EptOYhYnTihd6q3mM5WO93D\n\tjhZQ==", "X-Gm-Message-State": "ALoCoQkMqR7ToV0jLsZhi0W2rXRjAinkA/NPAFCELGSOzPjpKxNXEB55bNyKfwYAd0ifs0FwvCLo", "X-Received": "by 10.66.62.133 with SMTP id y5mr25058562par.8.1436395122872;\n\tWed, 08 Jul 2015 15:38:42 -0700 (PDT)", "From": "Stephen Hemminger <stephen@networkplumber.org>", "To": "dev@dpdk.org", "Date": "Wed, 8 Jul 2015 15:38:51 -0700", "Message-Id": "<1436395131-11205-1-git-send-email-stephen@networkplumber.org>", "X-Mailer": "git-send-email 2.1.4", "Subject": "[dpdk-dev] [RFC] vfio: only map regions VFIO supports", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "The FM10K driver has 3 BARS numbered 0, 4, and 8. But the kernel\nVFIO driver only allows mapping 0-5 anything bigger than that will\nreturn -EINVAL (see kernel source vfio_pci.c:vfio_pci_mmap).\n\nThe workaround is to limit the DPDK EAL VFIO support only map\nthe regions that will work. The FM10K driver is not using BAR8\nin current code anyway.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)", "diff": "diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c\nindex 426953a..e269e75 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c\n@@ -549,7 +549,7 @@ pci_vfio_map_resource(struct rte_pci_device *dev)\n \tint iommu_group_no;\n \tchar pci_addr[PATH_MAX] = {0};\n \tstruct rte_pci_addr *loc = &dev->addr;\n-\tint i, ret, msix_bar;\n+\tint i, ret, msix_bar, nmaps;\n \tstruct mapped_pci_resource *vfio_res = NULL;\n \tstruct mapped_pci_res_list *vfio_res_list = RTE_TAILQ_CAST(rte_vfio_tailq.head, mapped_pci_res_list);\n \n@@ -724,7 +724,9 @@ pci_vfio_map_resource(struct rte_pci_device *dev)\n \t/* map BARs */\n \tmaps = vfio_res->maps;\n \n-\tfor (i = 0; i < (int) vfio_res->nb_maps; i++) {\n+\t/* VFIO supports limited (0-5) maps */\n+\tnmaps = RTE_MIN(vfio_res->nb_maps, VFIO_PCI_ROM_REGION_INDEX - 1);\n+\tfor (i = 0; i < nmaps; i++) {\n \t\tstruct vfio_region_info reg = { .argsz = sizeof(reg) };\n \t\tvoid *bar_addr;\n \t\tstruct memreg {\n", "prefixes": [ "dpdk-dev", "RFC" ] }{ "id": 6202, "url": "