get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 44072,
    "url": "http://patches.dpdk.org/api/patches/44072/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180831085337.21419-7-adrien.mazarguil@6wind.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": "<20180831085337.21419-7-adrien.mazarguil@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180831085337.21419-7-adrien.mazarguil@6wind.com",
    "date": "2018-08-31T09:01:11",
    "name": "[v3,6/7] ethdev: add missing items/actions to flow object converter",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "60baf8e2d86df7e36f92268da98979006ebc9f3e",
    "submitter": {
        "id": 165,
        "url": "http://patches.dpdk.org/api/people/165/?format=api",
        "name": "Adrien Mazarguil",
        "email": "adrien.mazarguil@6wind.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180831085337.21419-7-adrien.mazarguil@6wind.com/mbox/",
    "series": [
        {
            "id": 1123,
            "url": "http://patches.dpdk.org/api/series/1123/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1123",
            "date": "2018-08-31T09:00:57",
            "name": "ethdev: add flow API object converter",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/1123/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/44072/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/44072/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 052A64CAB;\n\tFri, 31 Aug 2018 11:01:44 +0200 (CEST)",
            "from mail-wr1-f68.google.com (mail-wr1-f68.google.com\n\t[209.85.221.68]) by dpdk.org (Postfix) with ESMTP id F1A2F4CC3\n\tfor <dev@dpdk.org>; Fri, 31 Aug 2018 11:01:27 +0200 (CEST)",
            "by mail-wr1-f68.google.com with SMTP id v16-v6so10493969wro.11\n\tfor <dev@dpdk.org>; Fri, 31 Aug 2018 02:01:27 -0700 (PDT)",
            "from 6wind.com (host.78.145.23.62.rev.coltfrance.com.\n\t[62.23.145.78]) by smtp.gmail.com with ESMTPSA id\n\td18-v6sm3268542wmb.33.2018.08.31.02.01.26\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 31 Aug 2018 02:01:27 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to;\n\tbh=YR0XOxi3xkElhTJG6YAqZX+uxOzEhP+5zkrZ5Gc67Oc=;\n\tb=OaY0CO6s1xrGp6RteyiU2VbUVxk0URLWlu3Hsxdx9zIF19rIS8iZtJRR4FnctYLyQF\n\tAbFyK+zy/y2c4p+x7KTMyWMNyzLuy+bh5e+YJKamT+iWpi36FooxIhpioxNW50mtjMNZ\n\twZ1xcL8LxqVDed/Pm7NcINS1c9dJifXQdJkz4H+OklpID4Rk1NAFiiLfMozSRgLifkFd\n\tAludEtuPPUm1Q4SOffrLc4wiKdwkLywwmDz3cwip03E7dKHLwCkZDjltt3174Cjylwlh\n\tDq45MkhbwcHLrKjIRUuIRcT1CiuCH8hPruxpt/1KpmVGiiODUCfuyeHm4IdrwG3Yolzq\n\tuTrw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to;\n\tbh=YR0XOxi3xkElhTJG6YAqZX+uxOzEhP+5zkrZ5Gc67Oc=;\n\tb=hs8/EyYqgVeu/spg5Ird5p3sqXHD7LU75MKimtGPGILoUff2OAO3IJgbdH5iQcG0rx\n\trUwyzZUORvUF26sm2DmbF6RHp2fNoi/aXWo6xj/UU2MPsz5g9cpivVW1ZaTdB9aQJCA5\n\tgYtCv8NeEToFCPVm6uGCX92oH6SGiKidSwyMU3eVXz1upiYcik3yLppvgcf1rNXGU3ZO\n\tTodJowdNlp6iMbDw3SA0FMCkJLDlLXNrDr4mCsYDMe1nmMFYGvr83QJkgqZ/h/py4QIB\n\tjy3eGeNuSANNMYubEmA+rhvNPLgQEnpYgDL00FISDB66rNWG6HXmOuCpY+R7GzgOu54r\n\tSatw==",
        "X-Gm-Message-State": "APzg51CDnr2vUV2NPTKEA+3e7yKYZDoo18tS2xmIi9EzWkUBEXYNig8q\n\tqbllA1I9NlavKrlkSQ+lVim/SA==",
        "X-Google-Smtp-Source": "ANB0VdbX4EUqLWeUKEgA54CUfLIjwec3noL1TyyFKndvPAEomLUX8eTA+Z+tgHv3mjrmQhF6L1xafw==",
        "X-Received": "by 2002:adf:c890:: with SMTP id\n\tk16-v6mr10442169wrh.6.1535706087753; \n\tFri, 31 Aug 2018 02:01:27 -0700 (PDT)",
        "Date": "Fri, 31 Aug 2018 11:01:11 +0200",
        "From": "Adrien Mazarguil <adrien.mazarguil@6wind.com>",
        "To": "Ferruh Yigit <ferruh.yigit@intel.com>",
        "Cc": "dev@dpdk.org, Declan Doherty <declan.doherty@intel.com>,\n\tNelio Laranjeiro <nelio.laranjeiro@6wind.com>",
        "Message-ID": "<20180831085337.21419-7-adrien.mazarguil@6wind.com>",
        "References": "<20180803132032.29038-1-adrien.mazarguil@6wind.com>\n\t<20180831085337.21419-1-adrien.mazarguil@6wind.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=us-ascii",
        "Content-Disposition": "inline",
        "In-Reply-To": "<20180831085337.21419-1-adrien.mazarguil@6wind.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "Subject": "[dpdk-dev] [PATCH v3 6/7] ethdev: add missing items/actions to flow\n\tobject converter",
        "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": "Several pattern items and actions were never handled by rte_flow_copy()\nbecause their descriptions were missing. rte_flow_conv() inherited this\ndeficiency.\n\nThis patch adds them and reorders others to match rte_flow.h. It doesn't\npose as a fix because so far no one has complained about it and\nrte_flow_conv() would have to be backported as well: this function is the\nonly sane approach to handle VXLAN and NVGRE encap definitions.\n\nAs a matter of fact, it's the last missing piece to finally allow testpmd\nusers to request the creation of VXLAN/NVGRE encap/decap flow rules without\ngetting rejected outright.\n\nSigned-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>\nCc: Declan Doherty <declan.doherty@intel.com>\nCc: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>\n--\nv2 changes:\n\n- Patch was not present in original series.\n---\n lib/librte_ethdev/rte_flow.c | 50 +++++++++++++++++++++++++++++++++++++--\n 1 file changed, 48 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c\nindex c3ff7e713..9c56a9734 100644\n--- a/lib/librte_ethdev/rte_flow.c\n+++ b/lib/librte_ethdev/rte_flow.c\n@@ -51,10 +51,15 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = {\n \tMK_FLOW_ITEM(TCP, sizeof(struct rte_flow_item_tcp)),\n \tMK_FLOW_ITEM(SCTP, sizeof(struct rte_flow_item_sctp)),\n \tMK_FLOW_ITEM(VXLAN, sizeof(struct rte_flow_item_vxlan)),\n-\tMK_FLOW_ITEM(MPLS, sizeof(struct rte_flow_item_mpls)),\n-\tMK_FLOW_ITEM(GRE, sizeof(struct rte_flow_item_gre)),\n \tMK_FLOW_ITEM(E_TAG, sizeof(struct rte_flow_item_e_tag)),\n \tMK_FLOW_ITEM(NVGRE, sizeof(struct rte_flow_item_nvgre)),\n+\tMK_FLOW_ITEM(MPLS, sizeof(struct rte_flow_item_mpls)),\n+\tMK_FLOW_ITEM(GRE, sizeof(struct rte_flow_item_gre)),\n+\tMK_FLOW_ITEM(FUZZY, sizeof(struct rte_flow_item_fuzzy)),\n+\tMK_FLOW_ITEM(GTP, sizeof(struct rte_flow_item_gtp)),\n+\tMK_FLOW_ITEM(GTPC, sizeof(struct rte_flow_item_gtp)),\n+\tMK_FLOW_ITEM(GTPU, sizeof(struct rte_flow_item_gtp)),\n+\tMK_FLOW_ITEM(ESP, sizeof(struct rte_flow_item_esp)),\n \tMK_FLOW_ITEM(GENEVE, sizeof(struct rte_flow_item_geneve)),\n \tMK_FLOW_ITEM(VXLAN_GPE, sizeof(struct rte_flow_item_vxlan_gpe)),\n \tMK_FLOW_ITEM(ARP_ETH_IPV4, sizeof(struct rte_flow_item_arp_eth_ipv4)),\n@@ -67,6 +72,7 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = {\n \t\t     sizeof(struct rte_flow_item_icmp6_nd_opt_sla_eth)),\n \tMK_FLOW_ITEM(ICMP6_ND_OPT_TLA_ETH,\n \t\t     sizeof(struct rte_flow_item_icmp6_nd_opt_tla_eth)),\n+\tMK_FLOW_ITEM(MARK, sizeof(struct rte_flow_item_mark)),\n };\n \n /** Generate flow_action[] entry. */\n@@ -81,6 +87,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {\n \tMK_FLOW_ACTION(END, 0),\n \tMK_FLOW_ACTION(VOID, 0),\n \tMK_FLOW_ACTION(PASSTHRU, 0),\n+\tMK_FLOW_ACTION(JUMP, sizeof(struct rte_flow_action_jump)),\n \tMK_FLOW_ACTION(MARK, sizeof(struct rte_flow_action_mark)),\n \tMK_FLOW_ACTION(FLAG, 0),\n \tMK_FLOW_ACTION(QUEUE, sizeof(struct rte_flow_action_queue)),\n@@ -91,6 +98,8 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {\n \tMK_FLOW_ACTION(VF, sizeof(struct rte_flow_action_vf)),\n \tMK_FLOW_ACTION(PHY_PORT, sizeof(struct rte_flow_action_phy_port)),\n \tMK_FLOW_ACTION(PORT_ID, sizeof(struct rte_flow_action_port_id)),\n+\tMK_FLOW_ACTION(METER, sizeof(struct rte_flow_action_meter)),\n+\tMK_FLOW_ACTION(SECURITY, sizeof(struct rte_flow_action_security)),\n \tMK_FLOW_ACTION(OF_SET_MPLS_TTL,\n \t\t       sizeof(struct rte_flow_action_of_set_mpls_ttl)),\n \tMK_FLOW_ACTION(OF_DEC_MPLS_TTL, 0),\n@@ -110,6 +119,10 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {\n \t\t       sizeof(struct rte_flow_action_of_pop_mpls)),\n \tMK_FLOW_ACTION(OF_PUSH_MPLS,\n \t\t       sizeof(struct rte_flow_action_of_push_mpls)),\n+\tMK_FLOW_ACTION(VXLAN_ENCAP, sizeof(struct rte_flow_action_vxlan_encap)),\n+\tMK_FLOW_ACTION(VXLAN_DECAP, 0),\n+\tMK_FLOW_ACTION(NVGRE_ENCAP, sizeof(struct rte_flow_action_vxlan_encap)),\n+\tMK_FLOW_ACTION(NVGRE_DECAP, 0),\n };\n \n static int\n@@ -407,11 +420,16 @@ rte_flow_conv_action_conf(void *buf, const size_t size,\n \tswitch (action->type) {\n \t\tunion {\n \t\t\tconst struct rte_flow_action_rss *rss;\n+\t\t\tconst struct rte_flow_action_vxlan_encap *vxlan_encap;\n+\t\t\tconst struct rte_flow_action_nvgre_encap *nvgre_encap;\n \t\t} src;\n \t\tunion {\n \t\t\tstruct rte_flow_action_rss *rss;\n+\t\t\tstruct rte_flow_action_vxlan_encap *vxlan_encap;\n+\t\t\tstruct rte_flow_action_nvgre_encap *nvgre_encap;\n \t\t} dst;\n \t\tsize_t tmp;\n+\t\tint ret;\n \n \tcase RTE_FLOW_ACTION_TYPE_RSS:\n \t\tsrc.rss = action->conf;\n@@ -445,6 +463,34 @@ rte_flow_conv_action_conf(void *buf, const size_t size,\n \t\t\toff += tmp;\n \t\t}\n \t\tbreak;\n+\tcase RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP:\n+\tcase RTE_FLOW_ACTION_TYPE_NVGRE_ENCAP:\n+\t\tsrc.vxlan_encap = action->conf;\n+\t\tdst.vxlan_encap = buf;\n+\t\tRTE_BUILD_BUG_ON(sizeof(*src.vxlan_encap) !=\n+\t\t\t\t sizeof(*src.nvgre_encap) ||\n+\t\t\t\t offsetof(struct rte_flow_action_vxlan_encap,\n+\t\t\t\t\t  definition) !=\n+\t\t\t\t offsetof(struct rte_flow_action_nvgre_encap,\n+\t\t\t\t\t  definition));\n+\t\toff = sizeof(*dst.vxlan_encap);\n+\t\tif (src.vxlan_encap->definition) {\n+\t\t\toff = RTE_ALIGN_CEIL\n+\t\t\t\t(off, sizeof(*dst.vxlan_encap->definition));\n+\t\t\tret = rte_flow_conv\n+\t\t\t\t(RTE_FLOW_CONV_OP_PATTERN,\n+\t\t\t\t (void *)((uintptr_t)dst.vxlan_encap + off),\n+\t\t\t\t size > off ? size - off : 0,\n+\t\t\t\t src.vxlan_encap->definition, NULL);\n+\t\t\tif (ret < 0)\n+\t\t\t\treturn 0;\n+\t\t\tif (size >= off + ret)\n+\t\t\t\tdst.vxlan_encap->definition =\n+\t\t\t\t\t(void *)((uintptr_t)dst.vxlan_encap +\n+\t\t\t\t\t\t off);\n+\t\t\toff += ret;\n+\t\t}\n+\t\tbreak;\n \tdefault:\n \t\toff = rte_flow_desc_action[action->type].size;\n \t\trte_memcpy(buf, action->conf, (size > off ? off : size));\n",
    "prefixes": [
        "v3",
        "6/7"
    ]
}