get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 129633,
    "url": "http://patchwork.dpdk.org/api/patches/129633/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230718164802.110560-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": "<20230718164802.110560-2-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230718164802.110560-2-bruce.richardson@intel.com",
    "date": "2023-07-18T16:48:01",
    "name": "[v3,1/2] doc/contributing: provide coding details for dynamic logging",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "488515d295af48e1bb1aedf23efb10b6eea43576",
    "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/20230718164802.110560-2-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 28968,
            "url": "http://patchwork.dpdk.org/api/series/28968/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28968",
            "date": "2023-07-18T16:48:00",
            "name": "Improve docs on getting info on running process",
            "version": 3,
            "mbox": "http://patchwork.dpdk.org/series/28968/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/129633/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/129633/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 2F62A42EAA;\n\tTue, 18 Jul 2023 18:48:20 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D76F742D79;\n\tTue, 18 Jul 2023 18:48:16 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id 92D0342D74\n for <dev@dpdk.org>; Tue, 18 Jul 2023 18:48:14 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 18 Jul 2023 09:48:14 -0700",
            "from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.14])\n by fmsmga005.fm.intel.com with ESMTP; 18 Jul 2023 09:48:12 -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=1689698894; x=1721234894;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=/2ofA3JKfknlZtOK1GFQ/z+wuWoOPHhm8JuII5YUBMQ=;\n b=XnxdliaIlnbUZGNh3bPBEXvyMaYa0NC/NxDC4L+SFRLCTMsQqENVh3dY\n vrGuRMf+J80k7DL2L5vCK4Ygu/vmtcbKp9fHBNTXigXe+IDPusuJs0hso\n nUvLpCAmUhBkep9QExFmAxsLue7pPEKfdoULX4X4KDjTNn4t6n+O7ku2J\n 1A0YvkeDvTaqqzbWQjWqc60AUvBFJmxzeSp8ODJhmTELa/pSHynA79O++\n 1SL49gjPl4Vg9gSunsL4yFVY7ne0Milax+ufzJOPDxI0cxsE63AElX+NG\n i7m2NusP3tm8SeoDp6MENhE9ax/HCHZf6PI2X02Z4sy3bYgvLSz4vMamO w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10775\"; a=\"345848525\"",
            "E=Sophos;i=\"6.01,214,1684825200\"; d=\"scan'208\";a=\"345848525\"",
            "E=McAfee;i=\"6600,9927,10775\"; a=\"1054367359\"",
            "E=Sophos;i=\"6.01,214,1684825200\"; d=\"scan'208\";a=\"1054367359\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "david.marchand@redhat.com, Bruce Richardson <bruce.richardson@intel.com>,\n Chengwen Feng <fengchengwen@huawei.com>",
        "Subject": "[PATCH v3 1/2] doc/contributing: provide coding details for dynamic\n logging",
        "Date": "Tue, 18 Jul 2023 17:48:01 +0100",
        "Message-Id": "<20230718164802.110560-2-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.39.2",
        "In-Reply-To": "<20230718164802.110560-1-bruce.richardson@intel.com>",
        "References": "<20230613143355.77914-1-bruce.richardson@intel.com>\n <20230718164802.110560-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>\nAcked-by: Chengwen Feng <fengchengwen@huawei.com>\nReviewed-by: David Marchand <david.marchand@redhat.com>\n---\n doc/guides/contributing/coding_style.rst | 16 ++++++++++++++++\n lib/cfgfile/rte_cfgfile.c                |  2 ++\n 2 files changed, 18 insertions(+)",
    "diff": "diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst\nindex 00d6270624..f41f88c632 100644\n--- a/doc/guides/contributing/coding_style.rst\n+++ b/doc/guides/contributing/coding_style.rst\n@@ -803,6 +803,20 @@ 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, 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 +851,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": [
        "v3",
        "1/2"
    ]
}