get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2448,
    "url": "https://patches.dpdk.org/api/patches/2448/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1421883395-27235-10-git-send-email-olivier.matz@6wind.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": "<1421883395-27235-10-git-send-email-olivier.matz@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1421883395-27235-10-git-send-email-olivier.matz@6wind.com",
    "date": "2015-01-21T23:36:28",
    "name": "[dpdk-dev,RFC,09/16] testpmd: move csum_show in a function",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "9bb4a1205f30c188dcbc084cf42ac66d1b1473b6",
    "submitter": {
        "id": 8,
        "url": "https://patches.dpdk.org/api/people/8/?format=api",
        "name": "Olivier Matz",
        "email": "olivier.matz@6wind.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1421883395-27235-10-git-send-email-olivier.matz@6wind.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/2448/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/2448/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 3513A5ABC;\n\tThu, 22 Jan 2015 00:37:04 +0100 (CET)",
            "from mail-we0-f173.google.com (mail-we0-f173.google.com\n\t[74.125.82.173]) by dpdk.org (Postfix) with ESMTP id 60ABF5AAE\n\tfor <dev@dpdk.org>; Thu, 22 Jan 2015 00:36:55 +0100 (CET)",
            "by mail-we0-f173.google.com with SMTP id w62so5532359wes.4\n\tfor <dev@dpdk.org>; Wed, 21 Jan 2015 15:36:55 -0800 (PST)",
            "from glumotte.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net.\n\t[82.239.227.177]) by mx.google.com with ESMTPSA id\n\twa5sm1710761wjc.8.2015.01.21.15.36.54\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 21 Jan 2015 15:36:54 -0800 (PST)"
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=JjuYZ47iNmKm8NYS6PxaPModcNp6KBzSt2SLR1YajJU=;\n\tb=DY16RUvwxfSIVGV0YsLhqzZ8avafU2vD1D0ruSZGrs5ISixpKpIKBtGDulxeDL6MtG\n\tII0PfsNkZ5MHh1XWMZ9k/0ywAs6Xalz4PKVNH1+6oPQlNvYrfLyhmbybgrQZhfsIVFRK\n\tftkvgeGMrPL/BXHCRxxP/cmnysejv7TT7Q/UxvVBYZPUPqoeCoK8XVA/9uLR3XBTTPNV\n\tIyEBIlmiC7NDHfOCXbPZGNrIKwWb9I1zZcu5tuoTZjsuYEtzJ2ZCrdAse68DWxxeUgEi\n\tBtvzfqv9nx/IF+HAqwFQ82jfBRDpHdcRlWelVmpviAE1Uskp6FEn2PIeelPhyM7SsF8C\n\tmxig==",
        "X-Gm-Message-State": "ALoCoQmrXB8nSKyGWUP0Uyd2w2s0lO+u9xW4HdTgKNaXWLyo+Q0af3Wp5ZdUMaQQJTeSwkOo7AyI",
        "X-Received": "by 10.194.81.104 with SMTP id z8mr87016252wjx.45.1421883415254; \n\tWed, 21 Jan 2015 15:36:55 -0800 (PST)",
        "From": "Olivier Matz <olivier.matz@6wind.com>",
        "To": "dev@dpdk.org",
        "Date": "Thu, 22 Jan 2015 00:36:28 +0100",
        "Message-Id": "<1421883395-27235-10-git-send-email-olivier.matz@6wind.com>",
        "X-Mailer": "git-send-email 2.1.3",
        "In-Reply-To": "<1421883395-27235-1-git-send-email-olivier.matz@6wind.com>",
        "References": "<1421883395-27235-1-git-send-email-olivier.matz@6wind.com>",
        "Subject": "[dpdk-dev] [RFC 09/16] testpmd: move csum_show in a function",
        "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": "No functional changes in this commit, we just move the code\nthat displays the csum forward engine configuration in a\nfunction.\n\nThis makes the next commit easier to read as it will also\nuse this function.\n\nSigned-off-by: Olivier Matz <olivier.matz@6wind.com>\n---\n app/test-pmd/cmdline.c | 82 +++++++++++++++++++++++++++-----------------------\n 1 file changed, 45 insertions(+), 37 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 1aecbbb..260a273 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -2867,14 +2867,56 @@ struct cmd_csum_result {\n };\n \n static void\n+csum_show(int port_id)\n+{\n+\tstruct rte_eth_dev_info dev_info;\n+\tuint16_t ol_flags;\n+\n+\tol_flags = ports[port_id].tx_ol_flags;\n+\tprintf(\"IP checksum offload is %s\\n\",\n+\t\t(ol_flags & TESTPMD_TX_OFFLOAD_IP_CKSUM) ? \"hw\" : \"sw\");\n+\tprintf(\"UDP checksum offload is %s\\n\",\n+\t\t(ol_flags & TESTPMD_TX_OFFLOAD_UDP_CKSUM) ? \"hw\" : \"sw\");\n+\tprintf(\"TCP checksum offload is %s\\n\",\n+\t\t(ol_flags & TESTPMD_TX_OFFLOAD_TCP_CKSUM) ? \"hw\" : \"sw\");\n+\tprintf(\"SCTP checksum offload is %s\\n\",\n+\t\t(ol_flags & TESTPMD_TX_OFFLOAD_SCTP_CKSUM) ? \"hw\" : \"sw\");\n+\tprintf(\"VxLAN checksum offload is %s\\n\",\n+\t\t(ol_flags & TESTPMD_TX_OFFLOAD_VXLAN_CKSUM) ? \"hw\" : \"sw\");\n+\n+\t/* display warnings if configuration is not supported by the NIC */\n+\trte_eth_dev_info_get(port_id, &dev_info);\n+\tif ((ol_flags & TESTPMD_TX_OFFLOAD_IP_CKSUM) &&\n+\t\t(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_IPV4_CKSUM) == 0) {\n+\t\tprintf(\"Warning: hardware IP checksum enabled but not \"\n+\t\t\t\"supported by port %d\\n\", port_id);\n+\t}\n+\tif ((ol_flags & TESTPMD_TX_OFFLOAD_UDP_CKSUM) &&\n+\t\t(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_UDP_CKSUM) == 0) {\n+\t\tprintf(\"Warning: hardware UDP checksum enabled but not \"\n+\t\t\t\"supported by port %d\\n\", port_id);\n+\t}\n+\tif ((ol_flags & TESTPMD_TX_OFFLOAD_TCP_CKSUM) &&\n+\t\t(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_TCP_CKSUM) == 0) {\n+\t\tprintf(\"Warning: hardware TCP checksum enabled but not \"\n+\t\t\t\"supported by port %d\\n\", port_id);\n+\t}\n+\tif ((ol_flags & TESTPMD_TX_OFFLOAD_SCTP_CKSUM) &&\n+\t\t(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_SCTP_CKSUM) == 0) {\n+\t\tprintf(\"Warning: hardware SCTP checksum enabled but not \"\n+\t\t\t\"supported by port %d\\n\", port_id);\n+\t}\n+\n+}\n+\n+static void\n cmd_csum_parsed(void *parsed_result,\n \t\t       __attribute__((unused)) struct cmdline *cl,\n \t\t       __attribute__((unused)) void *data)\n {\n \tstruct cmd_csum_result *res = parsed_result;\n \tint hw = 0;\n-\tuint16_t ol_flags, mask = 0;\n-\tstruct rte_eth_dev_info dev_info;\n+\tuint16_t mask = 0;\n \n \tif (port_id_is_invalid(res->port_id)) {\n \t\tprintf(\"invalid port %d\\n\", res->port_id);\n@@ -2903,41 +2945,7 @@ cmd_csum_parsed(void *parsed_result,\n \t\telse\n \t\t\tports[res->port_id].tx_ol_flags &= (~mask);\n \t}\n-\n-\tol_flags = ports[res->port_id].tx_ol_flags;\n-\tprintf(\"IP checksum offload is %s\\n\",\n-\t\t(ol_flags & TESTPMD_TX_OFFLOAD_IP_CKSUM) ? \"hw\" : \"sw\");\n-\tprintf(\"UDP checksum offload is %s\\n\",\n-\t\t(ol_flags & TESTPMD_TX_OFFLOAD_UDP_CKSUM) ? \"hw\" : \"sw\");\n-\tprintf(\"TCP checksum offload is %s\\n\",\n-\t\t(ol_flags & TESTPMD_TX_OFFLOAD_TCP_CKSUM) ? \"hw\" : \"sw\");\n-\tprintf(\"SCTP checksum offload is %s\\n\",\n-\t\t(ol_flags & TESTPMD_TX_OFFLOAD_SCTP_CKSUM) ? \"hw\" : \"sw\");\n-\tprintf(\"VxLAN checksum offload is %s\\n\",\n-\t\t(ol_flags & TESTPMD_TX_OFFLOAD_VXLAN_CKSUM) ? \"hw\" : \"sw\");\n-\n-\t/* display warnings if configuration is not supported by the NIC */\n-\trte_eth_dev_info_get(res->port_id, &dev_info);\n-\tif ((ol_flags & TESTPMD_TX_OFFLOAD_IP_CKSUM) &&\n-\t\t(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_IPV4_CKSUM) == 0) {\n-\t\tprintf(\"Warning: hardware IP checksum enabled but not \"\n-\t\t\t\"supported by port %d\\n\", res->port_id);\n-\t}\n-\tif ((ol_flags & TESTPMD_TX_OFFLOAD_UDP_CKSUM) &&\n-\t\t(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_UDP_CKSUM) == 0) {\n-\t\tprintf(\"Warning: hardware UDP checksum enabled but not \"\n-\t\t\t\"supported by port %d\\n\", res->port_id);\n-\t}\n-\tif ((ol_flags & TESTPMD_TX_OFFLOAD_TCP_CKSUM) &&\n-\t\t(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_TCP_CKSUM) == 0) {\n-\t\tprintf(\"Warning: hardware TCP checksum enabled but not \"\n-\t\t\t\"supported by port %d\\n\", res->port_id);\n-\t}\n-\tif ((ol_flags & TESTPMD_TX_OFFLOAD_SCTP_CKSUM) &&\n-\t\t(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_SCTP_CKSUM) == 0) {\n-\t\tprintf(\"Warning: hardware SCTP checksum enabled but not \"\n-\t\t\t\"supported by port %d\\n\", res->port_id);\n-\t}\n+\tcsum_show(res->port_id);\n }\n \n cmdline_parse_token_string_t cmd_csum_csum =\n",
    "prefixes": [
        "dpdk-dev",
        "RFC",
        "09/16"
    ]
}