get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 43568,
    "url": "http://patches.dpdk.org/api/patches/43568/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180803132032.29038-8-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": "<20180803132032.29038-8-adrien.mazarguil@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180803132032.29038-8-adrien.mazarguil@6wind.com",
    "date": "2018-08-03T13:36:45",
    "name": "[v2,7/7] ethdev: add missing item/actions to flow object converter",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "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/20180803132032.29038-8-adrien.mazarguil@6wind.com/mbox/",
    "series": [
        {
            "id": 897,
            "url": "http://patches.dpdk.org/api/series/897/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=897",
            "date": "2018-08-03T13:36:30",
            "name": "ethdev: add flow API object converter",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/897/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/43568/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/43568/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 936501B598;\n\tFri,  3 Aug 2018 15:37:05 +0200 (CEST)",
            "from mail-wr1-f66.google.com (mail-wr1-f66.google.com\n\t[209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 49E361B5A8\n\tfor <dev@dpdk.org>; Fri,  3 Aug 2018 15:37:03 +0200 (CEST)",
            "by mail-wr1-f66.google.com with SMTP id u12-v6so5462048wrr.4\n\tfor <dev@dpdk.org>; Fri, 03 Aug 2018 06:37:03 -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\ts24-v6sm4103398wmc.7.2018.08.03.06.37.02\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 03 Aug 2018 06:37:02 -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=GJTj7KKAE7e+e0BGZSX7tflsEixv/wEScqoxuW/fnzQ=;\n\tb=ETvueLcyoZ74c5pihLaomN3Wja04NfrbtPdHQJZZJMOwSKNDTV1+wZ8QvivBUd4tNc\n\tNKehlTU0HoK2aJaZO7i4WrxKoU4umkWBBFzW6B4fYE7Gdsix7jw8/tDflfKhg8Q01KfR\n\tN+GwuiCnfwz4gOyYkjhAvYPgyIwBgJ5LfOsdCiudEtCCGgH28XkOmiE76vJZgjJPwVn5\n\tR9rOuWaO9A4dTV6AI6qEaFHF1iFbN2GTzddJOWE9laDkUeMScfbvWqOc+rT2WCSFj/Jl\n\ti0SleCg0qdCimTZvdVXOMz++g0gKeP/cpYL+NvCtuzjNuZ0qbHNNbjYDLTPF5HiUwKYA\n\teJ2Q==",
        "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=GJTj7KKAE7e+e0BGZSX7tflsEixv/wEScqoxuW/fnzQ=;\n\tb=dGf77EFDHi5zo+lp09YiJoWYnnWLErXNRh5U5u4sR7zyTNWKft8IzrNUBNN+MBQeIu\n\tUtQPwSU+ogow3roDgRbk5mix6xjZdt6IDBHsA9QGiBfqc1hbNqLirI/HNpyRsu5Vmg46\n\tJkE6b8hebBL2ljRs5yq47KJF3AAKhJHJL2rABtwFovnprmDkSez+KCnxnM9vOdVzd8KM\n\tPJy+ViLLuNfVkFQ3K28bRDjlWRz2feoUh9l6AdUizKF19upHB6Bn2nsJRFrbemq7AtoU\n\tPx0S5U3WJ1eTl1YdI+SE1qfKAGb24qHLkDShxsXSUxxfxL0x276DCIYI+NtZH87JUmLH\n\t6ItA==",
        "X-Gm-Message-State": "AOUpUlGRK24v4DBrAV/jWwz7wv407AhOp0Hg3EGPEWvoXWNOxA6apSfe\n\t+TndTzEJlk5AxBnlcDUtlHZthg==",
        "X-Google-Smtp-Source": "AAOMgpfPllgnkO08tMC5oC4XFQRxgrI9dL7v16xWDF6CIkH69wiC6HWYhIGF/wr8FQpErRxpcoZlGg==",
        "X-Received": "by 2002:a5d:4210:: with SMTP id\n\tn16-v6mr2485279wrq.55.1533303423052; \n\tFri, 03 Aug 2018 06:37:03 -0700 (PDT)",
        "Date": "Fri, 3 Aug 2018 15:36:45 +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": "<20180803132032.29038-8-adrien.mazarguil@6wind.com>",
        "References": "<cover.1507193185.git.adrien.mazarguil@6wind.com>\n\t<20180803132032.29038-1-adrien.mazarguil@6wind.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=us-ascii",
        "Content-Disposition": "inline",
        "In-Reply-To": "<20180803132032.29038-1-adrien.mazarguil@6wind.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "Subject": "[dpdk-dev] [PATCH v2 7/7] ethdev: add missing item/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 5d487c108..0c84defdb 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": [
        "v2",
        "7/7"
    ]
}