Show a patch.

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

{
    "id": 41237,
    "url": "http://patches.dpdk.org/api/patches/41237/?format=api",
    "web_url": "http://patches.dpdk.org/patch/41237/",
    "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"
    },
    "msgid": "<20180618213557.15209-4-stephen@networkplumber.org>",
    "date": "2018-06-18T21:35:57",
    "name": "[v3,3/3] examples/l3fwd: format the IP addresses for printing",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c5e4a815b59175226f683cf2ad91bc44584b1b95",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/patch/41237/mbox/",
    "series": [
        {
            "id": 157,
            "url": "http://patches.dpdk.org/api/series/157/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=157",
            "date": "2018-06-18T21:35:54",
            "name": "use RFC addresses for testing",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/157/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/41237/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/41237/checks/",
    "tags": {},
    "headers": {
        "X-Mailer": "git-send-email 2.17.1",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=hXVLGhNXkLh9gKlTFB/wMPtEhRAlYxP4FIdty6zp6Qk=;\n\tb=UFOncGlil+Z2YW5L4yH7bZdzLVksYWYZN5sEqCRUvuhIxAl00U2izVeEcqvlIba3AV\n\t7jmysZ/YRFH8KZ6mdCD2DtFTzx8c7D0gAM0h9l2eOoN1hAHF5BG9jtgdc2hQ5jjoVOzZ\n\tl6N4TjuQZGPhCYNq7b5UnlYzeXEndGsI6/JL7ugKJAqzBL0njiV4jBjXnEqvwYmAa1i+\n\tnhVqvLAEI6UlvKrbNFbCY6YMMlTz9iu92GszskJzfmpK/9BUI1AJ7rnFirBo9YeZmQ/+\n\tRRlU7TyR0FNnsuEaLFDnSbEHPHpI6Dt/pYMjYXf0cG7mykn268tdtJvVOoj1T47Sb/u2\n\tZbog==",
        "X-Mailman-Version": "2.1.15",
        "Delivered-To": "patchwork@dpdk.org",
        "X-Gm-Message-State": "APt69E3a52hukM85Jrk57heOhH7EJ28IRonTBVlq+KlWFTHLWdWxcV5c\n\t2ud90uSPXrN5PtNROU4z/Q4amHapjGA=",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Errors-To": "dev-bounces@dpdk.org",
        "References": "<20180618213557.15209-1-stephen@networkplumber.org>",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=hXVLGhNXkLh9gKlTFB/wMPtEhRAlYxP4FIdty6zp6Qk=;\n\tb=mSY6gPQv82wpL5mGpF8MzHSGOX4iIoX8ac46K8FlXaBNdI7Sr1cSSKE80q5bEIXnw+\n\tpGra/HPyYSe26T/MOwfe9IBwmCqNUSmiAPzLOOXDIHRFf76Wzc2axwYqZX6ZyWRHTDiJ\n\teZf03U4B12+MR6qhUPs3KFzNDWJO5KawGifFmN/eQPypAoJ7EcxSNYTvkZh4pnbGrDQB\n\tSD52kH3yMHj3/mBP+STejBk4D8UnUh8Uc4ONi3q+jz8CwZi+JCxeqfkf1f0qV1k1dsO/\n\twzBBHxHTu6FR8jMbFD8Cu5GYioM+3ur9l8Wj4qqVAGfZOuMoP+VZHeOuJpZm7kmr1XS8\n\tP5nA==",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id B924F44BE;\n\tMon, 18 Jun 2018 23:36:07 +0200 (CEST)",
            "from mail-pf0-f182.google.com (mail-pf0-f182.google.com\n\t[209.85.192.182]) by dpdk.org (Postfix) with ESMTP id 430D22C6D\n\tfor <dev@dpdk.org>; Mon, 18 Jun 2018 23:36:04 +0200 (CEST)",
            "by mail-pf0-f182.google.com with SMTP id h12-v6so8814237pfk.11\n\tfor <dev@dpdk.org>; Mon, 18 Jun 2018 14:36:04 -0700 (PDT)",
            "from xeon-e3.lan (204-195-35-107.wavecable.com. [204.195.35.107])\n\tby smtp.gmail.com with ESMTPSA id\n\tn70-v6sm34246969pfh.140.2018.06.18.14.36.02\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 18 Jun 2018 14:36:02 -0700 (PDT)"
        ],
        "Date": "Mon, 18 Jun 2018 14:35:57 -0700",
        "X-Received": "by 2002:a62:dc1c:: with SMTP id\n\tt28-v6mr15167041pfg.137.1529357763174; \n\tMon, 18 Jun 2018 14:36:03 -0700 (PDT)",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH v3 3/3] examples/l3fwd: format the IP addresses\n\tfor printing",
        "In-Reply-To": "<20180618213557.15209-1-stephen@networkplumber.org>",
        "Message-Id": "<20180618213557.15209-4-stephen@networkplumber.org>",
        "Precedence": "list",
        "X-BeenThere": "dev@dpdk.org",
        "X-Original-To": "patchwork@dpdk.org",
        "X-Google-Smtp-Source": "ADUXVKLNbkyGoXMJ8xaoJH4z7xSHI/ZsruQBrNnIF9alDtP2c/qiKJDor8T54qRFtfkhc5pjv7GWRA=="
    },
    "content": "It is better user experience to print standard format for addresses\nrather than raw hex.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n examples/l3fwd/l3fwd_lpm.c | 15 ++++++++++-----\n 1 file changed, 10 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c\nindex 3724f79c1924..3edc82aa2c62 100644\n--- a/examples/l3fwd/l3fwd_lpm.c\n+++ b/examples/l3fwd/l3fwd_lpm.c\n@@ -13,6 +13,7 @@\n #include <errno.h>\n #include <getopt.h>\n #include <stdbool.h>\n+#include <arpa/inet.h>\n \n #include <rte_debug.h>\n #include <rte_ether.h>\n@@ -261,6 +262,7 @@ setup_lpm(const int socketid)\n \tunsigned i;\n \tint ret;\n \tchar s[64];\n+\tchar abuf[INET6_ADDRSTRLEN];\n \n \t/* create the LPM table */\n \tconfig_ipv4.max_rules = IPV4_L3FWD_LPM_MAX_RULES;\n@@ -276,6 +278,7 @@ setup_lpm(const int socketid)\n \n \t/* populate the LPM table */\n \tfor (i = 0; i < IPV4_L3FWD_LPM_NUM_ROUTES; i++) {\n+\t\tstruct in_addr in;\n \n \t\t/* skip unused ports */\n \t\tif ((1 << ipv4_l3fwd_lpm_route_array[i].if_out &\n@@ -293,8 +296,9 @@ setup_lpm(const int socketid)\n \t\t\t\ti, socketid);\n \t\t}\n \n-\t\tprintf(\"LPM: Adding route 0x%08x / %d (%d)\\n\",\n-\t\t\t(unsigned)ipv4_l3fwd_lpm_route_array[i].ip,\n+\t\tin.s_addr = htonl(ipv4_l3fwd_lpm_route_array[i].ip);\n+\t\tprintf(\"LPM: Adding route %s / %d (%d)\\n\",\n+\t\t       inet_ntop(AF_INET, &in, abuf, sizeof(abuf)),\n \t\t\tipv4_l3fwd_lpm_route_array[i].depth,\n \t\t\tipv4_l3fwd_lpm_route_array[i].if_out);\n \t}\n@@ -332,9 +336,10 @@ setup_lpm(const int socketid)\n \t\t}\n \n \t\tprintf(\"LPM: Adding route %s / %d (%d)\\n\",\n-\t\t\t\"IPV6\",\n-\t\t\tipv6_l3fwd_lpm_route_array[i].depth,\n-\t\t\tipv6_l3fwd_lpm_route_array[i].if_out);\n+\t\t       inet_ntop(AF_INET6, ipv6_l3fwd_lpm_route_array[i].ip,\n+\t\t\t\t abuf, sizeof(abuf)),\n+\t\t       ipv6_l3fwd_lpm_route_array[i].depth,\n+\t\t       ipv6_l3fwd_lpm_route_array[i].if_out);\n \t}\n }\n \n",
    "prefixes": [
        "v3",
        "3/3"
    ]
}