get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 129667,
    "url": "http://patchwork.dpdk.org/api/patches/129667/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230720110540.231342-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": "<20230720110540.231342-2-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230720110540.231342-2-bruce.richardson@intel.com",
    "date": "2023-07-20T11:05:39",
    "name": "[v4,1/2] doc/contributing: provide coding details for dynamic logging",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "928f37ff5fd7864a018aea646ba3b89af9cd50db",
    "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/20230720110540.231342-2-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 28986,
            "url": "http://patchwork.dpdk.org/api/series/28986/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28986",
            "date": "2023-07-20T11:05:38",
            "name": "Improve docs on getting info on running process",
            "version": 4,
            "mbox": "http://patchwork.dpdk.org/series/28986/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/129667/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/129667/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 3596E42EC5;\n\tThu, 20 Jul 2023 13:05:54 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 1671C40F17;\n\tThu, 20 Jul 2023 13:05:50 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by mails.dpdk.org (Postfix) with ESMTP id ADAB940DF5\n for <dev@dpdk.org>; Thu, 20 Jul 2023 13:05:47 +0200 (CEST)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 20 Jul 2023 04:05:46 -0700",
            "from silpixa00401385.ir.intel.com ([10.237.214.156])\n by orsmga003.jf.intel.com with ESMTP; 20 Jul 2023 04:05: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=1689851147; x=1721387147;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=sI1ALSjU26ydmkWNTxFjCcL6lvY/iXK9r4vmYGA0vBQ=;\n b=LINd6GKmLE9Rvx3v9Q6GUXYCPDTBSO0NB9Qs+/+LlpNCKnYleNS9oWgA\n ANJOi1Ew0ku2UhXFjV54/Hrcx6+hA88wBQWzaBFo8VZ2/dPlPtEl3ik1n\n KcCWEDKRUAPGRTnKfxco2m2jjddKfv5kxUtUJns/saTKIgxwfAEGexMn2\n 2s8thMaKklkXtRYi2VCQRv4pQ9L1pZCJ8l1kvl/TZB6lmBvSvzPe5hm2M\n 4fObawnJKLomKD2lvA0LS9g8x2CaO6tp2R6vqnyU+PAaMpiuduOgigqzf\n Jjadrb5awPxXhXZvIntAXztK/UkgTCcWx3Rm2bb4B+yeWmf34X4mF8IyQ g==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10776\"; a=\"366731410\"",
            "E=Sophos;i=\"6.01,218,1684825200\"; d=\"scan'208\";a=\"366731410\"",
            "E=McAfee;i=\"6600,9927,10776\"; a=\"674650218\"",
            "E=Sophos;i=\"6.01,218,1684825200\"; d=\"scan'208\";a=\"674650218\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Bruce Richardson <bruce.richardson@intel.com>,\n Chengwen Feng <fengchengwen@huawei.com>,\n David Marchand <david.marchand@redhat.com>",
        "Subject": "[PATCH v4 1/2] doc/contributing: provide coding details for dynamic\n logging",
        "Date": "Thu, 20 Jul 2023 12:05:39 +0100",
        "Message-Id": "<20230720110540.231342-2-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.39.2",
        "In-Reply-To": "<20230720110540.231342-1-bruce.richardson@intel.com>",
        "References": "<20230613143355.77914-1-bruce.richardson@intel.com>\n <20230720110540.231342-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 | 22 ++++++++++++++++++++++\n lib/cfgfile/rte_cfgfile.c                |  2 ++\n 2 files changed, 24 insertions(+)",
    "diff": "diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst\nindex 00d6270624..383942a601 100644\n--- a/doc/guides/contributing/coding_style.rst\n+++ b/doc/guides/contributing/coding_style.rst\n@@ -803,6 +803,26 @@ 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+.. note::\n+\n+   The statically-defined log types defined in ``rte_log.h`` are for legacy components,\n+   and they will likely be removed in a future release.\n+   Do not add new entries to this file.\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 +857,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": [
        "v4",
        "1/2"
    ]
}