Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/7295/?format=api
https://patches.dpdk.org/api/patches/7295/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1443603881-4700-4-git-send-email-remy.horton@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": "<1443603881-4700-4-git-send-email-remy.horton@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1443603881-4700-4-git-send-email-remy.horton@intel.com", "date": "2015-09-30T09:04:41", "name": "[dpdk-dev,v2,3/3] docs: add keep alive sample app guide", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "fc2c9238803ff117c387c23bd660bf891cd026b7", "submitter": { "id": 326, "url": "https://patches.dpdk.org/api/people/326/?format=api", "name": "Remy Horton", "email": "remy.horton@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1443603881-4700-4-git-send-email-remy.horton@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/7295/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/7295/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 87F3A8DA3;\n\tWed, 30 Sep 2015 11:05:10 +0200 (CEST)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id CF3F18D36\n\tfor <dev@dpdk.org>; Wed, 30 Sep 2015 11:05:02 +0200 (CEST)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby orsmga103.jf.intel.com with ESMTP; 30 Sep 2015 02:04:45 -0700", "from rhorton-mobl.ger.corp.intel.com (HELO localhost.ir.intel.com)\n\t([163.33.229.80])\n\tby fmsmga002.fm.intel.com with ESMTP; 30 Sep 2015 02:04:45 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.17,611,1437462000\"; d=\"scan'208\";a=\"816043145\"", "From": "Remy Horton <remy.horton@intel.com>", "To": "dev@dpdk.org", "Date": "Wed, 30 Sep 2015 10:04:41 +0100", "Message-Id": "<1443603881-4700-4-git-send-email-remy.horton@intel.com>", "X-Mailer": "git-send-email 1.9.3", "In-Reply-To": "<1443603881-4700-1-git-send-email-remy.horton@intel.com>", "References": "<1443603881-4700-1-git-send-email-remy.horton@intel.com>", "Cc": "John J Browne <john.j.browne@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 3/3] docs: add keep alive sample app guide", "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": "Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>\nSigned-off-by: John J Browne <john.j.browne@intel.com>\nSigned-off-by: Remy Horton <remy.horton@intel.com>\n---\n doc/guides/sample_app_ug/index.rst | 1 +\n doc/guides/sample_app_ug/keep_alive.rst | 191 ++++++++++++++++++++++++++++++++\n 2 files changed, 192 insertions(+)\n create mode 100644 doc/guides/sample_app_ug/keep_alive.rst", "diff": "diff --git a/doc/guides/sample_app_ug/index.rst b/doc/guides/sample_app_ug/index.rst\nindex 9beedd9..11b8b14 100644\n--- a/doc/guides/sample_app_ug/index.rst\n+++ b/doc/guides/sample_app_ug/index.rst\n@@ -49,6 +49,7 @@ Sample Applications User Guide\n ipv4_multicast\n ip_reassembly\n kernel_nic_interface\n+ keep_alive\n l2_forward_job_stats\n l2_forward_real_virtual\n l3_forward\ndiff --git a/doc/guides/sample_app_ug/keep_alive.rst b/doc/guides/sample_app_ug/keep_alive.rst\nnew file mode 100644\nindex 0000000..080811b\n--- /dev/null\n+++ b/doc/guides/sample_app_ug/keep_alive.rst\n@@ -0,0 +1,191 @@\n+\n+.. BSD LICENSE\n+ Copyright(c) 2015 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+Keep Alive Sample Application\n+=============================\n+\n+The Keep Alive application is a simple example of a\n+heartbeat/watchdog for packet processing cores. It demonstrates how\n+to detect 'failed' DPDK cores and notify a fault management entity\n+of this failure. Its purpose is to ensure the failure of the core\n+does not result in a fault that is not detectable by a management\n+entity.\n+\n+\n+Overview\n+--------\n+\n+The application demonstrates how to protect against 'silent outages'\n+on packet processing cores. A Keep Alive Monitor Agent Core (master)\n+monitors the state of packet processing cores (worker cores) by\n+dispatching pings at a regular time interval (default is 5ms) and\n+monitoring the state of the cores. Cores states are: Alive, MIA, Dead\n+or Buried. MIA indicates a missed ping, and Dead indicates two missed\n+pings within the specified time interval. When a core is Dead, a\n+callback function is invoked to restart the packet processing core;\n+A real life application might use this callback function to notify a\n+higher level fault management entity of the core failure in order to\n+take the appropriate corrective action.\n+\n+Note: Only the worker cores are monitored. A local (on the host) mechanism\n+or agent to supervise the Keep Alive Monitor Agent Core DPDK core is required\n+to detect its failure.\n+\n+Note: This application is based on the L2 forwarding application. As\n+such, the initialization and run-time paths are very similar to those\n+of the L2 forwarding application.\n+\n+Compiling the Application\n+-------------------------\n+\n+To compile the application:\n+\n+#. Go to the sample application directory:\n+\n+ .. code-block:: console\n+\n+ export RTE_SDK=/path/to/rte_sdk cd ${RTE_SDK}/examples/keep_alive\n+\n+#. Set the target (a default target is used if not specified). For example:\n+\n+ .. code-block:: console\n+\n+ export RTE_TARGET=x86_64-native-linuxapp-gcc\n+\n+ See the *DPDK Getting Started Guide* for possible RTE_TARGET values.\n+\n+#. Build the application:\n+\n+ .. code-block:: console\n+\n+ make\n+\n+Running the Application\n+-----------------------\n+\n+The application has a number of command line options:\n+\n+.. code-block:: console\n+\n+ ./build/l2fwd-keepalive [EAL options] \\\n+ -- -p PORTMASK [-q NQ] [-K PERIOD] [-T PERIOD]\n+\n+where,\n+\n+* ``p PORTMASK``: A hexadecimal bitmask of the ports to configure\n+\n+* ``q NQ``: A number of queues (=ports) per lcore (default is 1)\n+\n+* ``K PERIOD``: Heartbeat check period in ms(5ms default; 86400 max)\n+\n+* ``T PERIOD``: statistics will be refreshed each PERIOD seconds (0 to\n+ disable, 10 default, 86400 maximum).\n+\n+To run the application in linuxapp environment with 4 lcores, 16 ports\n+8 RX queues per lcore and a ping interval of 10ms, issue the command:\n+\n+.. code-block:: console\n+\n+ ./build/l2fwd-keepalive -c f -n 4 -- -q 8 -p ffff -K 10\n+\n+Refer to the *DPDK Getting Started Guide* for general information on\n+running applications and the Environment Abstraction Layer (EAL)\n+options.\n+\n+\n+Explanation\n+-----------\n+\n+The following sections provide some explanation of the The\n+Keep-Alive/'Liveliness' conceptual scheme. As mentioned in the\n+overview section, the initialization and run-time paths are very\n+similar to those of the L2 forwarding application (see Chapter 9\n+\"L2 Forwarding Sample Application (in Real and Virtualized\n+Environments)\" for more information).\n+\n+The Keep-Alive/'Liveliness' conceptual scheme:\n+\n+* A Keep- Alive Agent Runs every N Milliseconds.\n+\n+* DPDK Cores respond to the keep-alive agent.\n+\n+* If keep-alive agent detects time-outs, it notifies the\n+ fault management entity through a callback function.\n+\n+The following sections provide some explanation of the code aspects\n+that are specific to the Keep Alive sample application.\n+\n+The heartbeat functionality is initialized with a struct\n+rte_heartbeat and the callback function to invoke in the\n+case of a timeout.\n+\n+.. code-block:: c\n+\n+ rte_global_keepalive_info = rte_keepalive_create(&dead_core, NULL);\n+ if (rte_global_hbeat_info == NULL)\n+ rte_exit(EXIT_FAILURE, \"keepalive_create() failed\");\n+\n+The function that issues the pings hbeat_dispatch_pings()\n+is configured to run every check_period milliseconds.\n+\n+.. code-block:: c\n+\n+ if (rte_timer_reset(&hb_timer,\n+ (check_period * rte_get_timer_hz()) / 1000,\n+ PERIODICAL,\n+ rte_lcore_id(),\n+ &hbeat_dispatch_pings, rte_global_keepalive_info\n+ ) != 0 )\n+ rte_exit(EXIT_FAILURE, \"Keepalive setup failure.\\n\");\n+\n+The rest of the initialization and run-time path follows\n+the same paths as the the L2 forwarding application. The only\n+addition to the main processing loop is the mark alive\n+functionality and the example random failures.\n+\n+.. code-block:: c\n+\n+ rte_keepalive_mark_alive(&rte_global_hbeat_info);\n+ cur_tsc = rte_rdtsc();\n+\n+ /* Die randomly within 7 secs for demo purposes.. */\n+ if (cur_tsc - tsc_initial > tsc_lifetime)\n+ break;\n+\n+The rte_keepalive_mark_alive function simply sets the core state to alive.\n+\n+.. code-block:: c\n+\n+ static inline void\n+ rte_keepalive_mark_alive(struct rte_heartbeat *keepcfg)\n+ {\n+ keepcfg->state_flags[rte_lcore_id()] = 1;\n+ }\n", "prefixes": [ "dpdk-dev", "v2", "3/3" ] }{ "id": 7295, "url": "