get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 13630,
    "url": "https://patches.dpdk.org/api/patches/13630/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1465894789-20733-1-git-send-email-thomas.monjalon@6wind.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": "<1465894789-20733-1-git-send-email-thomas.monjalon@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1465894789-20733-1-git-send-email-thomas.monjalon@6wind.com",
    "date": "2016-06-14T08:59:49",
    "name": "[dpdk-dev] config: make libarchive optional",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b07a8675926fc3761c71510b36e9dbac068187ef",
    "submitter": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/people/1/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas.monjalon@6wind.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1465894789-20733-1-git-send-email-thomas.monjalon@6wind.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/13630/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/13630/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 6DC1C6CAB;\n\tTue, 14 Jun 2016 11:00:07 +0200 (CEST)",
            "from mail-wm0-f49.google.com (mail-wm0-f49.google.com\n\t[74.125.82.49]) by dpdk.org (Postfix) with ESMTP id D8D7E6CA1\n\tfor <dev@dpdk.org>; Tue, 14 Jun 2016 11:00:05 +0200 (CEST)",
            "by mail-wm0-f49.google.com with SMTP id m124so112709170wme.1\n\tfor <dev@dpdk.org>; Tue, 14 Jun 2016 02:00:05 -0700 (PDT)",
            "from XPS13.localdomain (184.203.134.77.rev.sfr.net.\n\t[77.134.203.184]) by smtp.gmail.com with ESMTPSA id\n\tlr9sm31827235wjb.39.2016.06.14.02.00.04\n\t(version=TLSv1/SSLv3 cipher=OTHER);\n\tTue, 14 Jun 2016 02:00:04 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=JpqyjEWZCxnujX5cgsQyVX6Kj4zT3DiORGj58flHFXI=;\n\tb=hUGKhxGcHvrmzpbCC/4nDemmJA2cknoWjLQFlyz6TVJcOYMcUnSdwErxN6/k+hIfXS\n\tJYhbSBqgYYQH7ZbQY9K+LEKaqtXdrTV4y4i1oDyeqbl50uIn2ASi8Uyhic37CwWP7Zeu\n\tX1CszJ7Byp69OG6YZ79D8UQLUc0xeakH+3qtl2SkzN/bHnRwXQerY6Bt13WMwtbu7Oak\n\thxu3kNWLs8HqAq2XCTj3Uj4mP1uLh+i/Ab+o1klzKuXIDwQ7g/izc1Kfq08Xi4dRegUf\n\teYHhxNrLKpBjsnmM8VXQGjS1NbvTb4lyPjVtamHk6c5X2adRPXb3Gxsj692hTREykBcI\n\t25qg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=JpqyjEWZCxnujX5cgsQyVX6Kj4zT3DiORGj58flHFXI=;\n\tb=jDrGUSyTcXryhnjkR32YvEvqib30EyQf7Qpk2jlG1r74UB4cqC6eVg9sBWazigoeyG\n\t3MermNfyfcZQzjEgQigYiXHF83rNe+OxSYeYcLV1La7cI7vmaFJ/2cx3qs4wN7Z2XXog\n\tU07gOarmDIa7z+ZYyu1kXd14pr6dv12is1lNvl46Zp5cCsLZaAXKWnLrMVSSzffd2E/W\n\tUAsXPYUCihmV1XApXI40chUZCWebZNC1/bklNabladNqOKhPNaRdZpW0i/cWrH02cmvX\n\tpVKDJ/FEhcSYk0oqCrNpgAF0/8O61vmfD/dAoZbhTlCde3Nw7819jTo+nM838jqTh4v7\n\t2txw==",
        "X-Gm-Message-State": "ALyK8tKoiksJhURL8D/1UXKuXOGU/79qwE7GSq4H5qhzfmflAWSH6hptUHzmfBJJ0sKJWAtp",
        "X-Received": "by 10.28.54.147 with SMTP id y19mr5105699wmh.68.1465894805536;\n\tTue, 14 Jun 2016 02:00:05 -0700 (PDT)",
        "From": "Thomas Monjalon <thomas.monjalon@6wind.com>",
        "To": "Jan Viktorin <viktorin@rehivetech.com>",
        "Cc": "David Hunt <david.hunt@intel.com>,\n\tdev@dpdk.org",
        "Date": "Tue, 14 Jun 2016 10:59:49 +0200",
        "Message-Id": "<1465894789-20733-1-git-send-email-thomas.monjalon@6wind.com>",
        "X-Mailer": "git-send-email 2.7.0",
        "In-Reply-To": "<575FBF1A.5080005@intel.com>",
        "References": "<575FBF1A.5080005@intel.com>",
        "Subject": "[dpdk-dev] [PATCH] config: make libarchive optional",
        "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": "The commit 66819e6 has introduced a dependency on libarchive to be able\nto use some tar resources in the unit tests.\nIt is now an optional dependency because some systems do not have it\ninstalled.\n\nIf CONFIG_RTE_APP_TEST_RESOURCE_TAR is disabled, the PCI test will not\nbe run. When a \"configure\" script will be integrated, the libarchive\navailability could be checked to automatically enable the option.\n\nSigned-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>\n---\n app/test/Makefile                 | 11 +++++++----\n app/test/resource.c               |  8 ++++++--\n app/test/test_mp_secondary.c      |  4 ++++\n app/test/test_resource.c          |  5 +++++\n config/common_base                |  1 +\n doc/guides/linux_gsg/sys_reqs.rst |  3 +++\n scripts/test-build.sh             |  4 ++++\n 7 files changed, 30 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/app/test/Makefile b/app/test/Makefile\nindex 7e4d484..5ca5c0b 100644\n--- a/app/test/Makefile\n+++ b/app/test/Makefile\n@@ -71,9 +71,6 @@ SRCS-y += test.c\n SRCS-y += resource.c\n SRCS-y += test_resource.c\n $(eval $(call linked_resource,test_resource_c,resource.c))\n-$(eval $(call linked_tar_resource,test_resource_tar,test_resource.c))\n-SRCS-y += test_pci.c\n-$(eval $(call linked_tar_resource,test_pci_sysfs,test_pci_sysfs))\n SRCS-y += test_prefetch.c\n SRCS-y += test_byteorder.c\n SRCS-y += test_per_lcore.c\n@@ -88,6 +85,13 @@ SRCS-y += test_ring.c\n SRCS-y += test_ring_perf.c\n SRCS-y += test_pmd_perf.c\n \n+ifeq ($(CONFIG_RTE_APP_TEST_RESOURCE_TAR),y)\n+$(eval $(call linked_tar_resource,test_resource_tar,test_resource.c))\n+SRCS-y += test_pci.c\n+$(eval $(call linked_tar_resource,test_pci_sysfs,test_pci_sysfs))\n+LDLIBS += -larchive\n+endif\n+\n ifeq ($(CONFIG_RTE_LIBRTE_TABLE),y)\n SRCS-y += test_table.c\n SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += test_table_pipeline.c\n@@ -194,7 +198,6 @@ CFLAGS += $(WERROR_FLAGS)\n CFLAGS += -D_GNU_SOURCE\n \n LDLIBS += -lm\n-LDLIBS += -larchive\n \n # Disable VTA for memcpy test\n ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)\ndiff --git a/app/test/resource.c b/app/test/resource.c\nindex 8c42eea..0e2b62c 100644\n--- a/app/test/resource.c\n+++ b/app/test/resource.c\n@@ -33,8 +33,6 @@\n \n #include <stdio.h>\n #include <string.h>\n-#include <archive.h>\n-#include <archive_entry.h>\n #include <errno.h>\n #include <sys/queue.h>\n \n@@ -97,6 +95,10 @@ int resource_fwrite_file(const struct resource *r, const char *fname)\n \treturn ret;\n }\n \n+#ifdef RTE_APP_TEST_RESOURCE_TAR\n+#include <archive.h>\n+#include <archive_entry.h>\n+\n static int do_copy(struct archive *r, struct archive *w)\n {\n \tconst void *buf;\n@@ -295,6 +297,8 @@ fail:\n \treturn -1;\n }\n \n+#endif /* RTE_APP_TEST_RESOURCE_TAR */\n+\n void resource_register(struct resource *r)\n {\n \tTAILQ_INSERT_TAIL(&resource_list, r, next);\ndiff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c\nindex 4dfe418..f66b68f 100644\n--- a/app/test/test_mp_secondary.c\n+++ b/app/test/test_mp_secondary.c\n@@ -245,6 +245,7 @@ run_object_creation_tests(void)\n \tprintf(\"# Checked rte_lpm_create() OK\\n\");\n #endif\n \n+#ifdef RTE_APP_TEST_RESOURCE_TAR\n \t/* Run a test_pci call */\n \tif (test_pci() != 0) {\n \t\tprintf(\"PCI scan failed in secondary\\n\");\n@@ -252,6 +253,7 @@ run_object_creation_tests(void)\n \t\t\treturn -1;\n \t} else\n \t\tprintf(\"PCI scan succeeded in secondary\\n\");\n+#endif\n \n \treturn 0;\n }\n@@ -266,9 +268,11 @@ test_mp_secondary(void)\n {\n \tif (rte_eal_process_type() == RTE_PROC_PRIMARY) {\n \t\tif (!test_pci_run) {\n+#ifdef RTE_APP_TEST_RESOURCE_TAR\n \t\t\tprintf(\"=== Running pre-requisite test of test_pci\\n\");\n \t\t\ttest_pci();\n \t\t\tprintf(\"=== Requisite test done\\n\");\n+#endif\n \t\t}\n \t\treturn run_secondary_instances();\n \t}\ndiff --git a/app/test/test_resource.c b/app/test/test_resource.c\nindex 1e85040..39a6468 100644\n--- a/app/test/test_resource.c\n+++ b/app/test/test_resource.c\n@@ -85,6 +85,7 @@ static int test_resource_c(void)\n \treturn 0;\n }\n \n+#ifdef RTE_APP_TEST_RESOURCE_TAR\n REGISTER_LINKED_RESOURCE(test_resource_tar);\n \n static int test_resource_tar(void)\n@@ -111,6 +112,8 @@ static int test_resource_tar(void)\n \treturn 0;\n }\n \n+#endif /* RTE_APP_TEST_RESOURCE_TAR */\n+\n static int test_resource(void)\n {\n \tif (test_resource_dpdk())\n@@ -119,8 +122,10 @@ static int test_resource(void)\n \tif (test_resource_c())\n \t\treturn -1;\n \n+#ifdef RTE_APP_TEST_RESOURCE_TAR\n \tif (test_resource_tar())\n \t\treturn -1;\n+#endif /* RTE_APP_TEST_RESOURCE_TAR */\n \n \treturn 0;\n }\ndiff --git a/config/common_base b/config/common_base\nindex 47c26f6..b9ba405 100644\n--- a/config/common_base\n+++ b/config/common_base\n@@ -546,6 +546,7 @@ CONFIG_RTE_INSECURE_FUNCTION_WARNING=n\n # Compile the test application\n #\n CONFIG_RTE_APP_TEST=y\n+CONFIG_RTE_APP_TEST_RESOURCE_TAR=n\n \n #\n # Compile the PMD test application\ndiff --git a/doc/guides/linux_gsg/sys_reqs.rst b/doc/guides/linux_gsg/sys_reqs.rst\nindex 959709e..b321544 100644\n--- a/doc/guides/linux_gsg/sys_reqs.rst\n+++ b/doc/guides/linux_gsg/sys_reqs.rst\n@@ -101,6 +101,9 @@ Compilation of the DPDK\n *   libpcap headers and libraries (libpcap-devel) to compile and use the libpcap-based poll-mode driver.\n     This driver is disabled by default and can be enabled by setting ``CONFIG_RTE_LIBRTE_PMD_PCAP=y`` in the build time config file.\n \n+*   libarchive headers and library are needed for some unit tests using tar to get their resources.\n+\n+\n Running DPDK Applications\n -------------------------\n \ndiff --git a/scripts/test-build.sh b/scripts/test-build.sh\nindex 48539c1..9a11f94 100755\n--- a/scripts/test-build.sh\n+++ b/scripts/test-build.sh\n@@ -35,6 +35,7 @@ default_path=$PATH\n # Load config options:\n # - AESNI_MULTI_BUFFER_LIB_PATH\n # - DPDK_BUILD_TEST_CONFIGS (defconfig1+option1+option2 defconfig2)\n+# - DPDK_DEP_ARCHIVE\n # - DPDK_DEP_CFLAGS\n # - DPDK_DEP_LDFLAGS\n # - DPDK_DEP_MOFED (y/[n])\n@@ -111,6 +112,7 @@ reset_env ()\n {\n \texport PATH=$default_path\n \tunset CROSS\n+\tunset DPDK_DEP_ARCHIVE\n \tunset DPDK_DEP_CFLAGS\n \tunset DPDK_DEP_LDFLAGS\n \tunset DPDK_DEP_MOFED\n@@ -149,6 +151,8 @@ config () # <directory> <target> <options>\n \t\tsed -ri         's,(PCI_CONFIG=)n,\\1y,' $1/.config\n \t\tsed -ri    's,(LIBRTE_IEEE1588=)n,\\1y,' $1/.config\n \t\tsed -ri             's,(BYPASS=)n,\\1y,' $1/.config\n+\t\ttest \"$DPDK_DEP_ARCHIVE\" != y || \\\n+\t\tsed -ri       's,(RESOURCE_TAR=)n,\\1y,' $1/.config\n \t\ttest \"$DPDK_DEP_MOFED\" != y || \\\n \t\tsed -ri           's,(MLX._PMD=)n,\\1y,' $1/.config\n \t\ttest \"$DPDK_DEP_SZE\" != y || \\\n",
    "prefixes": [
        "dpdk-dev"
    ]
}