get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 76935,
    "url": "http://patches.dpdk.org/api/patches/76935/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200908201830.74206-2-cristian.dumitrescu@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": "<20200908201830.74206-2-cristian.dumitrescu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200908201830.74206-2-cristian.dumitrescu@intel.com",
    "date": "2020-09-08T20:17:50",
    "name": "[v3,01/41] pipeline: add new SWX pipeline type",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c223c76c83ce495d1a028aca63aa92deecbaaeec",
    "submitter": {
        "id": 19,
        "url": "http://patches.dpdk.org/api/people/19/?format=api",
        "name": "Cristian Dumitrescu",
        "email": "cristian.dumitrescu@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200908201830.74206-2-cristian.dumitrescu@intel.com/mbox/",
    "series": [
        {
            "id": 12034,
            "url": "http://patches.dpdk.org/api/series/12034/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12034",
            "date": "2020-09-08T20:17:52",
            "name": "Pipeline alignment with the P4 language",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/12034/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/76935/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/76935/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id CC5D3A04B1;\n\tTue,  8 Sep 2020 22:19:08 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 09CD91C0D2;\n\tTue,  8 Sep 2020 22:18:58 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by dpdk.org (Postfix) with ESMTP id A39DB4C99\n for <dev@dpdk.org>; Tue,  8 Sep 2020 22:18:53 +0200 (CEST)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 08 Sep 2020 13:18:32 -0700",
            "from silpixa00400573.ir.intel.com (HELO\n silpixa00400573.ger.corp.intel.com) ([10.237.223.107])\n by fmsmga006.fm.intel.com with ESMTP; 08 Sep 2020 13:18:31 -0700"
        ],
        "IronPort-SDR": [
            "\n vmjmEZqLf4jL5uMwSiTvSgXz0/7oPDn2gafzo7FQwhmxDb0LaP5rLpBqZE2Q2wlS279nX6MwEh\n WdhXoN3bTwkg==",
            "\n a3gygjYE0h3QsZxSoAW9gQeUr0agweZrZS+Sap5GHlHvJjSzdgtg7bnuRb8tffYJlEDSVwugiL\n QKgXDjd0FQ4w=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9738\"; a=\"145939361\"",
            "E=Sophos;i=\"5.76,407,1592895600\"; d=\"scan'208\";a=\"145939361\"",
            "E=Sophos;i=\"5.76,406,1592895600\"; d=\"scan'208\";a=\"504493353\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Cristian Dumitrescu <cristian.dumitrescu@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue,  8 Sep 2020 21:17:50 +0100",
        "Message-Id": "<20200908201830.74206-2-cristian.dumitrescu@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200908201830.74206-1-cristian.dumitrescu@intel.com>",
        "References": "<20200907214032.95052-2-cristian.dumitrescu@intel.com>\n <20200908201830.74206-1-cristian.dumitrescu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3 01/41] pipeline: add new SWX pipeline type",
        "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 <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 new improved Software Switch (SWX) pipeline type that supports\ndynamically-defined packet headers, meta-data, actions and pipelines.\nActions and pipelines are defined through instructions.\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\n---\n lib/librte_pipeline/meson.build              | 10 ++-\n lib/librte_pipeline/rte_pipeline_version.map |  3 +\n lib/librte_pipeline/rte_swx_pipeline.c       | 70 +++++++++++++++++\n lib/librte_pipeline/rte_swx_pipeline.h       | 79 ++++++++++++++++++++\n 4 files changed, 160 insertions(+), 2 deletions(-)\n create mode 100644 lib/librte_pipeline/rte_swx_pipeline.c\n create mode 100644 lib/librte_pipeline/rte_swx_pipeline.h",
    "diff": "diff --git a/lib/librte_pipeline/meson.build b/lib/librte_pipeline/meson.build\nindex d70b1a023..880c2b274 100644\n--- a/lib/librte_pipeline/meson.build\n+++ b/lib/librte_pipeline/meson.build\n@@ -1,6 +1,12 @@\n # SPDX-License-Identifier: BSD-3-Clause\n # Copyright(c) 2017 Intel Corporation\n \n-sources = files('rte_pipeline.c', 'rte_port_in_action.c', 'rte_table_action.c')\n-headers = files('rte_pipeline.h', 'rte_port_in_action.h', 'rte_table_action.h')\n+sources = files('rte_pipeline.c',\n+\t'rte_port_in_action.c',\n+\t'rte_table_action.c',\n+\t'rte_swx_pipeline.c',)\n+headers = files('rte_pipeline.h',\n+\t'rte_port_in_action.h',\n+\t'rte_table_action.h',\n+\t'rte_swx_pipeline.h',)\n deps += ['port', 'table', 'meter', 'sched', 'cryptodev']\ndiff --git a/lib/librte_pipeline/rte_pipeline_version.map b/lib/librte_pipeline/rte_pipeline_version.map\nindex 9ed80eb04..39593f1ee 100644\n--- a/lib/librte_pipeline/rte_pipeline_version.map\n+++ b/lib/librte_pipeline/rte_pipeline_version.map\n@@ -55,4 +55,7 @@ EXPERIMENTAL {\n \trte_table_action_time_read;\n \trte_table_action_ttl_read;\n \trte_table_action_crypto_sym_session_get;\n+\trte_swx_pipeline_config;\n+\trte_swx_pipeline_build;\n+\trte_swx_pipeline_free;\n };\ndiff --git a/lib/librte_pipeline/rte_swx_pipeline.c b/lib/librte_pipeline/rte_swx_pipeline.c\nnew file mode 100644\nindex 000000000..2319d4570\n--- /dev/null\n+++ b/lib/librte_pipeline/rte_swx_pipeline.c\n@@ -0,0 +1,70 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2020 Intel Corporation\n+ */\n+#include <stdlib.h>\n+#include <string.h>\n+#include <stdio.h>\n+#include <errno.h>\n+\n+#include <rte_common.h>\n+\n+#include \"rte_swx_pipeline.h\"\n+\n+#define CHECK(condition, err_code)                                             \\\n+do {                                                                           \\\n+\tif (!(condition))                                                      \\\n+\t\treturn -(err_code);                                            \\\n+} while (0)\n+\n+#define CHECK_NAME(name, err_code)                                             \\\n+\tCHECK((name) && (name)[0], err_code)\n+\n+/*\n+ * Pipeline.\n+ */\n+struct rte_swx_pipeline {\n+\tint build_done;\n+\tint numa_node;\n+};\n+\n+\n+/*\n+ * Pipeline.\n+ */\n+int\n+rte_swx_pipeline_config(struct rte_swx_pipeline **p, int numa_node)\n+{\n+\tstruct rte_swx_pipeline *pipeline;\n+\n+\t/* Check input parameters. */\n+\tCHECK(p, EINVAL);\n+\n+\t/* Memory allocation. */\n+\tpipeline = calloc(1, sizeof(struct rte_swx_pipeline));\n+\tCHECK(pipeline, ENOMEM);\n+\n+\t/* Initialization. */\n+\tpipeline->numa_node = numa_node;\n+\n+\t*p = pipeline;\n+\treturn 0;\n+}\n+\n+void\n+rte_swx_pipeline_free(struct rte_swx_pipeline *p)\n+{\n+\tif (!p)\n+\t\treturn;\n+\n+\tfree(p);\n+}\n+\n+int\n+rte_swx_pipeline_build(struct rte_swx_pipeline *p)\n+{\n+\tCHECK(p, EINVAL);\n+\tCHECK(p->build_done == 0, EEXIST);\n+\n+\tp->build_done = 1;\n+\treturn 0;\n+}\ndiff --git a/lib/librte_pipeline/rte_swx_pipeline.h b/lib/librte_pipeline/rte_swx_pipeline.h\nnew file mode 100644\nindex 000000000..ded26a4e4\n--- /dev/null\n+++ b/lib/librte_pipeline/rte_swx_pipeline.h\n@@ -0,0 +1,79 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2020 Intel Corporation\n+ */\n+#ifndef __INCLUDE_RTE_SWX_PIPELINE_H__\n+#define __INCLUDE_RTE_SWX_PIPELINE_H__\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+/**\n+ * @file\n+ * RTE SWX Pipeline\n+ */\n+\n+#include <stddef.h>\n+#include <stdint.h>\n+\n+#include <rte_compat.h>\n+\n+/*\n+ * Pipeline setup and operation\n+ */\n+\n+/** Pipeline opaque data structure. */\n+struct rte_swx_pipeline;\n+\n+/**\n+ * Pipeline configure\n+ *\n+ * @param[out] p\n+ *   Pipeline handle. Must point to valid memory. Contains valid pipeline handle\n+ *   when the function returns successfully.\n+ * @param[in] numa_node\n+ *   Non-Uniform Memory Access (NUMA) node.\n+ * @return\n+ *   0 on success or the following error codes otherwise:\n+ *   -EINVAL: Invalid argument;\n+ *   -ENOMEM: Not enough space/cannot allocate memory.\n+ */\n+__rte_experimental\n+int\n+rte_swx_pipeline_config(struct rte_swx_pipeline **p,\n+\t\t\tint numa_node);\n+\n+/**\n+ * Pipeline build\n+ *\n+ * Once called, the pipeline build operation marks the end of pipeline\n+ * configuration. At this point, all the internal data structures needed to run\n+ * the pipeline are built.\n+ *\n+ * @param[in] p\n+ *   Pipeline handle.\n+ * @return\n+ *   0 on success or the following error codes otherwise:\n+ *   -EINVAL: Invalid argument;\n+ *   -ENOMEM: Not enough space/cannot allocate memory;\n+ *   -EEXIST: Pipeline was already built successfully.\n+ */\n+__rte_experimental\n+int\n+rte_swx_pipeline_build(struct rte_swx_pipeline *p);\n+\n+/**\n+ * Pipeline free\n+ *\n+ * @param[in] p\n+ *   Pipeline handle.\n+ */\n+__rte_experimental\n+void\n+rte_swx_pipeline_free(struct rte_swx_pipeline *p);\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif\n",
    "prefixes": [
        "v3",
        "01/41"
    ]
}