get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 8010,
    "url": "https://patches.dpdk.org/api/patches/8010/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1445837254-6188-5-git-send-email-wenzhuo.lu@intel.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<1445837254-6188-5-git-send-email-wenzhuo.lu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1445837254-6188-5-git-send-email-wenzhuo.lu@intel.com",
    "date": "2015-10-26T05:27:31",
    "name": "[dpdk-dev,v5,4/7] app/testpmd: modify the output of the CLI show port fdir",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "d3d16ca81105c7eec9e718d9efd2e67003af29c8",
    "submitter": {
        "id": 258,
        "url": "https://patches.dpdk.org/api/people/258/?format=api",
        "name": "Wenzhuo Lu",
        "email": "wenzhuo.lu@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1445837254-6188-5-git-send-email-wenzhuo.lu@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/8010/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/8010/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 088645A71;\n\tMon, 26 Oct 2015 06:27:56 +0100 (CET)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 783648D9C\n\tfor <dev@dpdk.org>; Mon, 26 Oct 2015 06:27:52 +0100 (CET)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby orsmga102.jf.intel.com with ESMTP; 25 Oct 2015 22:27:52 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga002.fm.intel.com with ESMTP; 25 Oct 2015 22:27:51 -0700",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t9Q5RnFM031222;\n\tMon, 26 Oct 2015 13:27:49 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid t9Q5Rjxl006251; Mon, 26 Oct 2015 13:27:47 +0800",
            "(from wenzhuol@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t9Q5RjGe006247; \n\tMon, 26 Oct 2015 13:27:45 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.20,200,1444719600\"; d=\"scan'208\";a=\"835395704\"",
        "From": "Wenzhuo Lu <wenzhuo.lu@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Mon, 26 Oct 2015 13:27:31 +0800",
        "Message-Id": "<1445837254-6188-5-git-send-email-wenzhuo.lu@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1445837254-6188-1-git-send-email-wenzhuo.lu@intel.com>",
        "References": "<1443161125-1035-1-git-send-email-wenzhuo.lu@intel.com>\n\t<1445837254-6188-1-git-send-email-wenzhuo.lu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v5 4/7] app/testpmd: modify the output of the CLI\n\tshow port fdir",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "There're fdir mask and supported flow type in the output of the CLI,\nshow port fdir. But not every parameter has meaning for all the fdir\nmodes, and the supported flow type is meaningless for mac vlan and\ntunnel modes. So, we output different thing for different mode.\n\nSigned-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>\n---\n app/test-pmd/config.c | 45 +++++++++++++++++++++++++++++++--------------\n 1 file changed, 31 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex cf2aa6e..1ec6a77 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -1829,18 +1829,28 @@ set_qmap(portid_t port_id, uint8_t is_rx, uint16_t queue_id, uint8_t map_value)\n static inline void\n print_fdir_mask(struct rte_eth_fdir_masks *mask)\n {\n-\tprintf(\"\\n    vlan_tci: 0x%04x, src_ipv4: 0x%08x, dst_ipv4: 0x%08x,\"\n-\t\t      \" src_port: 0x%04x, dst_port: 0x%04x\",\n-\t\tmask->vlan_tci_mask, mask->ipv4_mask.src_ip,\n-\t\tmask->ipv4_mask.dst_ip,\n-\t\tmask->src_port_mask, mask->dst_port_mask);\n-\n-\tprintf(\"\\n    src_ipv6: 0x%08x,0x%08x,0x%08x,0x%08x,\"\n-\t\t     \" dst_ipv6: 0x%08x,0x%08x,0x%08x,0x%08x\",\n-\t\tmask->ipv6_mask.src_ip[0], mask->ipv6_mask.src_ip[1],\n-\t\tmask->ipv6_mask.src_ip[2], mask->ipv6_mask.src_ip[3],\n-\t\tmask->ipv6_mask.dst_ip[0], mask->ipv6_mask.dst_ip[1],\n-\t\tmask->ipv6_mask.dst_ip[2], mask->ipv6_mask.dst_ip[3]);\n+\tprintf(\"\\n    vlan_tci: 0x%04x, \", mask->vlan_tci_mask);\n+\n+\tif (fdir_conf.mode == RTE_FDIR_MODE_PERFECT_MAC_VLAN)\n+\t\tprintf(\"mac_addr: 0x%02x\", mask->mac_addr_byte_mask);\n+\telse if (fdir_conf.mode == RTE_FDIR_MODE_PERFECT_TUNNEL)\n+\t\tprintf(\"mac_addr: 0x%02x, tunnel_type: 0x%01x, tunnel_id: 0x%08x\",\n+\t\t\tmask->mac_addr_byte_mask, mask->tunnel_type_mask,\n+\t\t\tmask->tunnel_id_mask);\n+\telse {\n+\t\tprintf(\"src_ipv4: 0x%08x, dst_ipv4: 0x%08x,\"\n+\t\t\t\" src_port: 0x%04x, dst_port: 0x%04x\",\n+\t\t\tmask->ipv4_mask.src_ip, mask->ipv4_mask.dst_ip,\n+\t\t\tmask->src_port_mask, mask->dst_port_mask);\n+\n+\t\tprintf(\"\\n    src_ipv6: 0x%08x,0x%08x,0x%08x,0x%08x,\"\n+\t\t\t\" dst_ipv6: 0x%08x,0x%08x,0x%08x,0x%08x\",\n+\t\t\tmask->ipv6_mask.src_ip[0], mask->ipv6_mask.src_ip[1],\n+\t\t\tmask->ipv6_mask.src_ip[2], mask->ipv6_mask.src_ip[3],\n+\t\t\tmask->ipv6_mask.dst_ip[0], mask->ipv6_mask.dst_ip[1],\n+\t\t\tmask->ipv6_mask.dst_ip[2], mask->ipv6_mask.dst_ip[3]);\n+\t}\n+\n \tprintf(\"\\n\");\n }\n \n@@ -1966,12 +1976,19 @@ fdir_get_infos(portid_t port_id)\n \tprintf(\"  MODE: \");\n \tif (fdir_info.mode == RTE_FDIR_MODE_PERFECT)\n \t\tprintf(\"  PERFECT\\n\");\n+\telse if (fdir_info.mode == RTE_FDIR_MODE_PERFECT_MAC_VLAN)\n+\t\tprintf(\"  PERFECT-MAC-VLAN\\n\");\n+\telse if (fdir_info.mode == RTE_FDIR_MODE_PERFECT_TUNNEL)\n+\t\tprintf(\"  PERFECT-TUNNEL\\n\");\n \telse if (fdir_info.mode == RTE_FDIR_MODE_SIGNATURE)\n \t\tprintf(\"  SIGNATURE\\n\");\n \telse\n \t\tprintf(\"  DISABLE\\n\");\n-\tprintf(\"  SUPPORTED FLOW TYPE: \");\n-\tprint_fdir_flow_type(fdir_info.flow_types_mask[0]);\n+\tif (fdir_info.mode != RTE_FDIR_MODE_PERFECT_MAC_VLAN\n+\t\t&& fdir_info.mode != RTE_FDIR_MODE_PERFECT_TUNNEL) {\n+\t\tprintf(\"  SUPPORTED FLOW TYPE: \");\n+\t\tprint_fdir_flow_type(fdir_info.flow_types_mask[0]);\n+\t}\n \tprintf(\"  FLEX PAYLOAD INFO:\\n\");\n \tprintf(\"  max_len:       %-10\"PRIu32\"  payload_limit: %-10\"PRIu32\"\\n\"\n \t       \"  payload_unit:  %-10\"PRIu32\"  payload_seg:   %-10\"PRIu32\"\\n\"\n",
    "prefixes": [
        "dpdk-dev",
        "v5",
        "4/7"
    ]
}