get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 7707,
    "url": "https://patches.dpdk.org/api/patches/7707/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/fc78cb243a5479a8ab6b2668a41aef5f1a21f124.1444996480.git.pmatilai@redhat.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": "<fc78cb243a5479a8ab6b2668a41aef5f1a21f124.1444996480.git.pmatilai@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/fc78cb243a5479a8ab6b2668a41aef5f1a21f124.1444996480.git.pmatilai@redhat.com",
    "date": "2015-10-16T11:58:17",
    "name": "[dpdk-dev,5/5] eal: add support for driver directory concept",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "424b4cb76b4ae8ba2a17945acf9c74af0de51260",
    "submitter": {
        "id": 169,
        "url": "https://patches.dpdk.org/api/people/169/?format=api",
        "name": "Panu Matilainen",
        "email": "pmatilai@redhat.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/fc78cb243a5479a8ab6b2668a41aef5f1a21f124.1444996480.git.pmatilai@redhat.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/7707/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/7707/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id DCC248E98;\n\tFri, 16 Oct 2015 13:58:36 +0200 (CEST)",
            "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id B257D8E8D\n\tfor <dev@dpdk.org>; Fri, 16 Oct 2015 13:58:32 +0200 (CEST)",
            "from int-mx13.intmail.prod.int.phx2.redhat.com\n\t(int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26])\n\tby mx1.redhat.com (Postfix) with ESMTPS id 38F018E6E9;\n\tFri, 16 Oct 2015 11:58:32 +0000 (UTC)",
            "from dhcp195.koti.laiskiainen.org.com (vpn1-6-41.ams2.redhat.com\n\t[10.36.6.41])\n\tby int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with\n\tESMTP id t9GBwMXP015206; Fri, 16 Oct 2015 07:58:31 -0400"
        ],
        "From": "Panu Matilainen <pmatilai@redhat.com>",
        "To": "dev@dpdk.org",
        "Date": "Fri, 16 Oct 2015 14:58:17 +0300",
        "Message-Id": "<fc78cb243a5479a8ab6b2668a41aef5f1a21f124.1444996480.git.pmatilai@redhat.com>",
        "In-Reply-To": [
            "<cover.1444996152.git.pmatilai@redhat.com>",
            "<e18b068e2e25a82fb1d321a4bd4f32d41c6d83e6.1444996480.git.pmatilai@redhat.com>"
        ],
        "References": [
            "<cover.1443181743.git.pmatilai@redhat.com>\n\t<cover.1444996152.git.pmatilai@redhat.com>",
            "<e18b068e2e25a82fb1d321a4bd4f32d41c6d83e6.1444996480.git.pmatilai@redhat.com>"
        ],
        "X-Scanned-By": "MIMEDefang 2.68 on 10.5.11.26",
        "Subject": "[dpdk-dev] [PATCH 5/5] eal: add support for driver directory concept",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Add a new EAL option -D for loading all drivers from a given directory.\nAdditionally a default driver directory can be set in build-time\nconfiguration, in which case it will be always be used when EAL is\ninitialized (but can be overridden or disabled with -D).\n\nThis simplifies usage in shared library configuration significantly over\nmanually loading individual drivers with -d, and allows distros to\nestablish a drop-in driver directory for seamless integration\nwith 3rd party drivers etc.\n\nSuggested-by: homas Monjalon <thomas.monjalon@6wind.com>\nSigned-off-by: Panu Matilainen <pmatilai@redhat.com>\n---\n config/common_bsdapp                       |  3 ++\n config/common_linuxapp                     |  3 ++\n lib/librte_eal/common/eal_common_options.c | 50 ++++++++++++++++++++++++++++++\n 3 files changed, 56 insertions(+)",
    "diff": "diff --git a/config/common_bsdapp b/config/common_bsdapp\nindex b37dcf4..13bccf4 100644\n--- a/config/common_bsdapp\n+++ b/config/common_bsdapp\n@@ -108,6 +108,9 @@ CONFIG_RTE_EAL_ALLOW_INV_SOCKET_ID=n\n CONFIG_RTE_EAL_ALWAYS_PANIC_ON_ERROR=n\n CONFIG_RTE_MALLOC_DEBUG=n\n \n+# Default driver path (or \"\" to disable)\n+CONFIG_RTE_EAL_PMD_PATH=\"\"\n+\n #\n # FreeBSD contiguous memory driver settings\n #\ndiff --git a/config/common_linuxapp b/config/common_linuxapp\nindex 0de43d5..a0d8cd2 100644\n--- a/config/common_linuxapp\n+++ b/config/common_linuxapp\n@@ -111,6 +111,9 @@ CONFIG_RTE_EAL_IGB_UIO=y\n CONFIG_RTE_EAL_VFIO=y\n CONFIG_RTE_MALLOC_DEBUG=n\n \n+# Default driver path (or \"\" to disable)\n+CONFIG_RTE_EAL_PMD_PATH=\"\"\n+\n #\n # Special configurations in PCI Config Space for high performance\n #\ndiff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c\nindex b542868..c2aca91 100644\n--- a/lib/librte_eal/common/eal_common_options.c\n+++ b/lib/librte_eal/common/eal_common_options.c\n@@ -40,6 +40,8 @@\n #include <errno.h>\n #include <getopt.h>\n #include <dlfcn.h>\n+#include <sys/types.h>\n+#include <dirent.h>\n \n #include <rte_eal.h>\n #include <rte_log.h>\n@@ -59,6 +61,7 @@ eal_short_options[] =\n \t\"b:\" /* pci-blacklist */\n \t\"c:\" /* coremask */\n \t\"d:\" /* driver */\n+\t\"D:\" /* driver directory */\n \t\"h\"  /* help */\n \t\"l:\" /* corelist */\n \t\"m:\" /* memory size */\n@@ -108,6 +111,9 @@ struct shared_driver {\n static struct shared_driver_list solib_list =\n TAILQ_HEAD_INITIALIZER(solib_list);\n \n+/* Path of external loadable drivers */\n+static const char *solib_dir = RTE_EAL_PMD_PATH;\n+\n static int lcores_parsed;\n static int master_lcore_parsed;\n static int mem_parsed;\n@@ -167,11 +173,50 @@ eal_plugin_add(const char *path)\n \treturn 0;\n }\n \n+static int\n+eal_plugindir_init(const char *path)\n+{\n+\tDIR *d = NULL;\n+\tstruct dirent *dent = NULL;\n+\tchar sopath[PATH_MAX];\n+\n+\tif (path == NULL || *path == '\\0')\n+\t\treturn 0;\n+\n+\td = opendir(path);\n+\tif (d == NULL) {\n+\t\tRTE_LOG(ERR, EAL, \"failed to open directory %s: %s\\n\",\n+\t\t\tpath, strerror(errno));\n+\t\treturn -1;\n+\t}\n+\n+\twhile ((dent = readdir(d)) != NULL) {\n+\t\tif (dent->d_type != DT_REG && dent->d_type != DT_LNK)\n+\t\tcontinue;\n+\n+\t\tsnprintf(sopath, PATH_MAX-1, \"%s/%s\", path, dent->d_name);\n+\t\tsopath[PATH_MAX-1] = 0;\n+\n+\t\tif (eal_plugin_add(sopath) == -1)\n+\t\t    break;\n+\t}\n+\n+\tclosedir(d);\n+\t/* XXX this ignores failures from readdir() itself */\n+\treturn (dent == NULL) ? 0 : -1;\n+}\n+\n int\n eal_plugins_init(void)\n {\n \tstruct shared_driver *solib = NULL;\n \n+\tif (eal_plugindir_init(solib_dir) == -1) {\n+\t\tRTE_LOG(ERR, EAL, \"Cannot init plugin directory %s\\n\",\n+\t\t\tsolib_dir);\n+\t\treturn -1;\n+\t}\n+\n \tTAILQ_FOREACH(solib, &solib_list, next) {\n \t\tRTE_LOG(DEBUG, EAL, \"open shared lib %s\\n\", solib->name);\n \t\tsolib->lib_handle = dlopen(solib->name, RTLD_NOW);\n@@ -768,6 +813,10 @@ eal_parse_common_option(int opt, const char *optarg,\n \t\tif (eal_plugin_add(optarg) == -1)\n \t\t\treturn -1;\n \t\tbreak;\n+\t/* set external driver directory */\n+\tcase 'D':\n+\t\tsolib_dir = optarg;\n+\t\tbreak;\n \n \t/* long options */\n \tcase OPT_NO_HUGE_NUM:\n@@ -955,6 +1004,7 @@ eal_common_usage(void)\n \t       \"  --\"OPT_SYSLOG\"            Set syslog facility\\n\"\n \t       \"  --\"OPT_LOG_LEVEL\"         Set default log level\\n\"\n \t       \"  -d LIB.so           Add driver (can be used multiple times)\\n\"\n+\t       \"  -D DIRECTORY        Add driver directory)\\n\"\n \t       \"  -v                  Display version information on startup\\n\"\n \t       \"  -h, --help          This help\\n\"\n \t       \"\\nEAL options for DEBUG use only:\\n\"\n",
    "prefixes": [
        "dpdk-dev",
        "5/5"
    ]
}