get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/94773/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 94773,
    "url": "https://patches.dpdk.org/api/patches/94773/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210623204355.74362-1-drc@linux.vnet.ibm.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": "<20210623204355.74362-1-drc@linux.vnet.ibm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210623204355.74362-1-drc@linux.vnet.ibm.com",
    "date": "2021-06-23T20:43:55",
    "name": "bus/pci: Add VA support for PowerVM system LPARs",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "f0021f80f2f35ef4efd1e20a143f9a44a4f34f3c",
    "submitter": {
        "id": 1256,
        "url": "https://patches.dpdk.org/api/people/1256/?format=api",
        "name": "David Christensen",
        "email": "drc@linux.vnet.ibm.com"
    },
    "delegate": {
        "id": 24651,
        "url": "https://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210623204355.74362-1-drc@linux.vnet.ibm.com/mbox/",
    "series": [
        {
            "id": 17463,
            "url": "https://patches.dpdk.org/api/series/17463/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17463",
            "date": "2021-06-23T20:43:55",
            "name": "bus/pci: Add VA support for PowerVM system LPARs",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/17463/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/94773/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/94773/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 88A84A0C41;\n\tWed, 23 Jun 2021 22:44:04 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 0FDB440141;\n\tWed, 23 Jun 2021 22:44:04 +0200 (CEST)",
            "from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com\n [148.163.158.5]) by mails.dpdk.org (Postfix) with ESMTP id 45AF34003C\n for <dev@dpdk.org>; Wed, 23 Jun 2021 22:44:03 +0200 (CEST)",
            "from pps.filterd (m0098421.ppops.net [127.0.0.1])\n by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id\n 15NKf6Wu121662 for <dev@dpdk.org>; Wed, 23 Jun 2021 16:44:02 -0400",
            "from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com\n [169.63.121.186])\n by mx0a-001b2d01.pphosted.com with ESMTP id 39c7wg081q-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Wed, 23 Jun 2021 16:44:02 -0400",
            "from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1])\n by ppma03wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15NKgalV012269\n for <dev@dpdk.org>; Wed, 23 Jun 2021 20:44:01 GMT",
            "from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com\n [9.57.198.25]) by ppma03wdc.us.ibm.com with ESMTP id 399879kcu8-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Wed, 23 Jun 2021 20:44:01 +0000",
            "from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com\n [9.57.199.109])\n by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n 15NKi1pp30802222\n (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n Wed, 23 Jun 2021 20:44:01 GMT",
            "from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id 6CC9B112064;\n Wed, 23 Jun 2021 20:44:01 +0000 (GMT)",
            "from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id 546B9112063;\n Wed, 23 Jun 2021 20:44:01 +0000 (GMT)",
            "from localhost.localdomain (unknown [9.114.224.51])\n by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP;\n Wed, 23 Jun 2021 20:44:01 +0000 (GMT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com;\n h=from : to : cc : subject\n : date : message-id : mime-version : content-type :\n content-transfer-encoding; s=pp1;\n bh=VvLImkN7XGYTH0YvKlmeynwXEQYu8NL10GbkfyHJ744=;\n b=Y+LpA2dguxdcIbQtmsiuHupvnFmcXOxfxwXbSnaX9I2eImo0C0M4s9+2XtSlbLv80QI+\n 0/UNCcPNHqJsqYgg+wFsjvFSj1ESSVGMUUBX4ixIzZHTAdq+P6LLH5V2yw6X1QdvLNzC\n XUT+fmMPkpJoeu0CBF3LnoUuuQ7MFH+moljfBV4nd7l+DnQRDZzsPJ1NawEGebI7ylGK\n 0A6zx76eEQLJppw1xzbwhgEn/0G7mCXZ7PaFSWd095opRRS4yefrWXjBKIgv4BzdyO5K\n MK0H2clcjg+gWPuaUTvw3lSbgMUYwg6PG4lUKvKKQQZRJ9iUXbc1o2UkFwhZZPjHRyrg Bw==",
        "From": "David Christensen <drc@linux.vnet.ibm.com>",
        "To": "dev@dpdk.org",
        "Cc": "thinhtr@linux.vnet.ibm.com, David Christensen <drc@linux.vnet.ibm.com>",
        "Date": "Wed, 23 Jun 2021 13:43:55 -0700",
        "Message-Id": "<20210623204355.74362-1-drc@linux.vnet.ibm.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-TM-AS-GCONF": "00",
        "X-Proofpoint-GUID": "CTE-phpNdb6kAXkjIay-g5iZZprHg61p",
        "X-Proofpoint-ORIG-GUID": "CTE-phpNdb6kAXkjIay-g5iZZprHg61p",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790\n definitions=2021-06-23_12:2021-06-23,\n 2021-06-23 signatures=0",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n malwarescore=0 spamscore=0\n priorityscore=1501 lowpriorityscore=0 bulkscore=0 mlxlogscore=999\n adultscore=0 impostorscore=0 clxscore=1015 mlxscore=0 suspectscore=0\n phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1\n engine=8.12.0-2104190000 definitions=main-2106230119",
        "Subject": "[dpdk-dev] [PATCH] bus/pci: Add VA support for PowerVM system LPARs",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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>"
    },
    "content": "Add IOMMU detection logic for PowerVM LPARs.\n\nPowerNV $ cat /proc/cpuinfo\n...\ntimebase     : 512000000\nplatform     : PowerNV\nmodel        : 8335-GTW\n\nPowerVM LPAR $ cat /proc/cpuinfo\n...\ntimebase     : 512000000\nplatform     : pSeries\nmodel        : IBM,9009-22A\nmachine      : CHRP IBM,9009-22A\nMMU          : Hash\n\nPowerNV KVM Guest $ cat /proc/cpuinfo\n...\ntimebase     : 512000000\nplatform     : pSeries\nmodel        : IBM pSeries (emulated by qemu)\nmachine      : CHRP IBM pSeries (emulated by qemu)\nMMU          : Radix\n\nSigned-off-by: David Christensen <drc@linux.vnet.ibm.com>\nReviewed-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>\n---\n drivers/bus/pci/linux/pci.c | 41 ++++++++++++++++++++++++++-----------\n 1 file changed, 29 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c\nindex 0dc99e9cb2..4a0904a53a 100644\n--- a/drivers/bus/pci/linux/pci.c\n+++ b/drivers/bus/pci/linux/pci.c\n@@ -549,16 +549,22 @@ bool\n pci_device_iommu_support_va(__rte_unused const struct rte_pci_device *dev)\n {\n \t/*\n-\t * IOMMU is always present on a PowerNV host (IOMMUv2).\n-\t * IOMMU is also present in a KVM/QEMU VM (IOMMUv1) but is not\n-\t * currently supported by DPDK. Test for our current environment\n-\t * and report VA support as appropriate.\n+\t * All POWER systems support an IOMMU, but only IOMMUv2 supports\n+\t * IOVA = VA in DPDK. Check contents of /proc/cpuinfo to find the\n+\t * system.\n+\t *\n+\t * Platform | Model |  IOMMU  | VA? |             Comment\n+\t * ---------+-------+---------+-----+---------------------------------\n+\t *  PowerNV |  N/A  | IOMMUv2 | Yes | OpenPOWER (Bare Metal)\n+\t *  pSeries | ~qemu | IOMMUv2 | Yes | PowerVM Logical Partition (LPAR)\n+\t *  pSeries |  qemu | IOMMUv1 |  No | QEMU Virtual Machine\n \t */\n \n \tchar *line = NULL;\n \tsize_t len = 0;\n \tchar filename[PATH_MAX] = \"/proc/cpuinfo\";\n \tFILE *fp = fopen(filename, \"r\");\n+\tbool pseries = false, powernv = false, qemu = false;\n \tbool ret = false;\n \n \tif (fp == NULL) {\n@@ -567,20 +573,31 @@ pci_device_iommu_support_va(__rte_unused const struct rte_pci_device *dev)\n \t\treturn ret;\n \t}\n \n-\t/* Check for a PowerNV platform */\n+\t/* Check the \"platform\" and \"model\" fields */\n \twhile (getline(&line, &len, fp) != -1) {\n-\t\tif (strstr(line, \"platform\") != NULL)\n-\t\t\tcontinue;\n-\n-\t\tif (strstr(line, \"PowerNV\") != NULL) {\n-\t\t\tRTE_LOG(DEBUG, EAL, \"Running on a PowerNV system\\n\");\n-\t\t\tret = true;\n-\t\t\tbreak;\n+\t\tif (strstr(line, \"platform\") != NULL) {\n+\t\t\tif (strstr(line, \"PowerNV\") != NULL) {\n+\t\t\t\tRTE_LOG(DEBUG, EAL, \"Running on a PowerNV \"\n+\t\t\t\t\t\t\"platform\\n\");\n+\t\t\t\tpowernv = true;\n+\t\t\t} else if (strstr(line, \"pSeries\") != NULL) {\n+\t\t\t\tRTE_LOG(DEBUG, EAL, \"Running on a pSeries \"\n+\t\t\t\t\t\t\"platform\\n\");\n+\t\t\t\tpseries = true;\n+\t\t\t}\n+\t\t} else if (strstr(line, \"model\") != NULL) {\n+\t\t\tif (strstr(line, \"qemu\") != NULL) {\n+\t\t\t\tRTE_LOG(DEBUG, EAL, \"Found qemu emulation\\n\");\n+\t\t\t\tqemu = true;\n+\t\t\t}\n \t\t}\n \t}\n \n \tfree(line);\n \tfclose(fp);\n+\n+\tif (powernv || (pseries && !qemu))\n+\t\tret = true;\n \treturn ret;\n }\n #else\n",
    "prefixes": []
}