get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 44583,
    "url": "http://patchwork.dpdk.org/api/patches/44583/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1536675645-10105-16-git-send-email-reshma.pattan@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": "<1536675645-10105-16-git-send-email-reshma.pattan@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1536675645-10105-16-git-send-email-reshma.pattan@intel.com",
    "date": "2018-09-11T14:20:45",
    "name": "[v2,15/15] net/softnic: add parsing for raw flow item",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e830b91ddacbf751a0012d88e340643a045e93c5",
    "submitter": {
        "id": 70,
        "url": "http://patchwork.dpdk.org/api/people/70/?format=api",
        "name": "Pattan, Reshma",
        "email": "reshma.pattan@intel.com"
    },
    "delegate": {
        "id": 10018,
        "url": "http://patchwork.dpdk.org/api/users/10018/?format=api",
        "username": "cristian_dumitrescu",
        "first_name": "Cristian",
        "last_name": "Dumitrescu",
        "email": "cristian.dumitrescu@intel.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1536675645-10105-16-git-send-email-reshma.pattan@intel.com/mbox/",
    "series": [
        {
            "id": 1281,
            "url": "http://patchwork.dpdk.org/api/series/1281/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=1281",
            "date": "2018-09-11T14:20:45",
            "name": null,
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/1281/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/44583/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/44583/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 6E4E95F3D;\n\tTue, 11 Sep 2018 16:21:17 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id AC8545A6A\n\tfor <dev@dpdk.org>; Tue, 11 Sep 2018 16:21:05 +0200 (CEST)",
            "from fmsmga007.fm.intel.com ([10.253.24.52])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t11 Sep 2018 07:21:05 -0700",
            "from sivswdev02.ir.intel.com (HELO localhost.localdomain)\n\t([10.237.217.46])\n\tby fmsmga007.fm.intel.com with ESMTP; 11 Sep 2018 07:21:04 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.53,360,1531810800\"; d=\"scan'208\";a=\"69156931\"",
        "From": "Reshma Pattan <reshma.pattan@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Cristian Dumitrescu <cristian.dumitrescu@intel.com>,\n\tReshma Pattan <reshma.pattan@intel.com>",
        "Date": "Tue, 11 Sep 2018 15:20:45 +0100",
        "Message-Id": "<1536675645-10105-16-git-send-email-reshma.pattan@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "In-Reply-To": "<1536251222-17275-1-git-send-email-reshma.pattan@intel.com>",
        "References": "<1536251222-17275-1-git-send-email-reshma.pattan@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 15/15] net/softnic: add parsing for raw flow\n\titem",
        "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": "Added support for parsing raw flow item.\nflow_item_raw_preprocess() is added for the same.\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\nSigned-off-by: Reshma Pattan <reshma.pattan@intel.com>\n---\n drivers/net/softnic/rte_eth_softnic_flow.c | 108 +++++++++++++++++++++++++++++\n 1 file changed, 108 insertions(+)",
    "diff": "diff --git a/drivers/net/softnic/rte_eth_softnic_flow.c b/drivers/net/softnic/rte_eth_softnic_flow.c\nindex bdf1d4091..fc7a0b02a 100644\n--- a/drivers/net/softnic/rte_eth_softnic_flow.c\n+++ b/drivers/net/softnic/rte_eth_softnic_flow.c\n@@ -297,6 +297,106 @@ flow_item_is_proto(enum rte_flow_item_type type,\n \t}\n }\n \n+static int\n+flow_item_raw_preprocess(const struct rte_flow_item *item,\n+\tunion flow_item *item_spec,\n+\tunion flow_item *item_mask,\n+\tsize_t *item_size,\n+\tint *item_disabled,\n+\tstruct rte_flow_error *error)\n+{\n+\tconst struct rte_flow_item_raw *item_raw_spec = item->spec;\n+\tconst struct rte_flow_item_raw *item_raw_mask = item->mask;\n+\tconst uint8_t *pattern;\n+\tconst uint8_t *pattern_mask;\n+\tuint8_t *spec = (uint8_t *)item_spec;\n+\tuint8_t *mask = (uint8_t *)item_mask;\n+\tsize_t pattern_length, pattern_offset, i;\n+\tint disabled;\n+\n+\tif (!item->spec)\n+\t\treturn rte_flow_error_set(error,\n+\t\t\tENOTSUP,\n+\t\t\tRTE_FLOW_ERROR_TYPE_ITEM,\n+\t\t\titem,\n+\t\t\t\"RAW: Null specification\");\n+\n+\tif (item->last)\n+\t\treturn rte_flow_error_set(error,\n+\t\t\tENOTSUP,\n+\t\t\tRTE_FLOW_ERROR_TYPE_ITEM,\n+\t\t\titem,\n+\t\t\t\"RAW: Range not allowed (last must be NULL)\");\n+\n+\tif (item_raw_spec->relative == 0)\n+\t\treturn rte_flow_error_set(error,\n+\t\t\tENOTSUP,\n+\t\t\tRTE_FLOW_ERROR_TYPE_ITEM,\n+\t\t\titem,\n+\t\t\t\"RAW: Absolute offset not supported\");\n+\n+\tif (item_raw_spec->search)\n+\t\treturn rte_flow_error_set(error,\n+\t\t\tENOTSUP,\n+\t\t\tRTE_FLOW_ERROR_TYPE_ITEM,\n+\t\t\titem,\n+\t\t\t\"RAW: Search not supported\");\n+\n+\tif (item_raw_spec->offset < 0)\n+\t\treturn rte_flow_error_set(error,\n+\t\t\tENOTSUP, RTE_FLOW_ERROR_TYPE_ITEM,\n+\t\t\titem,\n+\t\t\t\"RAW: Negative offset not supported\");\n+\n+\tif (item_raw_spec->length == 0)\n+\t\treturn rte_flow_error_set(error,\n+\t\t\tENOTSUP,\n+\t\t\tRTE_FLOW_ERROR_TYPE_ITEM,\n+\t\t\titem,\n+\t\t\t\"RAW: Zero pattern length\");\n+\n+\tif (item_raw_spec->offset + item_raw_spec->length >\n+\t\tTABLE_RULE_MATCH_SIZE_MAX)\n+\t\treturn rte_flow_error_set(error,\n+\t\t\tENOTSUP,\n+\t\t\tRTE_FLOW_ERROR_TYPE_ITEM,\n+\t\t\titem,\n+\t\t\t\"RAW: Item too big\");\n+\n+\tif (!item_raw_spec->pattern && item_raw_mask && item_raw_mask->pattern)\n+\t\treturn rte_flow_error_set(error,\n+\t\t\tENOTSUP,\n+\t\t\tRTE_FLOW_ERROR_TYPE_ITEM,\n+\t\t\titem,\n+\t\t\t\"RAW: Non-NULL pattern mask not allowed with NULL pattern\");\n+\n+\tpattern = item_raw_spec->pattern;\n+\tpattern_mask = (item_raw_mask) ? item_raw_mask->pattern : NULL;\n+\tpattern_length = (size_t)item_raw_spec->length;\n+\tpattern_offset = (size_t)item_raw_spec->offset;\n+\n+\tdisabled = 0;\n+\tif (pattern_mask == NULL)\n+\t\tdisabled = 1;\n+\telse\n+\t\tfor (i = 0; i < pattern_length; i++)\n+\t\t\tif ((pattern)[i])\n+\t\t\t\tdisabled = 1;\n+\n+\tmemset(spec, 0, TABLE_RULE_MATCH_SIZE_MAX);\n+\tif (pattern)\n+\t\tmemcpy(&spec[pattern_offset], pattern, pattern_length);\n+\n+\tmemset(mask, 0, TABLE_RULE_MATCH_SIZE_MAX);\n+\tif (pattern_mask)\n+\t\tmemcpy(&mask[pattern_offset], pattern_mask, pattern_length);\n+\n+\t*item_size = pattern_offset + pattern_length;\n+\t*item_disabled = disabled;\n+\n+\treturn 0;\n+}\n+\n static int\n flow_item_proto_preprocess(const struct rte_flow_item *item,\n \tunion flow_item *item_spec,\n@@ -317,6 +417,14 @@ flow_item_proto_preprocess(const struct rte_flow_item *item,\n \t\t\titem,\n \t\t\t\"Item type not supported\");\n \n+\tif (item->type == RTE_FLOW_ITEM_TYPE_RAW)\n+\t\treturn flow_item_raw_preprocess(item,\n+\t\t\titem_spec,\n+\t\t\titem_mask,\n+\t\t\titem_size,\n+\t\t\titem_disabled,\n+\t\t\terror);\n+\n \t/* spec */\n \tif (!item->spec) {\n \t\t/* If spec is NULL, then last and mask also have to be NULL. */\n",
    "prefixes": [
        "v2",
        "15/15"
    ]
}