get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 128621,
    "url": "http://patches.dpdk.org/api/patches/128621/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230613143355.77914-2-bruce.richardson@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20230613143355.77914-2-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230613143355.77914-2-bruce.richardson@intel.com",
    "date": "2023-06-13T14:33:54",
    "name": "[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://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230613143355.77914-2-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 28486,
            "url": "http://patches.dpdk.org/api/series/28486/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=28486",
            "date": "2023-06-13T14:33:53",
            "name": "Improve docs on getting info on running process",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/28486/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/128621/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/128621/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 358D942CAB;\n\tTue, 13 Jun 2023 16:34:22 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2776741611;\n\tTue, 13 Jun 2023 16:34:22 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by mails.dpdk.org (Postfix) with ESMTP id 0EB0D41611\n for <dev@dpdk.org>; Tue, 13 Jun 2023 16:34:19 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 13 Jun 2023 07:34:18 -0700",
            "from silpixa00401385.ir.intel.com ([10.237.214.11])\n by fmsmga005.fm.intel.com with ESMTP; 13 Jun 2023 07:34:15 -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=1686666860; x=1718202860;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=ZzzefauLzEGXgccZl2Z+MVT53ADmYI0KSZupWC/MRV8=;\n b=NcJgNtKcSupK6qLnzaSq5PEmlEMabajHP3bExvSeo5puRmBf160qxz5P\n r1NPiOOTfyhrzhw3i/I+Y4A9ozD6CQnhXPaLr6UJ5T4jSzS/xls4UMqWK\n a9GexOdPLZCbJ3mkGxaN+7U3j6iZutUJw2A/wWGT7SkaV2YwcpD9yvvHY\n z89V0kjMLIyiBS+UxHVORdNVM5HE+L+sRo5xgj1oZebR7sZsectgru7wL\n NpjV9mpoglVnWtns8ZMkzlcSNqDhcRavLTSE27VjFQ0FjMvOC2+U199/n\n 4GBMMxZbTpS7GgRQ9UgsLTgYcONQGmXWEJseA4RHK981NK2aywS9PQd/T Q==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10740\"; a=\"343039780\"",
            "E=Sophos;i=\"6.00,239,1681196400\"; d=\"scan'208\";a=\"343039780\"",
            "E=McAfee;i=\"6600,9927,10740\"; a=\"1041787628\"",
            "E=Sophos;i=\"6.00,239,1681196400\"; d=\"scan'208\";a=\"1041787628\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Bruce Richardson <bruce.richardson@intel.com>",
        "Subject": "[PATCH 1/2] doc/contributing: provide coding details for dynamic\n logging",
        "Date": "Tue, 13 Jun 2023 15:33:54 +0100",
        "Message-Id": "<20230613143355.77914-2-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.39.2",
        "In-Reply-To": "<20230613143355.77914-1-bruce.richardson@intel.com>",
        "References": "<20230613143355.77914-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 00d6270624..f50a78a346 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": [
        "1/2"
    ]
}