get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 43014,
    "url": "http://patchwork.dpdk.org/api/patches/43014/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/53d64ed31c0cc2f570dd78e0226c3fcd986184e0.1531477505.git.anatoly.burakov@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<53d64ed31c0cc2f570dd78e0226c3fcd986184e0.1531477505.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/53d64ed31c0cc2f570dd78e0226c3fcd986184e0.1531477505.git.anatoly.burakov@intel.com",
    "date": "2018-07-13T10:27:07",
    "name": "[v2,1/9] fbarray: support no-shconf mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "debabaee7b2e523d791b52f69265a37125dd605c",
    "submitter": {
        "id": 4,
        "url": "http://patchwork.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/53d64ed31c0cc2f570dd78e0226c3fcd986184e0.1531477505.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 560,
            "url": "http://patchwork.dpdk.org/api/series/560/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=560",
            "date": "2018-07-13T10:27:06",
            "name": "Support running DPDK without hugetlbfs mountpoint",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/560/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/43014/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/43014/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5F6A44D27;\n\tFri, 13 Jul 2018 12:27:24 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby dpdk.org (Postfix) with ESMTP id 0342A4F90\n\tfor <dev@dpdk.org>; Fri, 13 Jul 2018 12:27:19 +0200 (CEST)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t13 Jul 2018 03:27:18 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga007.jf.intel.com with ESMTP; 13 Jul 2018 03:27:16 -0700",
            "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tw6DARFP2007517; Fri, 13 Jul 2018 11:27:15 +0100",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id w6DARFP4027994;\n\tFri, 13 Jul 2018 11:27:15 +0100",
            "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id w6DARFgd027990;\n\tFri, 13 Jul 2018 11:27:15 +0100"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,347,1526367600\"; d=\"scan'208\";a=\"56238911\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "ray.kinsella@intel.com, kuralamudhan.ramakrishnan@intel.com,\n\tlouise.m.daly@intel.com, bruce.richardson@intel.com,\n\tferruh.yigit@intel.com, konstantin.ananyev@intel.com, thomas@monjalon.net",
        "Date": "Fri, 13 Jul 2018 11:27:07 +0100",
        "Message-Id": "<53d64ed31c0cc2f570dd78e0226c3fcd986184e0.1531477505.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "In-Reply-To": [
            "<cover.1531477505.git.anatoly.burakov@intel.com>",
            "<cover.1531477505.git.anatoly.burakov@intel.com>"
        ],
        "References": [
            "<cover.1531477505.git.anatoly.burakov@intel.com>",
            "<cover.1527872626.git.anatoly.burakov@intel.com>\n\t<cover.1531477505.git.anatoly.burakov@intel.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v2 1/9] fbarray: support no-shconf mode",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "When using --no-shconf option, the expectation is that no multiprocess\nwill be supported as no shared files are created. However, fbarray still\ncreates some shared files that prevent multiple processes with the same\nprefix from starting.\n\nFix this by avoiding creating shared files whenever noshconf option is\nspecified. Since virtual areas we get from eal_get_virtual_area() are\nread-only, remap them as writable.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n\nNotes:\n    RFC->v1:\n    - Use --no-shconf only\n\n lib/librte_eal/common/eal_common_fbarray.c | 71 +++++++++++++---------\n 1 file changed, 42 insertions(+), 29 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_fbarray.c b/lib/librte_eal/common/eal_common_fbarray.c\nindex 977174c4f..43caf3ced 100644\n--- a/lib/librte_eal/common/eal_common_fbarray.c\n+++ b/lib/librte_eal/common/eal_common_fbarray.c\n@@ -705,39 +705,52 @@ rte_fbarray_init(struct rte_fbarray *arr, const char *name, unsigned int len,\n \tif (data == NULL)\n \t\tgoto fail;\n \n-\teal_get_fbarray_path(path, sizeof(path), name);\n+\tif (internal_config.no_shconf) {\n+\t\t/* remap virtual area as writable */\n+\t\tvoid *new_data = mmap(data, mmap_len, PROT_READ | PROT_WRITE,\n+\t\t\t\tMAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);\n+\t\tif (new_data == MAP_FAILED) {\n+\t\t\tRTE_LOG(DEBUG, EAL, \"%s(): couldn't remap anonymous memory: %s\\n\",\n+\t\t\t\t\t__func__, strerror(errno));\n+\t\t\tgoto fail;\n+\t\t}\n+\t} else {\n+\t\teal_get_fbarray_path(path, sizeof(path), name);\n \n-\t/*\n-\t * Each fbarray is unique to process namespace, i.e. the filename\n-\t * depends on process prefix. Try to take out a lock and see if we\n-\t * succeed. If we don't, someone else is using it already.\n-\t */\n-\tfd = open(path, O_CREAT | O_RDWR, 0600);\n-\tif (fd < 0) {\n-\t\tRTE_LOG(DEBUG, EAL, \"%s(): couldn't open %s: %s\\n\", __func__,\n-\t\t\t\tpath, strerror(errno));\n-\t\trte_errno = errno;\n-\t\tgoto fail;\n-\t} else if (flock(fd, LOCK_EX | LOCK_NB)) {\n-\t\tRTE_LOG(DEBUG, EAL, \"%s(): couldn't lock %s: %s\\n\", __func__,\n-\t\t\t\tpath, strerror(errno));\n-\t\trte_errno = EBUSY;\n-\t\tgoto fail;\n-\t}\n+\t\t/*\n+\t\t * Each fbarray is unique to process namespace, i.e. the\n+\t\t * filename depends on process prefix. Try to take out a lock\n+\t\t * and see if we succeed. If we don't, someone else is using it\n+\t\t * already.\n+\t\t */\n+\t\tfd = open(path, O_CREAT | O_RDWR, 0600);\n+\t\tif (fd < 0) {\n+\t\t\tRTE_LOG(DEBUG, EAL, \"%s(): couldn't open %s: %s\\n\",\n+\t\t\t\t\t__func__, path, strerror(errno));\n+\t\t\trte_errno = errno;\n+\t\t\tgoto fail;\n+\t\t} else if (flock(fd, LOCK_EX | LOCK_NB)) {\n+\t\t\tRTE_LOG(DEBUG, EAL, \"%s(): couldn't lock %s: %s\\n\",\n+\t\t\t\t\t__func__, path, strerror(errno));\n+\t\t\trte_errno = EBUSY;\n+\t\t\tgoto fail;\n+\t\t}\n \n-\t/* take out a non-exclusive lock, so that other processes could still\n-\t * attach to it, but no other process could reinitialize it.\n-\t */\n-\tif (flock(fd, LOCK_SH | LOCK_NB)) {\n-\t\trte_errno = errno;\n-\t\tgoto fail;\n-\t}\n+\t\t/* take out a non-exclusive lock, so that other processes could\n+\t\t * still attach to it, but no other process could reinitialize\n+\t\t * it.\n+\t\t */\n+\t\tif (flock(fd, LOCK_SH | LOCK_NB)) {\n+\t\t\trte_errno = errno;\n+\t\t\tgoto fail;\n+\t\t}\n \n-\tif (resize_and_map(fd, data, mmap_len))\n-\t\tgoto fail;\n+\t\tif (resize_and_map(fd, data, mmap_len))\n+\t\t\tgoto fail;\n \n-\t/* we've mmap'ed the file, we can now close the fd */\n-\tclose(fd);\n+\t\t/* we've mmap'ed the file, we can now close the fd */\n+\t\tclose(fd);\n+\t}\n \n \t/* initialize the data */\n \tmemset(data, 0, mmap_len);\n",
    "prefixes": [
        "v2",
        "1/9"
    ]
}