get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 51711,
    "url": "http://patchwork.dpdk.org/api/patches/51711/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20190326122029.59359-3-xiaolong.ye@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": "<20190326122029.59359-3-xiaolong.ye@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190326122029.59359-3-xiaolong.ye@intel.com",
    "date": "2019-03-26T12:20:26",
    "name": "[v6,2/5] lib/mbuf: introduce helper to create mempool with flags",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "614e57b72627e88c8c7dc3b290071178d0e13c5b",
    "submitter": {
        "id": 1120,
        "url": "http://patchwork.dpdk.org/api/people/1120/?format=api",
        "name": "Xiaolong Ye",
        "email": "xiaolong.ye@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20190326122029.59359-3-xiaolong.ye@intel.com/mbox/",
    "series": [
        {
            "id": 3920,
            "url": "http://patchwork.dpdk.org/api/series/3920/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=3920",
            "date": "2019-03-26T12:20:24",
            "name": "Introduce AF_XDP PMD",
            "version": 6,
            "mbox": "http://patchwork.dpdk.org/series/3920/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/51711/comments/",
    "check": "warning",
    "checks": "http://patchwork.dpdk.org/api/patches/51711/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 86BFE4CAF;\n\tTue, 26 Mar 2019 13:25:08 +0100 (CET)",
            "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby dpdk.org (Postfix) with ESMTP id DF6BF4C93\n\tfor <dev@dpdk.org>; Tue, 26 Mar 2019 13:25:04 +0100 (CET)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t26 Mar 2019 05:25:04 -0700",
            "from yexl-server.sh.intel.com ([10.67.110.206])\n\tby orsmga001.jf.intel.com with ESMTP; 26 Mar 2019 05:25:02 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.60,271,1549958400\"; d=\"scan'208\";a=\"217657700\"",
        "From": "Xiaolong Ye <xiaolong.ye@intel.com>",
        "To": "dev@dpdk.org, David Marchand <david.marchand@redhat.com>,\n\tAndrew Rybchenko <arybchenko@solarflare.com>",
        "Cc": "Qi Zhang <qi.z.zhang@intel.com>,\n\tKarlsson Magnus <magnus.karlsson@intel.com>,\n\tTopel Bjorn <bjorn.topel@intel.com>,\n\tMaxime Coquelin <maxime.coquelin@redhat.com>,\n\tStephen Hemminger <stephen@networkplumber.org>,\n\tFerruh Yigit <ferruh.yigit@intel.com>, Luca Boccassi <bluca@debian.org>, \n\tBruce Richardson <bruce.richardson@intel.com>,\n\tAnanyev Konstantin <konstantin.ananyev@intel.com>,\n\tXiaolong Ye <xiaolong.ye@intel.com>",
        "Date": "Tue, 26 Mar 2019 20:20:26 +0800",
        "Message-Id": "<20190326122029.59359-3-xiaolong.ye@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190326122029.59359-1-xiaolong.ye@intel.com>",
        "References": "<20190301080947.91086-1-xiaolong.ye@intel.com>\n\t<20190326122029.59359-1-xiaolong.ye@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v6 2/5] lib/mbuf: introduce helper to create\n\tmempool with flags",
        "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": "This allows applications to create mbuf mempool with specific flags\nsuch as MEMPOOL_F_NO_SPREAD if they want fixed size memory objects.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\nSigned-off-by: Xiaolong Ye <xiaolong.ye@intel.com>\n---\n lib/librte_mbuf/rte_mbuf.c           | 29 ++++++++++++++----\n lib/librte_mbuf/rte_mbuf.h           | 45 ++++++++++++++++++++++++++++\n lib/librte_mbuf/rte_mbuf_version.map |  1 +\n 3 files changed, 70 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c\nindex 21f6f7404..c1db9e298 100644\n--- a/lib/librte_mbuf/rte_mbuf.c\n+++ b/lib/librte_mbuf/rte_mbuf.c\n@@ -106,11 +106,10 @@ rte_pktmbuf_init(struct rte_mempool *mp,\n \tm->next = NULL;\n }\n \n-/* Helper to create a mbuf pool with given mempool ops name*/\n-struct rte_mempool *\n-rte_pktmbuf_pool_create_by_ops(const char *name, unsigned int n,\n+static struct rte_mempool *\n+rte_pktmbuf_pool_create_by_ops_with_flags(const char *name, unsigned int n,\n \tunsigned int cache_size, uint16_t priv_size, uint16_t data_room_size,\n-\tint socket_id, const char *ops_name)\n+\tunsigned int flags, int socket_id, const char *ops_name)\n {\n \tstruct rte_mempool *mp;\n \tstruct rte_pktmbuf_pool_private mbp_priv;\n@@ -130,7 +129,7 @@ rte_pktmbuf_pool_create_by_ops(const char *name, unsigned int n,\n \tmbp_priv.mbuf_priv_size = priv_size;\n \n \tmp = rte_mempool_create_empty(name, n, elt_size, cache_size,\n-\t\t sizeof(struct rte_pktmbuf_pool_private), socket_id, 0);\n+\t\t sizeof(struct rte_pktmbuf_pool_private), socket_id, flags);\n \tif (mp == NULL)\n \t\treturn NULL;\n \n@@ -157,6 +156,16 @@ rte_pktmbuf_pool_create_by_ops(const char *name, unsigned int n,\n \treturn mp;\n }\n \n+/* Helper to create a mbuf pool with given mempool ops name*/\n+struct rte_mempool *\n+rte_pktmbuf_pool_create_by_ops(const char *name, unsigned int n,\n+\tunsigned int cache_size, uint16_t priv_size, uint16_t data_room_size,\n+\tint socket_id, const char *ops_name)\n+{\n+\treturn rte_pktmbuf_pool_create_by_ops_with_flags(name, n, cache_size,\n+\t\t\t priv_size, data_room_size, 0, socket_id, ops_name);\n+}\n+\n /* helper to create a mbuf pool */\n struct rte_mempool *\n rte_pktmbuf_pool_create(const char *name, unsigned int n,\n@@ -167,6 +176,16 @@ rte_pktmbuf_pool_create(const char *name, unsigned int n,\n \t\t\tdata_room_size, socket_id, NULL);\n }\n \n+/* helper to create a mbuf pool with flags (e.g. NO_SPREAD) */\n+struct rte_mempool * __rte_experimental\n+rte_pktmbuf_pool_create_with_flags(const char *name, unsigned int n,\n+\tunsigned int cache_size, uint16_t priv_size, uint16_t data_room_size,\n+\tunsigned int flags, int socket_id)\n+{\n+\treturn rte_pktmbuf_pool_create_by_ops_with_flags(name, n, cache_size,\n+\t\t\tpriv_size, data_room_size, flags, socket_id, NULL);\n+}\n+\n /* do some sanity checks on a mbuf: panic if it fails */\n void\n rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header)\ndiff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h\nindex d961ccaf6..105ead6de 100644\n--- a/lib/librte_mbuf/rte_mbuf.h\n+++ b/lib/librte_mbuf/rte_mbuf.h\n@@ -1266,6 +1266,51 @@ rte_pktmbuf_pool_create(const char *name, unsigned n,\n \tunsigned cache_size, uint16_t priv_size, uint16_t data_room_size,\n \tint socket_id);\n \n+/**\n+ * Create a mbuf pool with flags.\n+ *\n+ * This function creates and initializes a packet mbuf pool. It is\n+ * a wrapper to rte_mempool functions.\n+ *\n+ * @warning\n+ * @b EXPERIMENTAL: This API may change without prior notice.\n+ *\n+ * @param name\n+ *   The name of the mbuf pool.\n+ * @param n\n+ *   The number of elements in the mbuf pool. The optimum size (in terms\n+ *   of memory usage) for a mempool is when n is a power of two minus one:\n+ *   n = (2^q - 1).\n+ * @param cache_size\n+ *   Size of the per-core object cache. See rte_mempool_create() for\n+ *   details.\n+ * @param priv_size\n+ *   Size of application private are between the rte_mbuf structure\n+ *   and the data buffer. This value must be aligned to RTE_MBUF_PRIV_ALIGN.\n+ * @param data_room_size\n+ *   Size of data buffer in each mbuf, including RTE_PKTMBUF_HEADROOM.\n+ * @param flags\n+ *   Flags controlling the behavior of the mempool. See\n+ *   rte_mempool_create() for details.\n+ * @param socket_id\n+ *   The socket identifier where the memory should be allocated. The\n+ *   value can be *SOCKET_ID_ANY* if there is no NUMA constraint for the\n+ *   reserved zone.\n+ * @return\n+ *   The pointer to the new allocated mempool, on success. NULL on error\n+ *   with rte_errno set appropriately. Possible rte_errno values include:\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+ *    - EINVAL - cache size provided is too large, or priv_size is not aligned.\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+ */\n+struct rte_mempool * __rte_experimental\n+rte_pktmbuf_pool_create_with_flags(const char *name, unsigned int n,\n+\tunsigned int cache_size, uint16_t priv_size, uint16_t data_room_size,\n+\tunsigned int flags, int socket_id);\n+\n /**\n  * Create a mbuf pool with a given mempool ops name\n  *\ndiff --git a/lib/librte_mbuf/rte_mbuf_version.map b/lib/librte_mbuf/rte_mbuf_version.map\nindex 2662a37bf..2579538e0 100644\n--- a/lib/librte_mbuf/rte_mbuf_version.map\n+++ b/lib/librte_mbuf/rte_mbuf_version.map\n@@ -50,4 +50,5 @@ EXPERIMENTAL {\n \tglobal:\n \n \trte_mbuf_check;\n+\trte_pktmbuf_pool_create_with_flags;\n } DPDK_18.08;\n",
    "prefixes": [
        "v6",
        "2/5"
    ]
}