Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/26545/?format=api
https://patches.dpdk.org/api/patches/26545/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20170706145234.64919-1-keith.wiles@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": "<20170706145234.64919-1-keith.wiles@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20170706145234.64919-1-keith.wiles@intel.com", "date": "2017-07-06T14:52:34", "name": "[dpdk-dev] usertools: script to output version string", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "34f07b02ea5da945c5bbf6bda038b4fdec007d0d", "submitter": { "id": 166, "url": "https://patches.dpdk.org/api/people/166/?format=api", "name": "Wiles, Keith", "email": "keith.wiles@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20170706145234.64919-1-keith.wiles@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/26545/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/26545/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 3E21E58EC;\n\tThu, 6 Jul 2017 16:52:50 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 059425689\n\tfor <dev@dpdk.org>; Thu, 6 Jul 2017 16:52:47 +0200 (CEST)", "from orsmga004.jf.intel.com ([10.7.209.38])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t06 Jul 2017 07:52:46 -0700", "from amende4x-mobl.amr.corp.intel.com ([10.254.48.211])\n\tby orsmga004.jf.intel.com with ESMTP; 06 Jul 2017 07:52:46 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.40,317,1496127600\"; d=\"scan'208\";a=\"105177888\"", "From": "Keith Wiles <keith.wiles@intel.com>", "To": "dev@dpdk.org", "Date": "Thu, 6 Jul 2017 09:52:34 -0500", "Message-Id": "<20170706145234.64919-1-keith.wiles@intel.com>", "X-Mailer": "git-send-email 2.10.1", "Subject": "[dpdk-dev] [PATCH] usertools: script to output version string", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <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": "Signed-off-by: Keith Wiles <keith.wiles@intel.com>\n---\n usertools/dpdk-version.sh | 124 ++++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 124 insertions(+)\n create mode 100755 usertools/dpdk-version.sh", "diff": "diff --git a/usertools/dpdk-version.sh b/usertools/dpdk-version.sh\nnew file mode 100755\nindex 000000000..7b794bcd6\n--- /dev/null\n+++ b/usertools/dpdk-version.sh\n@@ -0,0 +1,124 @@\n+#!/bin/bash\n+#\n+# BSD LICENSE\n+#\n+# Copyright(c) 2017 Intel Corporation. All rights reserved.\n+# All rights reserved.\n+#\n+# Redistribution and use in source and binary forms, with or without\n+# modification, are permitted provided that the following conditions\n+# are met:\n+#\n+# * Redistributions of source code must retain the above copyright\n+# notice, this list of conditions and the following disclaimer.\n+# * Redistributions in binary form must reproduce the above copyright\n+# notice, this list of conditions and the following disclaimer in\n+# the documentation and/or other materials provided with the\n+# distribution.\n+# * Neither the name of Intel Corporation nor the names of its\n+# contributors may be used to endorse or promote products derived\n+# from this software without specific prior written permission.\n+#\n+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+#\n+# Locate the rte_version.h file and parse out the version strings.\n+#\n+# If RTE_SDK is set, then it is used to locate the file. If the\n+# RTE_SDK variable is not set then the current working directory\n+# is used.\n+#\n+# See usage below for more details.\n+#\n+\n+fname=rte_version.h\n+\n+function usage() {\n+\tcat <<EOM\n+ Usage: dpdk-version.sh\n+\n+ Locate the rte_version.h file and parse out the version information.\n+\n+ If RTE_SDK is set, then it is used to locate the file. If the\n+ RTE_SDK variable is not set then the current working directory\n+ is used.\n+\n+ The default output of the version is 'DPDK Version: YY.MM.MINOR'\n+\te.g. 'dpdk-version.sh' gives 'DPDK Version: 17.08.0'\n+\n+ Options: Only one option can be used at a time.\n+\n+ '-h' prints usage messages\n+\n+ '-l' prints out the full version string\n+\te.g. 'dpdk-version.sh -l' gives 'DPDK-17.08.0-rc0'\n+\n+ '-s' prints a shorter version string \n+\te.g. 'dpdk-version.sh -s' gives '17.08.0'\n+\n+ '-m' prints out information is comma delimited format.\n+\te.g. 'dpdk-version.sh -m' give 'DPDK,17,08,0,-rc0'\n+\n+ '-p' prints out a Python readable format of the version.\n+\te.g. 'dpdk-version.sh -m' gives\n+\n+\tversion = {\n+\t\t'prefix': 'DPDK',\n+\t\t'year': '17',\n+\t\t'month': '08',\n+\t\t'minor': '0',\n+\t\t'suffix': '-rc'\n+\t}\n+EOM\n+\texit 1\n+}\n+\n+if [ -z ${RTE_SDK} ] ; then\n+\techo \"*** RTE_SDK is not set, using \"${PWD}\n+\tsdk=${PWD}\n+else\n+\tsdk=${RTE_SDK}\n+fi\n+\n+fpath=${sdk}/lib/librte_eal/common/include/${fname}\n+\n+if [ ! -e ${fpath} ]; then\n+\techo \"File not found @ \"${fpath}\n+\tusage\n+fi\n+\n+PREFIX=`grep \"define RTE_VER_PREFIX\" ${fpath} | cut -d ' ' -f 3 | sed -e 's/\\\"//g'`\n+SUFFIX=`grep \"define RTE_VER_SUFFIX\" ${fpath} | cut -d ' ' -f 3 | sed -e 's/\\\"//g'`\n+\n+YY=`grep \"define RTE_VER_YEAR\" ${fpath} | cut -d ' ' -f 3`\n+MM=`grep \"define RTE_VER_MONTH\" ${fpath} | cut -d ' ' -f 3`\n+MINOR=`grep \"define RTE_VER_MINOR\" ${fpath} | cut -d ' ' -f 3`\n+\n+if [ \"$1\" = \"-h\" ]; then\n+\tusage\n+elif [ \"$1\" = \"-l\" ]; then \n+\techo ${PREFIX}-${YY}.${MM}.${MINOR}${SUFFIX}\n+elif [ \"$1\" = '-s' ]; then\n+\techo ${YY}.${MM}.${MINOR}\n+elif [ \"$1\" = \"-p\" ]; then\n+\techo \"dpdk_version = {\"\n+\techo \" 'prefix': '\"${PREFIX}\"',\"\n+\techo \" 'year': '\"${YY}\"',\"\n+\techo \" 'month': '\"${MM}\"',\"\n+\techo \" 'minor': '\"${MINOR}\"',\"\n+\techo \" 'suffix': '\"${SUFFIX}\"'\"\n+\techo \"}\"\n+elif [ \"$1\" = \"-m\" ]; then\n+\techo \"\"${PREFIX}\",\"${YY}\",\"${MM}\",\"${MINOR}\",\"${SUFFIX}\"\"\n+else\n+\techo \"DPDK Version: \"${YY}.${MM}.${MINOR}\n+fi\n", "prefixes": [ "dpdk-dev" ] }{ "id": 26545, "url": "