get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 93681,
    "url": "https://patches.dpdk.org/api/patches/93681/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210601030644.3318-5-chenbo.xia@intel.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": "<20210601030644.3318-5-chenbo.xia@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210601030644.3318-5-chenbo.xia@intel.com",
    "date": "2021-06-01T03:06:42",
    "name": "[RFC,v3,4/6] eal: add a helper for reading string from sysfs",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "445fb0cc82bc8dee4691366f8ef015b000cd0910",
    "submitter": {
        "id": 1276,
        "url": "https://patches.dpdk.org/api/people/1276/?format=api",
        "name": "Chenbo Xia",
        "email": "chenbo.xia@intel.com"
    },
    "delegate": {
        "id": 24651,
        "url": "https://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210601030644.3318-5-chenbo.xia@intel.com/mbox/",
    "series": [
        {
            "id": 17176,
            "url": "https://patches.dpdk.org/api/series/17176/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17176",
            "date": "2021-06-01T03:06:38",
            "name": "Add mdev (Mediated device) support in DPDK",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/17176/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/93681/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/93681/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 F27DBA0524;\n\tTue,  1 Jun 2021 05:18:01 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E02F640E64;\n\tTue,  1 Jun 2021 05:18:01 +0200 (CEST)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n by mails.dpdk.org (Postfix) with ESMTP id B7F6040041\n for <dev@dpdk.org>; Tue,  1 Jun 2021 05:18:00 +0200 (CEST)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 31 May 2021 20:17:59 -0700",
            "from npg-dpdk-virtio-xiachenbo-nw.sh.intel.com ([10.67.118.250])\n by fmsmga002.fm.intel.com with ESMTP; 31 May 2021 20:17:53 -0700"
        ],
        "IronPort-SDR": [
            "\n FWJdBM8wRcovLnTcMC7atDNZk+3TXagjFzUX1ZNfO5wLbFlCcljwaXUfk1pC9G6gqH8QJlvbVN\n nqadjeur+NUA==",
            "\n +MJuUDgC2I4+WO0/p93GNXzhreq3LyP0hRGRJ9KI9UMA/kdFTlcb6oNHBKZ6Z896cOITJDZAcP\n Lb2VsDl0viOA=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10001\"; a=\"289079337\"",
            "E=Sophos;i=\"5.83,239,1616482800\"; d=\"scan'208\";a=\"289079337\"",
            "E=Sophos;i=\"5.83,239,1616482800\"; d=\"scan'208\";a=\"482315466\""
        ],
        "X-ExtLoop1": "1",
        "From": "Chenbo Xia <chenbo.xia@intel.com>",
        "To": "dev@dpdk.org, thomas@monjalon.net, cunming.liang@intel.com,\n jingjing.wu@intel.com",
        "Cc": "anatoly.burakov@intel.com, ferruh.yigit@intel.com, mdr@ashroe.eu,\n nhorman@tuxdriver.com, bruce.richardson@intel.com,\n david.marchand@redhat.com, stephen@networkplumber.org,\n konstantin.ananyev@intel.com, Tiwei Bie <tiwei.bie@intel.com>",
        "Date": "Tue,  1 Jun 2021 11:06:42 +0800",
        "Message-Id": "<20210601030644.3318-5-chenbo.xia@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20210601030644.3318-1-chenbo.xia@intel.com>",
        "References": "<20190715075214.16616-6-tiwei.bie@intel.com>\n <20210601030644.3318-1-chenbo.xia@intel.com>",
        "Subject": "[dpdk-dev] [RFC v3 4/6] eal: add a helper for reading string from\n sysfs",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Tiwei Bie <tiwei.bie@intel.com>\n\nThis patch adds a helper for reading string from sysfs.\n\nSigned-off-by: Cunming Liang <cunming.liang@intel.com>\nSigned-off-by: Tiwei Bie <tiwei.bie@intel.com>\n---\n lib/eal/common/eal_filesystem.h | 10 ++++++++++\n lib/eal/freebsd/eal.c           | 22 ++++++++++++++++++++++\n lib/eal/linux/eal.c             | 22 ++++++++++++++++++++++\n lib/eal/version.map             |  3 +++\n 4 files changed, 57 insertions(+)",
    "diff": "diff --git a/lib/eal/common/eal_filesystem.h b/lib/eal/common/eal_filesystem.h\nindex 5d21f07c20..be4c51ebb2 100644\n--- a/lib/eal/common/eal_filesystem.h\n+++ b/lib/eal/common/eal_filesystem.h\n@@ -104,4 +104,14 @@ eal_get_hugefile_path(char *buffer, size_t buflen, const char *hugedir, int f_id\n  * Used to read information from files on /sys */\n int eal_parse_sysfs_value(const char *filename, unsigned long *val);\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice\n+ *\n+ * Function to read a line from a file on the filesystem.\n+ * Used to read information from files on /sys\n+ */\n+__rte_experimental\n+int rte_eal_parse_sysfs_str(const char *filename, char *buf, unsigned long sz);\n+\n #endif /* EAL_FILESYSTEM_H */\ndiff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c\nindex f4d1676754..002f07f4da 100644\n--- a/lib/eal/freebsd/eal.c\n+++ b/lib/eal/freebsd/eal.c\n@@ -169,6 +169,28 @@ eal_parse_sysfs_value(const char *filename, unsigned long *val)\n \treturn 0;\n }\n \n+int\n+rte_eal_parse_sysfs_str(const char *filename, char *buf, unsigned long sz)\n+{\n+\tFILE *f;\n+\n+\tf = fopen(filename, \"r\");\n+\tif (f == NULL) {\n+\t\tRTE_LOG(ERR, EAL, \"%s(): cannot open sysfs file %s\\n\",\n+\t\t\t__func__, filename);\n+\t\treturn -1;\n+\t}\n+\n+\tif (fgets(buf, sz, f) == NULL) {\n+\t\tRTE_LOG(ERR, EAL, \"%s(): cannot read sysfs file %s\\n\",\n+\t\t\t__func__, filename);\n+\t\tfclose(f);\n+\t\treturn -1;\n+\t}\n+\n+\tfclose(f);\n+\treturn 0;\n+}\n \n /* create memory configuration in shared/mmap memory. Take out\n  * a write lock on the memsegs, so we can auto-detect primary/secondary.\ndiff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c\nindex ba19fc6347..d5917a48ca 100644\n--- a/lib/eal/linux/eal.c\n+++ b/lib/eal/linux/eal.c\n@@ -260,6 +260,28 @@ eal_parse_sysfs_value(const char *filename, unsigned long *val)\n \treturn 0;\n }\n \n+int\n+rte_eal_parse_sysfs_str(const char *filename, char *buf, unsigned long sz)\n+{\n+\tFILE *f;\n+\n+\tf = fopen(filename, \"r\");\n+\tif (f == NULL) {\n+\t\tRTE_LOG(ERR, EAL, \"%s(): cannot open sysfs file %s\\n\",\n+\t\t\t__func__, filename);\n+\t\treturn -1;\n+\t}\n+\n+\tif (fgets(buf, sz, f) == NULL) {\n+\t\tRTE_LOG(ERR, EAL, \"%s(): cannot read sysfs file %s\\n\",\n+\t\t\t__func__, filename);\n+\t\tfclose(f);\n+\t\treturn -1;\n+\t}\n+\n+\tfclose(f);\n+\treturn 0;\n+}\n \n /* create memory configuration in shared/mmap memory. Take out\n  * a write lock on the memsegs, so we can auto-detect primary/secondary.\ndiff --git a/lib/eal/version.map b/lib/eal/version.map\nindex fe5c3dac98..3d7fce26a4 100644\n--- a/lib/eal/version.map\n+++ b/lib/eal/version.map\n@@ -423,6 +423,9 @@ EXPERIMENTAL {\n \trte_version_release; # WINDOWS_NO_EXPORT\n \trte_version_suffix; # WINDOWS_NO_EXPORT\n \trte_version_year; # WINDOWS_NO_EXPORT\n+\n+\t# added in 21.08\n+\trte_eal_parse_sysfs_str; # WINDOWS_NO_EXPORT\n };\n \n INTERNAL {\n",
    "prefixes": [
        "RFC",
        "v3",
        "4/6"
    ]
}