get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 83993,
    "url": "http://patches.dpdk.org/api/patches/83993/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201111081507.19913-3-ibtisam.tariq@emumba.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": "<20201111081507.19913-3-ibtisam.tariq@emumba.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201111081507.19913-3-ibtisam.tariq@emumba.com",
    "date": "2020-11-11T08:15:03",
    "name": "[3/7] examples/packet_ordering: enhance getopt_long usage",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "9820062d1bd5a96f49a918f5d4d4ecf9c493bc35",
    "submitter": {
        "id": 1680,
        "url": "http://patches.dpdk.org/api/people/1680/?format=api",
        "name": "Ibtisam Tariq",
        "email": "ibtisam.tariq@emumba.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20201111081507.19913-3-ibtisam.tariq@emumba.com/mbox/",
    "series": [
        {
            "id": 13801,
            "url": "http://patches.dpdk.org/api/series/13801/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13801",
            "date": "2020-11-11T08:15:01",
            "name": "[1/7] examples/fips_validation: enhance getopt_long usage",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/13801/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/83993/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/83993/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id CEA0DA09D2;\n\tWed, 11 Nov 2020 09:16:11 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9ECE25916;\n\tWed, 11 Nov 2020 09:15:45 +0100 (CET)",
            "from mail-wm1-f68.google.com (mail-wm1-f68.google.com\n [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id F0BD35913\n for <dev@dpdk.org>; Wed, 11 Nov 2020 09:15:42 +0100 (CET)",
            "by mail-wm1-f68.google.com with SMTP id h2so1426551wmm.0\n for <dev@dpdk.org>; Wed, 11 Nov 2020 00:15:42 -0800 (PST)",
            "from localhost.localdomain ([39.33.227.210])\n by smtp.gmail.com with ESMTPSA id z3sm909539wrw.87.2020.11.11.00.15.39\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 11 Nov 2020 00:15:42 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=emumba-com.20150623.gappssmtp.com; s=20150623;\n h=from:to:cc:subject:date:message-id:in-reply-to:references;\n bh=zlM9Wry19VUPUSww91VmY9rkU/sQzcIcwnaouWkfus0=;\n b=LgbYjKaWTZ94rxMBhixdobKcZG1Jcsc/QrSyrNbfdh2l0E5uQafO2ZAHHwSiAYbS1n\n sS7E+v0pFHM3/wSZJI0FWIgT/PACeqSEeBjPysCnEZgxtb6KD7ILHNea8sMZ7Sgy4u1L\n 4cdQ4q+k5w/RRzODjS+TdwVCXX3F4A7bC59w44Hwt7hTOrpPpZOTcXP43SQ4YL5ImED8\n 0DYT2dPH+C32w3cfIv0Xb+dc2dG0TxRRXZz/NxJ0lY4EZSsTiZ4CWrgkDFt0WLBEiade\n M34Sxo0DFMi2Ifzd349QamG1tBfIQOJcvna3MZJ8gWsZh0P9zzcrZ4Cvp5Lrki3vVypk\n G5nQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references;\n bh=zlM9Wry19VUPUSww91VmY9rkU/sQzcIcwnaouWkfus0=;\n b=h+Tpc8QH5QOn7gguoxVuCU0zKPIVPGiugnACJ5vzIbK1TA4LXXYp6m6J7kikJUJWi0\n v60hnnZN6SzeY/jwIgUUQcxoQSKhEcLR/LNurE8zB4Uk3RgTpi5zPpMAX6PaGJK1051x\n H/P1ayWHFk8HmTiXfg89ToPvLmS5NIU40w5G/tmaeRsR9QkLKEzxnogzVlCbB6MU+juw\n 9gJj5kGyhz00dBWzy45drP4niZpj83fMqamUYxvJIVtePB4WxWa7jSo8m5H2M+O6AcL1\n wLQ0IOsCiWI4r4jZhLKwebP1iG273e+1u80jrcHF44PTyL79/W+RCJkDGlCQitSXs9xP\n GoTA==",
        "X-Gm-Message-State": "AOAM531EkcLP7vg/5DSRYtTmXcTnxeuxTgTyyPHyuSa9P9h8RSYxiR0h\n uim6/8nKkSaR/008lIe/m41lYA==",
        "X-Google-Smtp-Source": "\n ABdhPJy+kGHhOXrjUcU1fMGxEKhnP85mbZG4EUfAdZODYUfa/W2H8cyFljdwQ5Aqq7MOpTiPczS9+A==",
        "X-Received": "by 2002:a1c:205:: with SMTP id 5mr2510295wmc.7.1605082542791;\n Wed, 11 Nov 2020 00:15:42 -0800 (PST)",
        "From": "Ibtisam Tariq <ibtisam.tariq@emumba.com>",
        "To": "maxime.coquelin@redhat.com, chenbo.xia@intel.com,\n cristian.dumitrescu@intel.com, jasvinder.singh@intel.com,\n john.mcnamara@intel.com, reshma.pattan@intel.com,\n konstantin.ananyev@intel.com, marko.kovacevic@intel.com",
        "Cc": "dev@dpdk.org, Ibtisam Tariq <ibtisam.tariq@emumba.com>,\n sergio.gonzalez.monroy@intel.com, phil.yang@arm.com",
        "Date": "Wed, 11 Nov 2020 08:15:03 +0000",
        "Message-Id": "<20201111081507.19913-3-ibtisam.tariq@emumba.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20201111081507.19913-1-ibtisam.tariq@emumba.com>",
        "References": "<20201111081507.19913-1-ibtisam.tariq@emumba.com>",
        "Subject": "[dpdk-dev] [PATCH 3/7] examples/packet_ordering: enhance\n\tgetopt_long usage",
        "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Instead of using getopt_long return value, strcmp was used to\ncompare the input parameters with the struct option array. This\npatch get rid of all those strcmp by directly binding each longopt\nwith an int enum. This is to improve readability and consistency in\nall examples.\n\nBugzilla ID: 238\nCc: sergio.gonzalez.monroy@intel.com\nCc: phil.yang@arm.com\n\nReported-by: David Marchand <david.marchand@redhat.com>\nSigned-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>\n---\nv2\n* Remove extra indentations.\n* Remove extra block brackets in switch statement.\n* Change enum names to start with OPT_ and remove KEYWORD from enum names.\n\nv1\n* enhance getopt_long usage\n---\n examples/packet_ordering/main.c | 33 ++++++++++++++++++++-------------\n 1 file changed, 20 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c\nindex 4bea1982d..32e58c9cd 100644\n--- a/examples/packet_ordering/main.c\n+++ b/examples/packet_ordering/main.c\n@@ -29,6 +29,13 @@\n /* Macros for printing using RTE_LOG */\n #define RTE_LOGTYPE_REORDERAPP          RTE_LOGTYPE_USER1\n \n+enum {\n+#define OPT_DISABLE_REORDER \"disable-reorder\"\n+\tOPT_DISABLE_REORDER_NUM = 256,\n+#define OPT_INSIGHT_WORKER \"insight-worker\"\n+\tOPT_INSIGHT_WORKER_NUM,\n+};\n+\n unsigned int portmask;\n unsigned int disable_reorder;\n unsigned int insight_worker;\n@@ -157,9 +164,9 @@ parse_args(int argc, char **argv)\n \tchar **argvopt;\n \tchar *prgname = argv[0];\n \tstatic struct option lgopts[] = {\n-\t\t{\"disable-reorder\", 0, 0, 0},\n-\t\t{\"insight-worker\", 0, 0, 0},\n-\t\t{NULL, 0, 0, 0}\n+\t\t{OPT_DISABLE_REORDER, 0, NULL, OPT_DISABLE_REORDER_NUM},\n+\t\t{OPT_INSIGHT_WORKER,  0, NULL, OPT_INSIGHT_WORKER_NUM },\n+\t\t{NULL,                0, 0,    0                      }\n \t};\n \n \targvopt = argv;\n@@ -176,18 +183,18 @@ parse_args(int argc, char **argv)\n \t\t\t\treturn -1;\n \t\t\t}\n \t\t\tbreak;\n+\n \t\t/* long options */\n-\t\tcase 0:\n-\t\t\tif (!strcmp(lgopts[option_index].name, \"disable-reorder\")) {\n-\t\t\t\tprintf(\"reorder disabled\\n\");\n-\t\t\t\tdisable_reorder = 1;\n-\t\t\t}\n-\t\t\tif (!strcmp(lgopts[option_index].name,\n-\t\t\t\t\t\t\"insight-worker\")) {\n-\t\t\t\tprintf(\"print all worker statistics\\n\");\n-\t\t\t\tinsight_worker = 1;\n-\t\t\t}\n+\t\tcase OPT_DISABLE_REORDER_NUM:\n+\t\t\tprintf(\"reorder disabled\\n\");\n+\t\t\tdisable_reorder = 1;\n+\t\t\tbreak;\n+\n+\t\tcase OPT_INSIGHT_WORKER_NUM:\n+\t\t\tprintf(\"print all worker statistics\\n\");\n+\t\t\tinsight_worker = 1;\n \t\t\tbreak;\n+\n \t\tdefault:\n \t\t\tprint_usage(prgname);\n \t\t\treturn -1;\n",
    "prefixes": [
        "3/7"
    ]
}