get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 69055,
    "url": "http://patchwork.dpdk.org/api/patches/69055/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20200421204115.31950-3-dg@adax.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20200421204115.31950-3-dg@adax.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200421204115.31950-3-dg@adax.com",
    "date": "2020-04-21T20:41:15",
    "name": "[v2,2/2] eal: resolve getentropy at run time for random seed",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "20a6eff3ee5464942f411324229fccafd6cb9eac",
    "submitter": {
        "id": 1040,
        "url": "http://patchwork.dpdk.org/api/people/1040/?format=api",
        "name": "Dan Gora",
        "email": "dg@adax.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patchwork.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20200421204115.31950-3-dg@adax.com/mbox/",
    "series": [
        {
            "id": 9552,
            "url": "http://patchwork.dpdk.org/api/series/9552/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=9552",
            "date": "2020-04-21T20:41:13",
            "name": "eal: choose initial PRNG seed source at runtime",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/9552/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/69055/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/69055/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 13085A05A0;\n\tTue, 21 Apr 2020 22:41:54 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E7FD41D51D;\n\tTue, 21 Apr 2020 22:41:53 +0200 (CEST)",
            "from mail-qk1-f196.google.com (mail-qk1-f196.google.com\n [209.85.222.196]) by dpdk.org (Postfix) with ESMTP id 618B21D533\n for <dev@dpdk.org>; Tue, 21 Apr 2020 22:41:52 +0200 (CEST)",
            "by mail-qk1-f196.google.com with SMTP id v7so201789qkc.0\n for <dev@dpdk.org>; Tue, 21 Apr 2020 13:41:52 -0700 (PDT)",
            "from localhost.localdomain ([168.121.99.161])\n by smtp.gmail.com with ESMTPSA id d23sm2431067qkj.26.2020.04.21.13.41.49\n (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n Tue, 21 Apr 2020 13:41:51 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n h=sender:from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=iBuOXQLMOzTjK6zGwpmTn2glHuXf76ojkSu68vEj5KE=;\n b=W/e24SAaRoqu6Br5zMZPx7k6yP3X++FP3a1CxUoZ2N4SWEUfRE+cxuNqgKyNCzWug6\n x3v2HTfpWvrLWAMGOcZXFg5s9y5NOP9a59b1ljWbJh9bZliEGkwHdOmCy2iln4n5y66X\n Y+pEMUfqUUGWvYr/91Xt66whsdW22TkWIPGQeJ9+pGdI3krtdn6DGtgD4ERUZrGUSfBJ\n WkUpGpVOcEA97Oqs4OClkOCiytrgLWyuVyO5zRoNTYUI9eXojA87NnGrxxJ8RStVh5St\n FuZm61UdtnmygElZBY0oOe1W2nMNewRi47lf9g+Z59Pj1HlQDkBq1JqN02ql0WXJ59H/\n vmCQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:sender:from:to:cc:subject:date:message-id\n :in-reply-to:references:mime-version:content-transfer-encoding;\n bh=iBuOXQLMOzTjK6zGwpmTn2glHuXf76ojkSu68vEj5KE=;\n b=ti0nmgwzWshPGcc3y9Hgj/FfS81ueS5PyHK8NMbAVJR1dihnXlPs6CB2MMgKJyatPI\n RzFfd3zgrmjYVuEiB0m3YUxCaDOrYJOVfhDPPto9C5lymGb8Fj6N8GgbzvcsyzoNC3If\n QegYSBpI1lvkFfqsYkbqJCXkbTVHD+jjrs6AOVJMqNH1IqXkFFjeH6UY0qv4CED1oOh0\n im96WbAIj7jKLGA1eShAw5fiYSj+H5HMEklKsnI8RSlkQJ0I1wELPFdoLiRmVBpxAJDJ\n 5wZg4z/+bpqB17lPX5Ghu6IveQHHGgijyzxWj9R35t6/r4RZejfEqilcszh5MJsyKZrz\n EoFA==",
        "X-Gm-Message-State": "AGi0PuYoFqCjbMOgK//MRem4IuzXudCiT4non1skgmpZOsqMADc7asNB\n pEJOODeBHC3vNztYhHOY4A2uRNj5GRY=",
        "X-Google-Smtp-Source": "\n APiQypKnN/lz1FO/g9AbFFOvp92y2AmAyQPQPJ7CHcTeQISPz50oqC+Gblsh6fSZeLMFMzeOXGAN5A==",
        "X-Received": "by 2002:a05:620a:1396:: with SMTP id\n k22mr22603400qki.424.1587501711540;\n Tue, 21 Apr 2020 13:41:51 -0700 (PDT)",
        "From": "Dan Gora <dg@adax.com>",
        "To": "dev@dpdk.org,\n =?utf-8?q?Mattias_R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>",
        "Cc": "David Marchand <david.marchand@redhat.com>,\n Jerin Jacob <jerinjacobk@gmail.com>, Dan Gora <dg@adax.com>",
        "Date": "Tue, 21 Apr 2020 17:41:15 -0300",
        "Message-Id": "<20200421204115.31950-3-dg@adax.com>",
        "X-Mailer": "git-send-email 2.24.1.425.g7034cd094b",
        "In-Reply-To": "<20200421204115.31950-1-dg@adax.com>",
        "References": "<20200421195446.1730-1-dg@adax.com>\n <20200421204115.31950-1-dg@adax.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v2 2/2] eal: resolve getentropy at run time for\n\trandom seed",
        "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": "The getentropy() function was introduced into glibc v2.25 and so is\nnot available on all supported platforms.  Previously, if DPDK was\ncompiled (using meson) on a system which has getentropy(), it would\nintroduce a dependency on glibc v2.25 which would prevent that binary\nfrom running on a system with an older glibc.  Similarly if DPDK was\ncompiled on a system which did not have getentropy(), getentropy()\ncould not be used even if the execution system supported it.\n\nIntroduce a new static function, __rte_getentropy() which will try to\nresolve the getentropy() function dynamically using dlopen()/dlsym(),\nreturning failure if the getentropy() function cannot be resolved or\nif it fails.\n\nThis also allows getentropy() to be used as the random seed source\nwhen the traditional Makefile build for DPDK is used.\n\nSigned-off-by: Dan Gora <dg@adax.com>\n---\n lib/librte_eal/common/rte_random.c | 35 +++++++++++++++++++++++++-----\n lib/librte_eal/meson.build         |  3 ---\n 2 files changed, 29 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/rte_random.c b/lib/librte_eal/common/rte_random.c\nindex 2c84c8527..3a05b23db 100644\n--- a/lib/librte_eal/common/rte_random.c\n+++ b/lib/librte_eal/common/rte_random.c\n@@ -7,6 +7,7 @@\n #endif\n #include <stdlib.h>\n #include <unistd.h>\n+#include <dlfcn.h>\n \n #include <rte_branch_prediction.h>\n #include <rte_cycles.h>\n@@ -176,18 +177,40 @@ rte_rand_max(uint64_t upper_bound)\n \treturn res;\n }\n \n+/* Try to use the getentropy() function from glibc >= 2.25 */\n+static int\n+__rte_getentropy(uint64_t *ge_seed)\n+{\n+\tvoid *handle = NULL;\n+\tvoid **sym;\n+\tint (*getentropy_p)(void *__buffer, size_t __length);\n+\tint gc_rc;\n+\n+\thandle = dlopen(\"libc.so.6\", RTLD_LAZY);\n+\tif (!handle)\n+\t\treturn -1;\n+\n+\tsym = dlsym(handle, \"getentropy\");\n+\tif (!sym || !*sym) {\n+\t\t/* Cannot resolve getentropy */\n+\t\tdlclose(handle);\n+\t\treturn -1;\n+\t}\n+\n+\tgetentropy_p = (int (*)(void *, size_t)) sym;\n+\tgc_rc = (*getentropy_p)((void *)ge_seed, sizeof(*ge_seed));\n+\tdlclose(handle);\n+\treturn gc_rc;\n+}\n+\n static uint64_t\n __rte_random_initial_seed(void)\n {\n-#ifdef RTE_LIBEAL_USE_GETENTROPY\n-\tint ge_rc;\n \tuint64_t ge_seed;\n \n-\tge_rc = getentropy(&ge_seed, sizeof(ge_seed));\n-\n-\tif (ge_rc == 0)\n+\tif (__rte_getentropy(&ge_seed) == 0)\n \t\treturn ge_seed;\n-#endif\n+\n #if defined(RTE_ARCH_X86)\n \t/* first fallback: rdseed instruction, if available */\n \tif (rte_cpu_get_flag_enabled(RTE_CPUFLAG_RDSEED)) {\ndiff --git a/lib/librte_eal/meson.build b/lib/librte_eal/meson.build\nindex 0267c3b9d..748359b8c 100644\n--- a/lib/librte_eal/meson.build\n+++ b/lib/librte_eal/meson.build\n@@ -15,9 +15,6 @@ deps += 'kvargs'\n if dpdk_conf.has('RTE_USE_LIBBSD')\n \text_deps += libbsd\n endif\n-if cc.has_function('getentropy', prefix : '#include <unistd.h>')\n-\tcflags += '-DRTE_LIBEAL_USE_GETENTROPY'\n-endif\n if cc.has_header('getopt.h')\n \tcflags += ['-DHAVE_GETOPT_H', '-DHAVE_GETOPT', '-DHAVE_GETOPT_LONG']\n endif\n",
    "prefixes": [
        "v2",
        "2/2"
    ]
}