get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 35736,
    "url": "http://patches.dpdk.org/api/patches/35736/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/07dc0a3eb7d11ec251203c00f8538996864fe7bd.1520428025.git.anatoly.burakov@intel.com/",
    "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": "<07dc0a3eb7d11ec251203c00f8538996864fe7bd.1520428025.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/07dc0a3eb7d11ec251203c00f8538996864fe7bd.1520428025.git.anatoly.burakov@intel.com",
    "date": "2018-03-07T16:56:49",
    "name": "[dpdk-dev,v2,21/41] eal: enable reserving physically contiguous memzones",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "7625fd4ea3fc5aadbad31b8090c8b6a4b50b541c",
    "submitter": {
        "id": 4,
        "url": "http://patches.dpdk.org/api/people/4/?format=api",
        "name": "Burakov, Anatoly",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/07dc0a3eb7d11ec251203c00f8538996864fe7bd.1520428025.git.anatoly.burakov@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/35736/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/35736/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 41082AAD4;\n\tWed,  7 Mar 2018 17:57:33 +0100 (CET)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 7F6DB5F2C\n\tfor <dev@dpdk.org>; Wed,  7 Mar 2018 17:57:17 +0100 (CET)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t07 Mar 2018 08:57:16 -0800",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby fmsmga002.fm.intel.com with ESMTP; 07 Mar 2018 08:57:13 -0800",
            "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\tw27GvChp032407; Wed, 7 Mar 2018 16:57:12 GMT",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id w27GvCl8006763;\n\tWed, 7 Mar 2018 16:57:12 GMT",
            "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id w27GvC9L006759;\n\tWed, 7 Mar 2018 16:57:12 GMT"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.47,436,1515484800\"; d=\"scan'208\";a=\"26020372\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "keith.wiles@intel.com, jianfeng.tan@intel.com, andras.kovacs@ericsson.com,\n\tlaszlo.vadkeri@ericsson.com, benjamin.walker@intel.com,\n\tbruce.richardson@intel.com, thomas@monjalon.net,\n\tkonstantin.ananyev@intel.com, kuralamudhan.ramakrishnan@intel.com,\n\tlouise.m.daly@intel.com, nelio.laranjeiro@6wind.com,\n\tyskoh@mellanox.com, pepperjo@japf.ch, jerin.jacob@caviumnetworks.com, \n\themant.agrawal@nxp.com, olivier.matz@6wind.com",
        "Date": "Wed,  7 Mar 2018 16:56:49 +0000",
        "Message-Id": "<07dc0a3eb7d11ec251203c00f8538996864fe7bd.1520428025.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "In-Reply-To": [
            "<cover.1520428025.git.anatoly.burakov@intel.com>",
            "<cover.1520428025.git.anatoly.burakov@intel.com>"
        ],
        "References": [
            "<cover.1520428025.git.anatoly.burakov@intel.com>",
            "<cover.1520083504.git.anatoly.burakov@intel.com>\n\t<cover.1520428025.git.anatoly.burakov@intel.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v2 21/41] eal: enable reserving physically\n\tcontiguous memzones",
        "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://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": "<https://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": "This adds a new set of _contig API's to rte_memzone.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/librte_eal/common/eal_common_memzone.c  |  44 ++++++++\n lib/librte_eal/common/include/rte_memzone.h | 154 ++++++++++++++++++++++++++++\n 2 files changed, 198 insertions(+)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_memzone.c b/lib/librte_eal/common/eal_common_memzone.c\nindex 75c7dd9..8c9aa28 100644\n--- a/lib/librte_eal/common/eal_common_memzone.c\n+++ b/lib/librte_eal/common/eal_common_memzone.c\n@@ -170,6 +170,12 @@ memzone_reserve_aligned_thread_unsafe(const char *name, size_t len,\n \t\tsocket_id = SOCKET_ID_ANY;\n \n \tif (len == 0) {\n+\t\t/* len == 0 is only allowed for non-contiguous zones */\n+\t\tif (contig) {\n+\t\t\tRTE_LOG(DEBUG, EAL, \"Reserving zero-length contiguous memzones is not supported\\n\");\n+\t\t\trte_errno = EINVAL;\n+\t\t\treturn NULL;\n+\t\t}\n \t\tif (bound != 0)\n \t\t\trequested_len = bound;\n \t\telse {\n@@ -251,6 +257,19 @@ rte_memzone_reserve_bounded(const char *name, size_t len, int socket_id,\n \n /*\n  * Return a pointer to a correctly filled memzone descriptor (with a\n+ * specified alignment and boundary). If the allocation cannot be done,\n+ * return NULL.\n+ */\n+const struct rte_memzone *\n+rte_memzone_reserve_bounded_contig(const char *name, size_t len, int socket_id,\n+\t\tunsigned int flags, unsigned int align, unsigned int bound)\n+{\n+\treturn rte_memzone_reserve_thread_safe(name, len, socket_id, flags,\n+\t\t\t\t\t       align, bound, true);\n+}\n+\n+/*\n+ * Return a pointer to a correctly filled memzone descriptor (with a\n  * specified alignment). If the allocation cannot be done, return NULL.\n  */\n const struct rte_memzone *\n@@ -262,6 +281,18 @@ rte_memzone_reserve_aligned(const char *name, size_t len, int socket_id,\n }\n \n /*\n+ * Return a pointer to a correctly filled memzone descriptor (with a\n+ * specified alignment). If the allocation cannot be done, return NULL.\n+ */\n+const struct rte_memzone *\n+rte_memzone_reserve_aligned_contig(const char *name, size_t len, int socket_id,\n+\t\tunsigned int flags, unsigned int align)\n+{\n+\treturn rte_memzone_reserve_thread_safe(name, len, socket_id, flags,\n+\t\t\t\t\t       align, 0, true);\n+}\n+\n+/*\n  * Return a pointer to a correctly filled memzone descriptor. If the\n  * allocation cannot be done, return NULL.\n  */\n@@ -274,6 +305,19 @@ rte_memzone_reserve(const char *name, size_t len, int socket_id,\n \t\t\t\t\t       false);\n }\n \n+/*\n+ * Return a pointer to a correctly filled memzone descriptor. If the\n+ * allocation cannot be done, return NULL.\n+ */\n+const struct rte_memzone *\n+rte_memzone_reserve_contig(const char *name, size_t len, int socket_id,\n+\t\tunsigned int flags)\n+{\n+\treturn rte_memzone_reserve_thread_safe(name, len, socket_id,\n+\t\t\t\t\t       flags, RTE_CACHE_LINE_SIZE, 0,\n+\t\t\t\t\t       true);\n+}\n+\n int\n rte_memzone_free(const struct rte_memzone *mz)\n {\ndiff --git a/lib/librte_eal/common/include/rte_memzone.h b/lib/librte_eal/common/include/rte_memzone.h\nindex a69f068..5f1293f 100644\n--- a/lib/librte_eal/common/include/rte_memzone.h\n+++ b/lib/librte_eal/common/include/rte_memzone.h\n@@ -227,6 +227,160 @@ const struct rte_memzone *rte_memzone_reserve_bounded(const char *name,\n \t\t\tunsigned flags, unsigned align, unsigned bound);\n \n /**\n+ * Reserve an IOVA-contiguous portion of physical memory.\n+ *\n+ * This function reserves some IOVA-contiguous memory and returns a pointer to a\n+ * correctly filled memzone descriptor. If the allocation cannot be\n+ * done, return NULL.\n+ *\n+ * @param name\n+ *   The name of the memzone. If it already exists, the function will\n+ *   fail and return NULL.\n+ * @param len\n+ *   The size of the memory to be reserved.\n+ * @param socket_id\n+ *   The socket identifier in the case of\n+ *   NUMA. The value can be SOCKET_ID_ANY if there is no NUMA\n+ *   constraint for the reserved zone.\n+ * @param flags\n+ *   The flags parameter is used to request memzones to be\n+ *   taken from specifically sized hugepages.\n+ *   - RTE_MEMZONE_2MB - Reserved from 2MB pages\n+ *   - RTE_MEMZONE_1GB - Reserved from 1GB pages\n+ *   - RTE_MEMZONE_16MB - Reserved from 16MB pages\n+ *   - RTE_MEMZONE_16GB - Reserved from 16GB pages\n+ *   - RTE_MEMZONE_256KB - Reserved from 256KB pages\n+ *   - RTE_MEMZONE_256MB - Reserved from 256MB pages\n+ *   - RTE_MEMZONE_512MB - Reserved from 512MB pages\n+ *   - RTE_MEMZONE_4GB - Reserved from 4GB pages\n+ *   - RTE_MEMZONE_SIZE_HINT_ONLY - Allow alternative page size to be used if\n+ *                                  the requested page size is unavailable.\n+ *                                  If this flag is not set, the function\n+ *                                  will return error on an unavailable size\n+ *                                  request.\n+ * @return\n+ *   A pointer to a correctly-filled read-only memzone descriptor, or NULL\n+ *   on error.\n+ *   On error case, rte_errno will be set appropriately:\n+ *    - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure\n+ *    - E_RTE_SECONDARY - function was called from a secondary process instance\n+ *    - ENOSPC - the maximum number of memzones has already been allocated\n+ *    - EEXIST - a memzone with the same name already exists\n+ *    - ENOMEM - no appropriate memory area found in which to create memzone\n+ *    - EINVAL - invalid parameters\n+ */\n+const struct rte_memzone *rte_memzone_reserve_contig(const char *name,\n+\t\tsize_t len, int socket_id, unsigned int flags);\n+\n+/**\n+ * Reserve an IOVA-contiguous portion of physical memory with alignment on a\n+ * specified boundary.\n+ *\n+ * This function reserves some IOVA-contiguous memory with alignment on a\n+ * specified boundary, and returns a pointer to a correctly filled memzone\n+ * descriptor. If the allocation cannot be done or if the alignment\n+ * is not a power of 2, returns NULL.\n+ *\n+ * @param name\n+ *   The name of the memzone. If it already exists, the function will\n+ *   fail and return NULL.\n+ * @param len\n+ *   The size of the memory to be reserved.\n+ * @param socket_id\n+ *   The socket identifier in the case of\n+ *   NUMA. The value can be SOCKET_ID_ANY if there is no NUMA\n+ *   constraint for the reserved zone.\n+ * @param flags\n+ *   The flags parameter is used to request memzones to be\n+ *   taken from specifically sized hugepages.\n+ *   - RTE_MEMZONE_2MB - Reserved from 2MB pages\n+ *   - RTE_MEMZONE_1GB - Reserved from 1GB pages\n+ *   - RTE_MEMZONE_16MB - Reserved from 16MB pages\n+ *   - RTE_MEMZONE_16GB - Reserved from 16GB pages\n+ *   - RTE_MEMZONE_256KB - Reserved from 256KB pages\n+ *   - RTE_MEMZONE_256MB - Reserved from 256MB pages\n+ *   - RTE_MEMZONE_512MB - Reserved from 512MB pages\n+ *   - RTE_MEMZONE_4GB - Reserved from 4GB pages\n+ *   - RTE_MEMZONE_SIZE_HINT_ONLY - Allow alternative page size to be used if\n+ *                                  the requested page size is unavailable.\n+ *                                  If this flag is not set, the function\n+ *                                  will return error on an unavailable size\n+ *                                  request.\n+ * @param align\n+ *   Alignment for resulting memzone. Must be a power of 2.\n+ * @return\n+ *   A pointer to a correctly-filled read-only memzone descriptor, or NULL\n+ *   on error.\n+ *   On error case, rte_errno will be set appropriately:\n+ *    - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure\n+ *    - E_RTE_SECONDARY - function was called from a secondary process instance\n+ *    - ENOSPC - the maximum number of memzones has already been allocated\n+ *    - EEXIST - a memzone with the same name already exists\n+ *    - ENOMEM - no appropriate memory area found in which to create memzone\n+ *    - EINVAL - invalid parameters\n+ */\n+const struct rte_memzone *rte_memzone_reserve_aligned_contig(const char *name,\n+\t\tsize_t len, int socket_id, unsigned int flags,\n+\t\tunsigned int align);\n+\n+/**\n+ * Reserve an IOVA-contiguous portion of physical memory with specified\n+ * alignment and boundary.\n+ *\n+ * This function reserves some IOVA-contiguous memory with specified alignment\n+ * and boundary, and returns a pointer to a correctly filled memzone\n+ * descriptor. If the allocation cannot be done or if the alignment\n+ * or boundary are not a power of 2, returns NULL.\n+ * Memory buffer is reserved in a way, that it wouldn't cross specified\n+ * boundary. That implies that requested length should be less or equal\n+ * then boundary.\n+ *\n+ * @param name\n+ *   The name of the memzone. If it already exists, the function will\n+ *   fail and return NULL.\n+ * @param len\n+ *   The size of the memory to be reserved.\n+ * @param socket_id\n+ *   The socket identifier in the case of\n+ *   NUMA. The value can be SOCKET_ID_ANY if there is no NUMA\n+ *   constraint for the reserved zone.\n+ * @param flags\n+ *   The flags parameter is used to request memzones to be\n+ *   taken from specifically sized hugepages.\n+ *   - RTE_MEMZONE_2MB - Reserved from 2MB pages\n+ *   - RTE_MEMZONE_1GB - Reserved from 1GB pages\n+ *   - RTE_MEMZONE_16MB - Reserved from 16MB pages\n+ *   - RTE_MEMZONE_16GB - Reserved from 16GB pages\n+ *   - RTE_MEMZONE_256KB - Reserved from 256KB pages\n+ *   - RTE_MEMZONE_256MB - Reserved from 256MB pages\n+ *   - RTE_MEMZONE_512MB - Reserved from 512MB pages\n+ *   - RTE_MEMZONE_4GB - Reserved from 4GB pages\n+ *   - RTE_MEMZONE_SIZE_HINT_ONLY - Allow alternative page size to be used if\n+ *                                  the requested page size is unavailable.\n+ *                                  If this flag is not set, the function\n+ *                                  will return error on an unavailable size\n+ *                                  request.\n+ * @param align\n+ *   Alignment for resulting memzone. Must be a power of 2.\n+ * @param bound\n+ *   Boundary for resulting memzone. Must be a power of 2 or zero.\n+ *   Zero value implies no boundary condition.\n+ * @return\n+ *   A pointer to a correctly-filled read-only memzone descriptor, or NULL\n+ *   on error.\n+ *   On error case, rte_errno will be set appropriately:\n+ *    - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure\n+ *    - E_RTE_SECONDARY - function was called from a secondary process instance\n+ *    - ENOSPC - the maximum number of memzones has already been allocated\n+ *    - EEXIST - a memzone with the same name already exists\n+ *    - ENOMEM - no appropriate memory area found in which to create memzone\n+ *    - EINVAL - invalid parameters\n+ */\n+const struct rte_memzone *rte_memzone_reserve_bounded_contig(const char *name,\n+\t\tsize_t len, int socket_id, unsigned int flags,\n+\t\tunsigned int align, unsigned int bound);\n+\n+/**\n  * Free a memzone.\n  *\n  * @param mz\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "21/41"
    ]
}