get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 128871,
    "url": "http://patchwork.dpdk.org/api/patches/128871/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230620170728.74117-2-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-2-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230620170728.74117-2-bruce.richardson@intel.com",
    "date": "2023-06-20T17:07:27",
    "name": "[v2,1/2] doc/contributing: provide coding details for dynamic logging",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b5b34f74f98ea4e232e9a39716d749e3084bcb42",
    "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-2-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/128871/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/128871/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 1FAFC42D0A;\n\tTue, 20 Jun 2023 19:08:02 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 76ACF42BFE;\n\tTue, 20 Jun 2023 19:07:59 +0200 (CEST)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by mails.dpdk.org (Postfix) with ESMTP id 5855542BAC\n for <dev@dpdk.org>; Tue, 20 Jun 2023 19:07:58 +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:44 -0700",
            "from silpixa00401385.ir.intel.com ([10.237.214.165])\n by orsmga006.jf.intel.com with ESMTP; 20 Jun 2023 10:07:42 -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=1687280878; x=1718816878;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=bV8QoI2hEFFp0fRjFSulknvE0uE1KzAfCTCULJVcp94=;\n b=eKjnK6n4n4tFyoqbIheXAo2vQsK4y69cWAGLoUVHL8yz3iFUNpTQOVnR\n fHSWg+8+8qHotAfzuiM6+lKrc7sfQ7Z6N9w1BLXM3Gx5roffh/REC8ciV\n MGGvSUWshZ3PZRnOqVs6tIdp/+QpzZucjdjy1wCTgZBpS6dKLjuQw/ulL\n +siFYtrB17nyr/4iyVzW/HwT54ID+YQTmAN2O1D+X9IMOq4Gjllvphkko\n 9BCO+YKLkQT8mKn2oz7NjrjYTP6wv8JmNWadPI88QTaYP/LaBCgA0Ea9r\n nMfdL4+LEILdbcYdKkgxOLbAF43oOB/x5xT9tz+hd/+LfsO5kITW+GeVj w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10747\"; a=\"425877779\"",
            "E=Sophos;i=\"6.00,257,1681196400\"; d=\"scan'208\";a=\"425877779\"",
            "E=McAfee;i=\"6600,9927,10747\"; a=\"691507579\"",
            "E=Sophos;i=\"6.00,257,1681196400\"; d=\"scan'208\";a=\"691507579\""
        ],
        "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 1/2] doc/contributing: provide coding details for dynamic\n logging",
        "Date": "Tue, 20 Jun 2023 18:07:27 +0100",
        "Message-Id": "<20230620170728.74117-2-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-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": "While the section on dynamic logging in the contributors guide covered\nthe details of the logging naming scheme, it failed to cover exactly how\nthe component developer, i.e. the contributor, could actually use\ndynamic logging in their component.\n\nFix this by splitting the details of the naming scheme into a separate\nsubsection, and adding to the introduction on logging, a recommendation\n(and example) to use RTE_LOG_REGISTER_DEFAULT.\n\nSimilarly, when discussing specialization, include a reference to the\nRTE_LOG_REGISTER_SUFFIX macro.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n doc/guides/contributing/coding_style.rst | 17 +++++++++++++++++\n lib/cfgfile/rte_cfgfile.c                |  2 ++\n 2 files changed, 19 insertions(+)",
    "diff": "diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst\nindex 89db6260cf..307c7deb9a 100644\n--- a/doc/guides/contributing/coding_style.rst\n+++ b/doc/guides/contributing/coding_style.rst\n@@ -803,6 +803,21 @@ logging of a particular topic, the ``--log-level`` parameter can be provided\n to EAL, which will change the log level. DPDK code can register topics,\n which allows the user to adjust the log verbosity for that specific topic.\n \n+To register a library or driver for dynamic logging,\n+using the standardized naming scheme described below,\n+use ``RTE_LOG_REGISTER_DEFAULT`` macro to define a log-type variable inside your component's main C file.\n+Thereafter, it is usual to define a macro or macros inside your component to make logging more convenient.\n+\n+For example, the ``rte_cfgfile`` library defines:\n+\n+.. literalinclude:: ../../../lib/cfgfile/rte_cfgfile.c\n+    :language: c\n+    :start-after: Setting up dynamic logging 8<\n+    :end-before: >8 End of setting up dynamic logging\n+\n+Dynamic Logging Naming Scheme\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n In general, the naming scheme is as follows: ``type.section.name``\n \n  * Type is the type of component, where ``lib``, ``pmd``, ``bus`` and ``user``\n@@ -837,6 +852,8 @@ A specialization looks like this:\n  * Initialization output: ``type.section.name.init``\n  * PF/VF mailbox output: ``type.section.name.mbox``\n \n+These specializations are created using the ``RTE_LOG_REGISTER_SUFFIX`` macro.\n+\n A real world example is the i40e poll mode driver which exposes two\n specializations, one for initialization ``pmd.net.i40e.init`` and the other for\n the remaining driver logs ``pmd.net.i40e.driver``.\ndiff --git a/lib/cfgfile/rte_cfgfile.c b/lib/cfgfile/rte_cfgfile.c\nindex 9fa7d010ef..eefba6e408 100644\n--- a/lib/cfgfile/rte_cfgfile.c\n+++ b/lib/cfgfile/rte_cfgfile.c\n@@ -27,11 +27,13 @@ struct rte_cfgfile {\n \tstruct rte_cfgfile_section *sections;\n };\n \n+/* Setting up dynamic logging 8< */\n RTE_LOG_REGISTER_DEFAULT(cfgfile_logtype, INFO);\n \n #define CFG_LOG(level, fmt, args...)\t\t\t\t\t\\\n \trte_log(RTE_LOG_ ## level, cfgfile_logtype, \"%s(): \" fmt \"\\n\",\t\\\n \t\t__func__, ## args)\n+/* >8 End of setting up dynamic logging */\n \n /** when we resize a file structure, how many extra entries\n  * for new sections do we add in */\n",
    "prefixes": [
        "v2",
        "1/2"
    ]
}