get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 67716,
    "url": "http://patches.dpdk.org/api/patches/67716/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200403024353.24681-9-wei.zhao1@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": "<20200403024353.24681-9-wei.zhao1@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200403024353.24681-9-wei.zhao1@intel.com",
    "date": "2020-04-03T02:43:48",
    "name": "[v3,08/13] net/ice: add support for PFCP",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "543d2925fa1d9e440a101f3bde7d2aaaa569d8e1",
    "submitter": {
        "id": 495,
        "url": "http://patches.dpdk.org/api/people/495/?format=api",
        "name": "Zhao1, Wei",
        "email": "wei.zhao1@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200403024353.24681-9-wei.zhao1@intel.com/mbox/",
    "series": [
        {
            "id": 9180,
            "url": "http://patches.dpdk.org/api/series/9180/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=9180",
            "date": "2020-04-03T02:43:40",
            "name": "add switch filter support for intel DCF",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/9180/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/67716/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/67716/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 8D9FCA0562;\n\tFri,  3 Apr 2020 05:06:21 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A95B11C11C;\n\tFri,  3 Apr 2020 05:05:21 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by dpdk.org (Postfix) with ESMTP id 45A3A1C116\n for <dev@dpdk.org>; Fri,  3 Apr 2020 05:05:20 +0200 (CEST)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 02 Apr 2020 20:05:19 -0700",
            "from unknown (HELO localhost.localdomain.bj.intel.com)\n ([172.16.182.123])\n by orsmga003.jf.intel.com with ESMTP; 02 Apr 2020 20:05:18 -0700"
        ],
        "IronPort-SDR": [
            "\n lIcEY/QMfD3cFjIxGRDfjXtS1xZ6Wmzfqr4ZgJCC+9kuJgbNvQrQP6uDu178q4AJgEoHqrNUhp\n rKY0AYrz2Qdg==",
            "\n i9tqY9x8qEdpqeQuvh5NsKskmbqSqL3nm07lTfUTeYLGAmqMia3qMPCo6SBhSQ0VCn5NY1X9gr\n S1Q7AH3qxDSQ=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.72,337,1580803200\"; d=\"scan'208\";a=\"250034474\"",
        "From": "Wei Zhao <wei.zhao1@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "qi.z.zhang@intel.com, nannan.lu@intel.com, qi.fu@intel.com,\n yuan.peng@intel.com, Wei Zhao <wei.zhao1@intel.com>",
        "Date": "Fri,  3 Apr 2020 10:43:48 +0800",
        "Message-Id": "<20200403024353.24681-9-wei.zhao1@intel.com>",
        "X-Mailer": "git-send-email 2.19.1",
        "In-Reply-To": "<20200403024353.24681-1-wei.zhao1@intel.com>",
        "References": "<20200402064620.47668-1-wei.zhao1@intel.com>\n <20200403024353.24681-1-wei.zhao1@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3 08/13] net/ice: add support for PFCP",
        "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": "This patch add switch filter support for PFCP packets,\nit enable swicth filter to direct ipv4/ipv6 packets with\nPFCP session or node payload to specific action.\n\nSigned-off-by: Wei Zhao <wei.zhao1@intel.com>\n---\n drivers/net/ice/ice_generic_flow.c  | 15 +++++++\n drivers/net/ice/ice_generic_flow.h  |  6 +++\n drivers/net/ice/ice_switch_filter.c | 62 +++++++++++++++++++++++++++++\n 3 files changed, 83 insertions(+)",
    "diff": "diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c\nindex 189ef6c4a..04dcaba08 100644\n--- a/drivers/net/ice/ice_generic_flow.c\n+++ b/drivers/net/ice/ice_generic_flow.c\n@@ -1400,6 +1400,21 @@ enum rte_flow_item_type pattern_eth_ipv6_l2tp[] = {\n \tRTE_FLOW_ITEM_TYPE_L2TPV3OIP,\n \tRTE_FLOW_ITEM_TYPE_END,\n };\n+enum rte_flow_item_type pattern_eth_ipv4_pfcp[] = {\n+\tRTE_FLOW_ITEM_TYPE_ETH,\n+\tRTE_FLOW_ITEM_TYPE_IPV4,\n+\tRTE_FLOW_ITEM_TYPE_UDP,\n+\tRTE_FLOW_ITEM_TYPE_PFCP,\n+\tRTE_FLOW_ITEM_TYPE_END,\n+};\n+enum rte_flow_item_type pattern_eth_ipv6_pfcp[] = {\n+\tRTE_FLOW_ITEM_TYPE_ETH,\n+\tRTE_FLOW_ITEM_TYPE_IPV6,\n+\tRTE_FLOW_ITEM_TYPE_UDP,\n+\tRTE_FLOW_ITEM_TYPE_PFCP,\n+\tRTE_FLOW_ITEM_TYPE_END,\n+};\n+\n \n \n typedef struct ice_flow_engine * (*parse_engine_t)(struct ice_adapter *ad,\ndiff --git a/drivers/net/ice/ice_generic_flow.h b/drivers/net/ice/ice_generic_flow.h\nindex 006fd00b3..65cd64c7f 100644\n--- a/drivers/net/ice/ice_generic_flow.h\n+++ b/drivers/net/ice/ice_generic_flow.h\n@@ -400,6 +400,12 @@ extern enum rte_flow_item_type pattern_eth_ipv6_ah[];\n /* L2TP */\n extern enum rte_flow_item_type pattern_eth_ipv6_l2tp[];\n \n+/* PFCP */\n+extern enum rte_flow_item_type pattern_eth_ipv4_pfcp[];\n+extern enum rte_flow_item_type pattern_eth_ipv6_pfcp[];\n+\n+\n+\n struct ice_adapter;\n \n extern const struct rte_flow_ops ice_flow_ops;\ndiff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c\nindex 9c87a16dd..9b4b9346c 100644\n--- a/drivers/net/ice/ice_switch_filter.c\n+++ b/drivers/net/ice/ice_switch_filter.c\n@@ -154,6 +154,10 @@ ice_pattern_match_item ice_switch_pattern_dist_comms[] = {\n \t\t\tICE_INSET_NONE, ICE_INSET_NONE},\n \t{pattern_eth_ipv6_l2tp,\n \t\t\tICE_INSET_NONE, ICE_INSET_NONE},\n+\t{pattern_eth_ipv4_pfcp,\n+\t\t\tICE_INSET_NONE, ICE_INSET_NONE},\n+\t{pattern_eth_ipv6_pfcp,\n+\t\t\tICE_INSET_NONE, ICE_INSET_NONE},\n };\n \n static struct\n@@ -224,6 +228,10 @@ ice_pattern_match_item ice_switch_pattern_perm[] = {\n \t\t\tICE_INSET_NONE, ICE_INSET_NONE},\n \t{pattern_eth_ipv6_l2tp,\n \t\t\tICE_INSET_NONE, ICE_INSET_NONE},\n+\t{pattern_eth_ipv4_pfcp,\n+\t\t\tICE_INSET_NONE, ICE_INSET_NONE},\n+\t{pattern_eth_ipv6_pfcp,\n+\t\t\tICE_INSET_NONE, ICE_INSET_NONE},\n };\n \n static int\n@@ -350,6 +358,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],\n \tconst struct rte_flow_item_esp *esp_spec, *esp_mask;\n \tconst struct rte_flow_item_ah *ah_spec, *ah_mask;\n \tconst struct rte_flow_item_l2tpv3oip *l2tp_spec, *l2tp_mask;\n+\tconst struct rte_flow_item_pfcp *pfcp_spec, *pfcp_mask;\n \tuint64_t input_set = ICE_INSET_NONE;\n \tuint16_t j, t = 0;\n \tuint16_t tunnel_valid = 0;\n@@ -996,6 +1005,55 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],\n \t\t\tif (ipv6_valiad)\n \t\t\t\t*tun_type = ICE_SW_TUN_PROFID_MAC_IPV6_L2TPV3;\n \t\t\tbreak;\n+\t\tcase RTE_FLOW_ITEM_TYPE_PFCP:\n+\t\t\tpfcp_spec = item->spec;\n+\t\t\tpfcp_mask = item->mask;\n+\t\t\t/* Check if PFCP item is used to describe protocol.\n+\t\t\t * If yes, both spec and mask should be NULL.\n+\t\t\t * If no, both spec and mask shouldn't be NULL.\n+\t\t\t */\n+\t\t\tif ((!pfcp_spec && pfcp_mask) ||\n+\t\t\t    (pfcp_spec && !pfcp_mask)) {\n+\t\t\t\trte_flow_error_set(error, EINVAL,\n+\t\t\t\t\t   RTE_FLOW_ERROR_TYPE_ITEM,\n+\t\t\t\t\t   item,\n+\t\t\t\t\t   \"Invalid PFCP item\");\n+\t\t\t\treturn -ENOTSUP;\n+\t\t\t}\n+\t\t\tif (pfcp_spec && pfcp_mask) {\n+\t\t\t\t/* Check pfcp mask and update input set */\n+\t\t\t\tif (pfcp_mask->msg_type ||\n+\t\t\t\t\tpfcp_mask->msg_len ||\n+\t\t\t\t\tpfcp_mask->seid) {\n+\t\t\t\t\trte_flow_error_set(error, EINVAL,\n+\t\t\t\t\t\tRTE_FLOW_ERROR_TYPE_ITEM,\n+\t\t\t\t\t\titem,\n+\t\t\t\t\t\t\"Invalid pfcp mask\");\n+\t\t\t\t\treturn -ENOTSUP;\n+\t\t\t\t}\n+\t\t\t\tif (pfcp_mask->s_field &&\n+\t\t\t\t\tpfcp_spec->s_field == 0x01 &&\n+\t\t\t\t\tipv6_valiad)\n+\t\t\t\t\t*tun_type =\n+\t\t\t\t\tICE_SW_TUN_PROFID_IPV6_PFCP_SESSION;\n+\t\t\t\telse if (pfcp_mask->s_field &&\n+\t\t\t\t\tpfcp_spec->s_field == 0x01)\n+\t\t\t\t\t*tun_type =\n+\t\t\t\t\tICE_SW_TUN_PROFID_IPV4_PFCP_SESSION;\n+\t\t\t\telse if (pfcp_mask->s_field &&\n+\t\t\t\t\t!pfcp_spec->s_field &&\n+\t\t\t\t\tipv6_valiad)\n+\t\t\t\t\t*tun_type =\n+\t\t\t\t\tICE_SW_TUN_PROFID_IPV6_PFCP_NODE;\n+\t\t\t\telse if (pfcp_mask->s_field &&\n+\t\t\t\t\t!pfcp_spec->s_field)\n+\t\t\t\t\t*tun_type =\n+\t\t\t\t\tICE_SW_TUN_PROFID_IPV4_PFCP_NODE;\n+\t\t\t\telse\n+\t\t\t\t\treturn -ENOTSUP;\n+\t\t\t}\n+\t\t\tbreak;\n+\n \n \t\tcase RTE_FLOW_ITEM_TYPE_VOID:\n \t\t\tbreak;\n@@ -1179,6 +1237,10 @@ ice_is_profile_rule(enum ice_sw_tunnel_type tun_type)\n \tcase ICE_SW_TUN_PROFID_IPV6_ESP:\n \tcase ICE_SW_TUN_PROFID_IPV6_AH:\n \tcase ICE_SW_TUN_PROFID_MAC_IPV6_L2TPV3:\n+\tcase ICE_SW_TUN_PROFID_IPV4_PFCP_NODE:\n+\tcase ICE_SW_TUN_PROFID_IPV4_PFCP_SESSION:\n+\tcase ICE_SW_TUN_PROFID_IPV6_PFCP_NODE:\n+\tcase ICE_SW_TUN_PROFID_IPV6_PFCP_SESSION:\n \t\treturn true;\n \tdefault:\n \t\tbreak;\n",
    "prefixes": [
        "v3",
        "08/13"
    ]
}