get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 106610,
    "url": "http://patches.dpdk.org/api/patches/106610/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220127145142.86742-4-blo@iol.unh.edu/",
    "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": "<20220127145142.86742-4-blo@iol.unh.edu>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220127145142.86742-4-blo@iol.unh.edu",
    "date": "2022-01-27T14:51:40",
    "name": "[3/5] examples/fips_validation: add json parsing",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "63d78f441269d9ada63341c566571adf94434a8f",
    "submitter": {
        "id": 1678,
        "url": "http://patches.dpdk.org/api/people/1678/?format=api",
        "name": "Brandon Lo",
        "email": "blo@iol.unh.edu"
    },
    "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/project/dpdk/patch/20220127145142.86742-4-blo@iol.unh.edu/mbox/",
    "series": [
        {
            "id": 21400,
            "url": "http://patches.dpdk.org/api/series/21400/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=21400",
            "date": "2022-01-27T14:51:37",
            "name": "Add JSON vector set support to fips validation",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/21400/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/106610/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/106610/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 6BA22A04A6;\n\tThu, 27 Jan 2022 15:52:08 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C012F4280E;\n\tThu, 27 Jan 2022 15:51:50 +0100 (CET)",
            "from mail-qk1-f174.google.com (mail-qk1-f174.google.com\n [209.85.222.174])\n by mails.dpdk.org (Postfix) with ESMTP id 30153427F1\n for <dev@dpdk.org>; Thu, 27 Jan 2022 15:51:49 +0100 (CET)",
            "by mail-qk1-f174.google.com with SMTP id j24so479996qkk.10\n for <dev@dpdk.org>; Thu, 27 Jan 2022 06:51:49 -0800 (PST)",
            "from blo.iol.unh.edu ([2606:4100:3880:1270:8f3:b5b9:6ccc:8a5c])\n by smtp.gmail.com with ESMTPSA id 195sm1507324qkf.30.2022.01.27.06.51.47\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 27 Jan 2022 06:51:47 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu;\n s=unh-iol;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=5URAumc2UC6Pu6qU7j82NQmtqD3G6iW/jCuZjpr8cdE=;\n b=VYx/f3c58vaa4a4BqkZ1X87suUCjInCt3CW6m1NYipyXAsyHJlptxQNR8JMr3DWLeP\n siDaZw8JT5+kMELgb+vA/IpOFMVCsKUzVb+kKL7T+k5R8HHLC26QExnV/hDgobc712Ne\n XCSZrxKIZfGmkM5uMk3bDd7gG6nei7Kww5keg=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=5URAumc2UC6Pu6qU7j82NQmtqD3G6iW/jCuZjpr8cdE=;\n b=qYyGNQVAM83uQUlIVSRTHyAnMZKTCmE1oa1qksdM/D1ojN1oTopP99BTV+vsdgnoFA\n 7YtYHxKyNgqtjCEV1Ih4Whz4X0RK4rqnvfxfrH+/R3aDyz+DWwugM6Qm1MCxBMj5j+Gy\n 3hNsRNRzcEJpGFaDGOdxvCx/wUQcmYyVtFGYV/rusnX2Q37A3gvytsetFSTmKT/XdJg1\n azHMa9n2+06NzbltkoHdPvgXQMVK7vgoAAkYAK/xCC5EPOzzCVlXoI6GVhOKsxNzUcpu\n /oXyB8ol9KvOuiBsKUS9sE8SJ6KA3qnZ0qz77Bc91vZ/aB+7OQ5LEkamM5xSj6qr0PpA\n HR7g==",
        "X-Gm-Message-State": "AOAM532+sC0UIqFTfdl3qH5UGCTMifeXwO5en77/uTBHrN0IG7Yxyeu0\n Ag9Wo3Vk7l+A75DREXgWaBgbIFjbwp8yU+ZKcCVjB6uuSqkhpkJD7c/ClZFnD6RwumSyjuBNjr5\n dR9BwrZtNhu7YrNjWjDnBpkx9jbudbtguDFxZJYPefChnqu+qb+w=",
        "X-Google-Smtp-Source": "\n ABdhPJx2Boennx/0fMsyu9BP7eV8fV54/2g0ElMUCiappUgK+2FAXnJQeloAPRkFA/0sVIFiswaOgw==",
        "X-Received": "by 2002:a37:b201:: with SMTP id b1mr2829221qkf.370.1643295108330;\n Thu, 27 Jan 2022 06:51:48 -0800 (PST)",
        "From": "Brandon Lo <blo@iol.unh.edu>",
        "To": "dev@dpdk.org",
        "Cc": "ciara.power@intel.com, roy.fan.zhang@intel.com,\n Brandon Lo <blo@iol.unh.edu>",
        "Subject": "[PATCH 3/5] examples/fips_validation: add json parsing",
        "Date": "Thu, 27 Jan 2022 09:51:40 -0500",
        "Message-Id": "<20220127145142.86742-4-blo@iol.unh.edu>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220127145142.86742-1-blo@iol.unh.edu>",
        "References": "<20220127145142.86742-1-blo@iol.unh.edu>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "Added functions to parse the required information from a vector set\ngiven in the new json format.\n\nSigned-off-by: Brandon Lo <blo@iol.unh.edu>\n---\n examples/fips_validation/fips_validation.c | 84 ++++++++++++++++++++++\n 1 file changed, 84 insertions(+)",
    "diff": "diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c\nindex 52a7bf952d..40254a9181 100644\n--- a/examples/fips_validation/fips_validation.c\n+++ b/examples/fips_validation/fips_validation.c\n@@ -276,6 +276,8 @@ parse_file_type(const char *path)\n \t\tinfo.file_type = FIPS_TYPE_RSP;\n \telse if (strstr(path, FAX_FILE_PERFIX))\n \t\tinfo.file_type = FIPS_TYPE_FAX;\n+\telse if (strstr(path, JSON_FILE_PERFIX))\n+\t\tinfo.file_type = FIPS_TYPE_JSON;\n \telse\n \t\treturn -EINVAL;\n \n@@ -311,6 +313,21 @@ fips_test_init(const char *req_file_path, const char *rsp_file_path,\n \t\treturn -EINVAL;\n \t}\n \n+\tif (info.file_type == FIPS_TYPE_JSON) {\n+#ifdef RTE_HAS_JANSSON\n+\t\tjson_error_t error;\n+\t\tjson_info.json_root = json_loadf(info.fp_rd, 0, &error);\n+\t\tif (!json_info.json_root) {\n+\t\t\tRTE_LOG(ERR, USER1, \"Cannot parse json file %s (line %d, column %d)\\n\",\n+\t\t\t\treq_file_path, error.line, error.column);\n+\t\t\treturn -EINVAL;\n+\t\t}\n+#else /* RTE_HAS_JANSSON */\n+\t\tRTE_LOG(ERR, USER1, \"No json library configured.\\n\");\n+\t\treturn -EINVAL;\n+#endif /* RTE_HAS_JANSSON */\n+\t}\n+\n \tinfo.fp_wr = fopen(rsp_file_path, \"w\");\n \tif (!info.fp_wr) {\n \t\tRTE_LOG(ERR, USER1, \"Cannot open file %s\\n\", rsp_file_path);\n@@ -329,6 +346,8 @@ fips_test_init(const char *req_file_path, const char *rsp_file_path,\n \t\treturn -EINVAL;\n \t}\n \n+\tif (info.file_type == FIPS_TYPE_JSON) return 0;\n+\n \tif (fips_test_parse_header() < 0) {\n \t\tRTE_LOG(ERR, USER1, \"Failed parsing header\\n\");\n \t\treturn -1;\n@@ -429,6 +448,71 @@ fips_test_write_one_case(void)\n \t\tfprintf(info.fp_wr, \"%s\\n\", info.vec[i]);\n }\n \n+#ifdef RTE_HAS_JANSSON\n+int\n+fips_test_parse_one_json_vector_set(void)\n+{\n+\tjson_t *algo_obj = json_object_get(json_info.json_vector_set, \"algorithm\");\n+\tconst char *algo_str = json_string_value(algo_obj);\n+\n+\t/* Vector sets contain the algorithm type, and nothing else we need. */\n+\tif (strstr(algo_str, \"AES-GCM\")) info.algo = FIPS_TEST_ALGO_AES_GCM;\n+\telse return -EINVAL;\n+\n+\treturn 0;\n+}\n+\n+int\n+fips_test_parse_one_json_group(void)\n+{\n+\tint ret;\n+\n+\tif (info.interim_callbacks) {\n+\t\tchar json_value[256];\n+\t\tfor (int i = 0; info.interim_callbacks[i].key != NULL; i++) {\n+\t\t\tjson_t *param = json_object_get(json_info.json_test_group, info.interim_callbacks[i].key);\n+\t\t\tjson_int_t val = json_integer_value(param);\n+\t\t\tsprintf(json_value, \"%lld\", val);\n+\t\t\t/* First argument is blank because the key\n+\t\t\t   is not included in the string being parsed. */\n+\t\t\tret = info.interim_callbacks[i].cb(\n+\t\t\t\t\"\", json_value,\n+\t\t\t\tinfo.interim_callbacks[i].val\n+\t\t\t);\n+\t\t\tif (ret < 0)\n+\t\t\t\treturn ret;\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+}\n+\n+int\n+fips_test_parse_one_json_case(void)\n+{\n+\tuint32_t i;\n+\tint ret = 0;\n+\n+\tfor (i = 0; info.callbacks[i].key != NULL; i++) {\n+\t\tjson_t *param = json_object_get(json_info.json_test_case, info.callbacks[i].key);\n+\t\tif (param) {\n+\t\t\tconst char *json_string = json_string_value(param);\n+\t\t\tstrcpy(info.one_line_text, json_string);\n+\t\t\t/* First argument is blank because the key\n+\t\t\t   is not included in the string being parsed. */\n+\t\t\tret = info.callbacks[i].cb(\n+\t\t\t\t\"\", info.one_line_text,\n+\t\t\t\tinfo.callbacks[i].val\n+\t\t\t);\n+\t\t\tif (ret < 0)\n+\t\t\t\treturn ret;\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+}\n+#endif /* RTE_HAS_JANSSON */\n+\n static int\n parser_read_uint64_hex(uint64_t *value, const char *p)\n {\n",
    "prefixes": [
        "3/5"
    ]
}