Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/9578/?format=api
https://patches.dpdk.org/api/patches/9578/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1450269064-23608-1-git-send-email-david.marchand@6wind.com/", "project": { "id": 1, "url": "https://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": "<1450269064-23608-1-git-send-email-david.marchand@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1450269064-23608-1-git-send-email-david.marchand@6wind.com", "date": "2015-12-16T12:31:04", "name": "[dpdk-dev] eal: map io resources for non x86 architectures", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "88553ea85d9cbe7131dadfb886c68dbc63b869f4", "submitter": { "id": 3, "url": "https://patches.dpdk.org/api/people/3/?format=api", "name": "David Marchand", "email": "david.marchand@6wind.com" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1450269064-23608-1-git-send-email-david.marchand@6wind.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/9578/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/9578/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 D9EA78E79;\n\tWed, 16 Dec 2015 13:31:38 +0100 (CET)", "from mail-wm0-f44.google.com (mail-wm0-f44.google.com\n\t[74.125.82.44]) by dpdk.org (Postfix) with ESMTP id 20F7E952\n\tfor <dev@dpdk.org>; Wed, 16 Dec 2015 13:31:37 +0100 (CET)", "by mail-wm0-f44.google.com with SMTP id l126so36322454wml.0\n\tfor <dev@dpdk.org>; Wed, 16 Dec 2015 04:31:37 -0800 (PST)", "from alcyon.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net.\n\t[82.239.227.177]) by smtp.gmail.com with ESMTPSA id\n\tqm9sm5807683wjc.39.2015.12.16.04.31.35\n\t(version=TLSv1/SSLv3 cipher=OTHER);\n\tWed, 16 Dec 2015 04:31:36 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=p+AP+0v43MyYzdn9B625MN8PBQ+RljRXbZ485qE37a4=;\n\tb=xK9viWsdvHPUb9hORMn6dig7rmcdVe+yNUt10XPMhXk/DHJQbd5DgDDtJm+oFV0qwp\n\tSlmjGqz/kfuWsQerXw6zjTCaHAJ61UJBGY73Vcixo/i7BMnoA64fe57emQyvw7jINjyJ\n\tlZolsXeFMNcqHOuMHy3+81/HZxyejbQ2ASJR04axmFAa1l+DgNwEYm9vhAdq7F8Pz6rt\n\t5iJTWDWLFj8xDu+vTopLPYIqHoBdoH+GzhLhNswIwxInsRvUyDbTazN/OimmETzbpMIO\n\tacDhqe956FiwThAEgJe7dHIbvM+xov1IuH80oXTa3AM3TyIsIJD56cl3Tz4mtFMuNz5x\n\tQwBw==", "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:in-reply-to\n\t:references;\n\tbh=p+AP+0v43MyYzdn9B625MN8PBQ+RljRXbZ485qE37a4=;\n\tb=QCREqARcQqBkrfnj0LBF4QeMk9p/M+CG7OUnEVMbnd6pElMqdff4YLf5l5OyGXbTx7\n\tc+a2G6sy5r7EGLofhY2JBSphVcpvN9IJTwT2yYQhH8WqUKAIacadjrlun/mWOmTb5tT+\n\tYMMGamcri+MgBwzt7WlRGX0FHlAdNxhX88GzXlne1YLhaFLRgSQr2Z+9A53fhhv+lg20\n\tmOx6+1wLt42UoSZLm+DwillCWQ09fV1+IRvBcyLLfZqQQrsyREU3YR1QVG5/McvgBarn\n\tb1P9j7P2KByn7BfyUPALdsf4BXlkoeNVAaZhcIVtkPNQPdl/1i7v0+lnG8E/unbehmKb\n\tZojg==", "X-Gm-Message-State": "ALoCoQndg4UsMwrpaUcSDTdn4o9vOMMJovozgaEUZz/MF6eRNG7TZhk05ZVIxheIz6dTA2QJNlBlRFnbcNofkCxIr9R15DjFVw==", "X-Received": "by 10.28.48.194 with SMTP id w185mr4306024wmw.73.1450269096899; \n\tWed, 16 Dec 2015 04:31:36 -0800 (PST)", "From": "David Marchand <david.marchand@6wind.com>", "To": "sshukla@mvista.com", "Date": "Wed, 16 Dec 2015 13:31:04 +0100", "Message-Id": "<1450269064-23608-1-git-send-email-david.marchand@6wind.com>", "X-Mailer": "git-send-email 1.7.10.4", "In-Reply-To": "<CAAyOgsaMO7V1K8Yxh=Zf-E4iodDevMFG+rRBPgZXBysca9JopA@mail.gmail.com>", "References": "<CAAyOgsaMO7V1K8Yxh=Zf-E4iodDevMFG+rRBPgZXBysca9JopA@mail.gmail.com>", "Cc": "dev@dpdk.org", "Subject": "[dpdk-dev] [PATCH] eal: map io resources for non x86 architectures", "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": "x86 requires a special set of instructions to access ioports, but other\narchitectures let you remap io resources.\nSo let eal remap io resources by accepting IORESOURCE_IO flag for\narchitectures other than x86.\n\nSigned-off-by: David Marchand <david.marchand@6wind.com>\n---\n lib/librte_eal/common/include/rte_pci.h | 3 ++-\n lib/librte_eal/linuxapp/eal/eal_pci.c | 21 +++++++++++++++------\n 2 files changed, 17 insertions(+), 7 deletions(-)", "diff": "diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h\nindex 334c12e..8aaab4a 100644\n--- a/lib/librte_eal/common/include/rte_pci.h\n+++ b/lib/librte_eal/common/include/rte_pci.h\n@@ -105,7 +105,8 @@ extern struct pci_device_list pci_device_list; /**< Global list of PCI devices.\n /** Nb. of values in PCI resource format. */\n #define PCI_RESOURCE_FMT_NVAL 3\n \n-/** IO resource type: memory address space */\n+/** IO resource type: */\n+#define IORESOURCE_IO 0x00000100\n #define IORESOURCE_MEM 0x00000200\n \n /**\ndiff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c\nindex bc5b5be..9c4651d 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_pci.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_pci.c\n@@ -236,12 +236,21 @@ pci_parse_sysfs_resource(const char *filename, struct rte_pci_device *dev)\n \t\t\tgoto error;\n \t\t}\n \n-\t\tif (flags & IORESOURCE_MEM) {\n-\t\t\tdev->mem_resource[i].phys_addr = phys_addr;\n-\t\t\tdev->mem_resource[i].len = end_addr - phys_addr + 1;\n-\t\t\t/* not mapped for now */\n-\t\t\tdev->mem_resource[i].addr = NULL;\n-\t\t}\n+\t\t/* we only care about IORESOURCE_IO or IORESOURCE_MEM */\n+\t\tif (!(flags & IORESOURCE_IO) &&\n+\t\t !(flags & IORESOURCE_MEM))\n+\t\t\tcontinue;\n+\n+#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686)\n+\t\t/* x86 can not remap ioports, so skip it, remapping code will\n+\t\t * look at dev->mem_resource[i].phys_addr == 0 and skip it */\n+\t\tif (flags & IORESOURCE_IO)\n+\t\t\tcontinue;\n+#endif\n+\t\tdev->mem_resource[i].phys_addr = phys_addr;\n+\t\tdev->mem_resource[i].len = end_addr - phys_addr + 1;\n+\t\t/* not mapped for now */\n+\t\tdev->mem_resource[i].addr = NULL;\n \t}\n \tfclose(f);\n \treturn 0;\n", "prefixes": [ "dpdk-dev" ] }{ "id": 9578, "url": "