get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 128872,
    "url": "http://patchwork.dpdk.org/api/patches/128872/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230620170728.74117-3-bruce.richardson@intel.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": "<20230620170728.74117-3-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230620170728.74117-3-bruce.richardson@intel.com",
    "date": "2023-06-20T17:07:28",
    "name": "[v2,2/2] doc/contributing: guidelines for logging, tracing and telemetry",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "32cc15a2d99695e5df50a6984322e768665d994d",
    "submitter": {
        "id": 20,
        "url": "http://patchwork.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230620170728.74117-3-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 28589,
            "url": "http://patchwork.dpdk.org/api/series/28589/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28589",
            "date": "2023-06-20T17:07:26",
            "name": "Improve docs on getting info on running process",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/28589/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/128872/comments/",
    "check": "warning",
    "checks": "http://patchwork.dpdk.org/api/patches/128872/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 793AC42D0A;\n\tTue, 20 Jun 2023 19:08:08 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 907FC42BDA;\n\tTue, 20 Jun 2023 19:08:02 +0200 (CEST)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by mails.dpdk.org (Postfix) with ESMTP id 4DD3642BAC\n for <dev@dpdk.org>; Tue, 20 Jun 2023 19:07:59 +0200 (CEST)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 20 Jun 2023 10:07:48 -0700",
            "from silpixa00401385.ir.intel.com ([10.237.214.165])\n by orsmga006.jf.intel.com with ESMTP; 20 Jun 2023 10:07:45 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1687280879; x=1718816879;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=EkQHT64sFYdo7uDDEEt9AjuGzpBavJ9Y3OZPfa+pwGg=;\n b=gl1RzBJW3lJ4VlCIVYr5tVcHCUanN34O9V17kwP67TpzzbZm5JrcU1Az\n FcsO8Olti9jocSmOhBzOigYmvgVaqvZjb1s6qbz0hv/nHJsxiG6AJwllX\n 5QMbpEr2ak94wnnAffNp5v7t425GML5LlUdOvL0Oev5kb/ueOLHJVhLzw\n FINqJXLteyxrMUCAmXl++Y6O5agLsEQPvt4wnaNTdNFEHBKLfRlDCK4mB\n S9K5HiSMfQ4KunLjmVA7HAcL28UPx1rjoYc0/ZJqVtRExGPpaiUb+O1Jn\n etY5tIkd/GysMM/zSBQTK/tpb82L3oFeOCvo/uOmwn5FCxCn+nEqXuGwF Q==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10747\"; a=\"425877796\"",
            "E=Sophos;i=\"6.00,257,1681196400\"; d=\"scan'208\";a=\"425877796\"",
            "E=McAfee;i=\"6600,9927,10747\"; a=\"691507615\"",
            "E=Sophos;i=\"6.00,257,1681196400\"; d=\"scan'208\";a=\"691507615\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "stephen@networkplumber.org, mb@smartsharesystems.com,\n ferruh.yigit@amd.com,\n jerinjacobk@gmail.com, Bruce Richardson <bruce.richardson@intel.com>",
        "Subject": "[PATCH v2 2/2] doc/contributing: guidelines for logging,\n tracing and telemetry",
        "Date": "Tue, 20 Jun 2023 18:07:28 +0100",
        "Message-Id": "<20230620170728.74117-3-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.39.2",
        "In-Reply-To": "<20230620170728.74117-1-bruce.richardson@intel.com>",
        "References": "<20230613143355.77914-1-bruce.richardson@intel.com>\n <20230620170728.74117-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "As discussed by DPDK technical board [1], our contributor guide should\ninclude some details as to when to use logging vs tracing vs telemetry\nto provide the end user with information about the running process and\nthe DPDK libraries it uses.\n\n[1] https://mails.dpdk.org/archives/dev/2023-March/265204.html\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\nAcked-by: Morten Brørup <mb@smartsharesystems.com>\n\n---\nV2:\n* Added note about not logging from unused drivers\n* Reworked bullets/sub-bullets on tracing vs debug logs for debugging.\n  - Consensus in replies was that people liked having debug logs for\n    single-use, e.g. init cases.\n  - Kept recommendation for tracing for data-path only\n* Added short discussion of *_dump() functions at end of section\n* Added sentence to indicate that telemetry should be read-only\n* Added mention of common trace format and that other tools are\n  available for it.\n---\n doc/guides/contributing/coding_style.rst |  2 +\n doc/guides/contributing/design.rst       | 47 ++++++++++++++++++++++++\n doc/guides/prog_guide/telemetry_lib.rst  |  2 +\n doc/guides/prog_guide/trace_lib.rst      |  2 +\n 4 files changed, 53 insertions(+)",
    "diff": "diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst\nindex 307c7deb9a..0861305dc6 100644\n--- a/doc/guides/contributing/coding_style.rst\n+++ b/doc/guides/contributing/coding_style.rst\n@@ -794,6 +794,8 @@ Control Statements\n                  /* NOTREACHED */\n          }\n \n+.. _dynamic_logging:\n+\n Dynamic Logging\n ---------------\n \ndiff --git a/doc/guides/contributing/design.rst b/doc/guides/contributing/design.rst\nindex d24a7ff6a0..30104e0bfb 100644\n--- a/doc/guides/contributing/design.rst\n+++ b/doc/guides/contributing/design.rst\n@@ -4,6 +4,53 @@\n Design\n ======\n \n+Runtime Information - Logging, Tracing and Telemetry\n+-------------------------------------------------------\n+\n+It is often desirable to provide information to the end-user as to what is happening to the application at runtime.\n+DPDK provides a number of built-in mechanisms to provide this introspection:\n+\n+* :ref:`Logging<dynamic_logging>`\n+* :ref:`Tracing<trace_library>`\n+* :ref:`Telemetry<telemetry_library>`\n+\n+Each of these has it's own strengths and suitabilities for use within DPDK components.\n+\n+Below are some guidelines for when each should be used:\n+\n+* For reporting error conditions, or other abnormal runtime issues, *logging* should be used.\n+  Depending on the severity of the issue, the appropriate log level, for example,\n+  ``ERROR``, ``WARNING`` or ``NOTICE``, should be used.\n+\n+.. note::\n+\n+    Drivers off all classes, including both bus and device drivers,\n+    should not output any log information if the hardware they support is not present.\n+    This is to avoid any changes in output for existing users when a new driver is added to DPDK. \n+\n+* For component initialization, or other cases where a path through the code is only likely to be taken once,\n+  either *logging* at ``DEBUG`` level or *tracing* may be used, or potentially both.\n+  In the latter case, tracing can provide basic information as to the code path taken,\n+  with debug-level logging providing additional details on internal state,\n+  not possible to emit via tracing.\n+\n+* For a component's data-path, where a path is to be taken multiple times within a short timeframe,\n+  *tracing* should be used.\n+  Since DPDK tracing uses `Common Trace Format <https://diamon.org/ctf/>`_ for its tracing logs,\n+  post-analysis can be done using a range of external tools.\n+\n+* For numerical or statistical data generated by a component, for example, per-packet statistics,\n+  *telemetry* should be used.\n+\n+* For any data where the data may need to be gathered at any point in the execution to help assess the state of the application component,\n+  for example, core configuration, device information, *telemetry* should be used.\n+  Telemetry callbacks should not modify any program state, but be \"read-only\".\n+\n+Many libraries also include a ``rte_<libname>_dump()`` function as part of their API,\n+writing verbose internal details to a given file-handle.\n+New libraries are encouraged to provide such functions where it makes sense to do so,\n+as they provide an additional application-controlled mechanism to get details of the internals of a DPDK component.\n+\n Environment or Architecture-specific Sources\n --------------------------------------------\n \ndiff --git a/doc/guides/prog_guide/telemetry_lib.rst b/doc/guides/prog_guide/telemetry_lib.rst\nindex 32f525a67f..71f8bd735e 100644\n--- a/doc/guides/prog_guide/telemetry_lib.rst\n+++ b/doc/guides/prog_guide/telemetry_lib.rst\n@@ -1,6 +1,8 @@\n ..  SPDX-License-Identifier: BSD-3-Clause\n     Copyright(c) 2020 Intel Corporation.\n \n+.. _telemetry_library:\n+\n Telemetry Library\n =================\n \ndiff --git a/doc/guides/prog_guide/trace_lib.rst b/doc/guides/prog_guide/trace_lib.rst\nindex e5718feddc..a3b8a7c2eb 100644\n--- a/doc/guides/prog_guide/trace_lib.rst\n+++ b/doc/guides/prog_guide/trace_lib.rst\n@@ -1,6 +1,8 @@\n ..  SPDX-License-Identifier: BSD-3-Clause\n     Copyright(C) 2020 Marvell International Ltd.\n \n+.. _trace_library:\n+\n Trace Library\n =============\n \n",
    "prefixes": [
        "v2",
        "2/2"
    ]
}