get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 7242,
    "url": "https://patches.dpdk.org/api/patches/7242/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1443504682-17752-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": "<1443504682-17752-5-git-send-email-wenzhuo.lu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1443504682-17752-5-git-send-email-wenzhuo.lu@intel.com",
    "date": "2015-09-29T05:31:20",
    "name": "[dpdk-dev,v2,4/6] app/testpmd: modify the output of the CLI show port fdir",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "68b1ad923b76e31751ab5518233af6988356705e",
    "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/1443504682-17752-5-git-send-email-wenzhuo.lu@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/7242/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/7242/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 DEB5B7E23;\n\tTue, 29 Sep 2015 07:31:56 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 7315D7E23\n\tfor <dev@dpdk.org>; Tue, 29 Sep 2015 07:31:55 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga103.jf.intel.com with ESMTP; 28 Sep 2015 22:31:54 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby FMSMGA003.fm.intel.com with ESMTP; 28 Sep 2015 22:31:53 -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 t8T5Vpa7019507;\n\tTue, 29 Sep 2015 13:31:51 +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 t8T5VmcB017815; Tue, 29 Sep 2015 13:31:50 +0800",
            "(from wenzhuol@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t8T5Vlrb017811; \n\tTue, 29 Sep 2015 13:31:48 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.17,606,1437462000\"; d=\"scan'208\";a=\"570279661\"",
        "From": "Wenzhuo Lu <wenzhuo.lu@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue, 29 Sep 2015 13:31:20 +0800",
        "Message-Id": "<1443504682-17752-5-git-send-email-wenzhuo.lu@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1443504682-17752-1-git-send-email-wenzhuo.lu@intel.com>",
        "References": "<1443161125-1035-1-git-send-email-wenzhuo.lu@intel.com>\n\t<1443504682-17752-1-git-send-email-wenzhuo.lu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 4/6] 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 | 44 ++++++++++++++++++++++++++++++--------------\n 1 file changed, 30 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex cf2aa6e..bc70ec4 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -1829,18 +1829,27 @@ 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_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\tmask->mac_addr_mask, mask->tunnel_type_mask,mask->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 +1975,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",
        "v2",
        "4/6"
    ]
}