get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 84506,
    "url": "http://patches.dpdk.org/api/patches/84506/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201124123249.14451-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": "<20201124123249.14451-3-ibtisam.tariq@emumba.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201124123249.14451-3-ibtisam.tariq@emumba.com",
    "date": "2020-11-24T12:32:45",
    "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/20201124123249.14451-3-ibtisam.tariq@emumba.com/mbox/",
    "series": [
        {
            "id": 14068,
            "url": "http://patches.dpdk.org/api/series/14068/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=14068",
            "date": "2020-11-24T12:32:43",
            "name": "[1/7] examples/fips_validation: enhance getopt_long usage",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/14068/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/84506/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/84506/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 E1ECCA04B1;\n\tTue, 24 Nov 2020 13:34:12 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id DAB7EC944;\n\tTue, 24 Nov 2020 13:33:36 +0100 (CET)",
            "from mail-wm1-f65.google.com (mail-wm1-f65.google.com\n [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id C69BCC942\n for <dev@dpdk.org>; Tue, 24 Nov 2020 13:33:35 +0100 (CET)",
            "by mail-wm1-f65.google.com with SMTP id h21so2710507wmb.2\n for <dev@dpdk.org>; Tue, 24 Nov 2020 04:33:35 -0800 (PST)",
            "from localhost.localdomain ([39.33.169.238])\n by smtp.gmail.com with ESMTPSA id w3sm5409034wma.3.2020.11.24.04.33.31\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 24 Nov 2020 04:33:33 -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=fgWVONbzhG4ooI35IuyUeCIooENi5Nial/VuvBLCScE=;\n b=GIOh26o7dl1BJg7W4UPpf1R+yRTz9+nb5UoiJQbi92BCqGNHjyS8wdmWQZPAL5AOLQ\n zwJjUkzvOOTbIjWQnDuuAzhhbeNs6kQ58/QQwMtF6bS0OZTNkXmMDv6eIh50fZYUq9Ko\n 97J64K/1a57MuUXCSlbUUg06+baPCJri+qp3YakRrtiGO3gpRM7eFuDQVnv6Mwn+Lrxo\n +7oUrAh8j6e3TJqClpKNoMF4S3Xfksf1Ehi8Ko9OoNH18U2SH+BrT27v6pKRPpkUzsFY\n 80qjK0mnLibS2Ms5hr9BdRmIerbLpMX8sMMYm76aa1iGQMb2ro64V+WtkMQK43B5y6cB\n g3lQ==",
        "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=fgWVONbzhG4ooI35IuyUeCIooENi5Nial/VuvBLCScE=;\n b=fOWLuIzlKfdJY+VAqtN6UOuHACR0NE2LYTTnjNpE+P3Z4Fqu36FFdg/guninlNKwxv\n s1OCWiaGs6l/XyxSd9fkBHLCAJ9pA8adWK7GJASoKuqF5juwEZNoJSTbUWnjmDGNPiqu\n wajHjENcJq6xrnv09/OX2PhAzde25OWFsT85k+0f1rHJW/pKx441WyfEDe3WQe7rQc7e\n QJvL5hBGw5KeYc84gABd+FHlRDdMIPmt6HE3lLtXM7O7cZbtr695XsYcG1AHPf+notuU\n Ag2+rXB9srma5FRTggRxwN+GBEcEgnm3LXZYpAWUPOm1ZeXRyWhY5dmmY7MjhuMXrVMi\n qhCw==",
        "X-Gm-Message-State": "AOAM530xkfwsC5gl8o8tP3DSe88HQgcVzg3DQmagj6jfvYvnmxjKjsK7\n lP7sR/6tW+ZOM2Yo6zsVoObkMA==",
        "X-Google-Smtp-Source": "\n ABdhPJzI8reFsWu/UuXzgR4I8CzdkHFXPt6lQKc6mTIg4f9YeNk6fLsiOG4G5tf5EmS8J8Ih6HebiQ==",
        "X-Received": "by 2002:a1c:20c1:: with SMTP id g184mr4408905wmg.32.1606221214437;\n Tue, 24 Nov 2020 04:33:34 -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": "Tue, 24 Nov 2020 12:32:45 +0000",
        "Message-Id": "<20201124123249.14451-3-ibtisam.tariq@emumba.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20201124123249.14451-1-ibtisam.tariq@emumba.com>",
        "References": "<20201124123249.14451-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---\nv3:\n* None.\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"
    ]
}