get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 127175,
    "url": "http://patches.dpdk.org/api/patches/127175/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230522131740.30043-6-liudongdong3@huawei.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": "<20230522131740.30043-6-liudongdong3@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230522131740.30043-6-liudongdong3@huawei.com",
    "date": "2023-05-22T13:17:40",
    "name": "[v2,5/5] net/hns3: add Tx/Rx descriptor logs",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "1b041b3e611939c500a423be4b60b2f068b93dc6",
    "submitter": {
        "id": 2718,
        "url": "http://patches.dpdk.org/api/people/2718/?format=api",
        "name": "Dongdong Liu",
        "email": "liudongdong3@huawei.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230522131740.30043-6-liudongdong3@huawei.com/mbox/",
    "series": [
        {
            "id": 28114,
            "url": "http://patches.dpdk.org/api/series/28114/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=28114",
            "date": "2023-05-22T13:17:35",
            "name": "net/hns3: add some features and bugfixes",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/28114/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/127175/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/127175/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 EDB5042B71;\n\tMon, 22 May 2023 15:20:31 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C9AD842D5F;\n\tMon, 22 May 2023 15:20:09 +0200 (CEST)",
            "from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255])\n by mails.dpdk.org (Postfix) with ESMTP id 01ED042D59;\n Mon, 22 May 2023 15:20:08 +0200 (CEST)",
            "from kwepemi500017.china.huawei.com (unknown [172.30.72.54])\n by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4QPycT0pftz18LGk;\n Mon, 22 May 2023 21:15:37 +0800 (CST)",
            "from localhost.localdomain (10.28.79.22) by\n kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2507.23; Mon, 22 May 2023 21:20:03 +0800"
        ],
        "From": "Dongdong Liu <liudongdong3@huawei.com>",
        "To": "<dev@dpdk.org>, <ferruh.yigit@amd.com>, <thomas@monjalon.net>,\n <andrew.rybchenko@oktetlabs.ru>, <fengchengwen@huawei.com>",
        "CC": "<stable@dpdk.org>, <lihuisong@huawei.com>, <liudongdong3@huawei.com>,\n <yisen.zhuang@huawei.com>, <huangdengdui@huawei.com>",
        "Subject": "[PATCH v2 5/5] net/hns3: add Tx/Rx descriptor logs",
        "Date": "Mon, 22 May 2023 21:17:40 +0800",
        "Message-ID": "<20230522131740.30043-6-liudongdong3@huawei.com>",
        "X-Mailer": "git-send-email 2.22.0",
        "In-Reply-To": "<20230522131740.30043-1-liudongdong3@huawei.com>",
        "References": "<20230518112944.32276-1-liudongdong3@huawei.com>\n <20230522131740.30043-1-liudongdong3@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.28.79.22]",
        "X-ClientProxiedBy": "dggems703-chm.china.huawei.com (10.3.19.180) To\n kwepemi500017.china.huawei.com (7.221.188.110)",
        "X-CFilter-Loop": "Reflected",
        "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": "From: Dengdui Huang <huangdengdui@huawei.com>\n\nAdd Tx/Rx descriptor logs, controlled by 'RTE_ETHDEV_DEBUG_RX/TX'\ncompile time flag with 'pmd.net.hns3.rx/tx' log type.\n\nSigned-off-by: Dengdui Huang <huangdengdui@huawei.com>\nSigned-off-by: Dongdong Liu <liudongdong3@huawei.com>\n---\n drivers/net/hns3/hns3_ethdev.c |  6 ++++++\n drivers/net/hns3/hns3_logs.h   | 18 ++++++++++++++++++\n drivers/net/hns3/hns3_rxtx.c   |  4 ++++\n drivers/net/hns3/hns3_rxtx.h   | 29 +++++++++++++++++++++++++++++\n 4 files changed, 57 insertions(+)",
    "diff": "diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c\nindex 664226a6ef..07d907d6a1 100644\n--- a/drivers/net/hns3/hns3_ethdev.c\n+++ b/drivers/net/hns3/hns3_ethdev.c\n@@ -6625,3 +6625,9 @@ RTE_PMD_REGISTER_PARAM_STRING(net_hns3,\n \t\tHNS3_DEVARG_MBX_TIME_LIMIT_MS \"=<uint16> \");\n RTE_LOG_REGISTER_SUFFIX(hns3_logtype_init, init, NOTICE);\n RTE_LOG_REGISTER_SUFFIX(hns3_logtype_driver, driver, NOTICE);\n+#ifdef RTE_ETHDEV_DEBUG_RX\n+RTE_LOG_REGISTER_SUFFIX(hns3_logtype_rx, rx, DEBUG);\n+#endif\n+#ifdef RTE_ETHDEV_DEBUG_TX\n+RTE_LOG_REGISTER_SUFFIX(hns3_logtype_tx, tx, DEBUG);\n+#endif\ndiff --git a/drivers/net/hns3/hns3_logs.h b/drivers/net/hns3/hns3_logs.h\nindex c880f752ab..47d3a13220 100644\n--- a/drivers/net/hns3/hns3_logs.h\n+++ b/drivers/net/hns3/hns3_logs.h\n@@ -31,4 +31,22 @@ extern int hns3_logtype_driver;\n #define hns3_dbg(hw, fmt, args...) \\\n \tPMD_DRV_LOG_RAW(hw, RTE_LOG_DEBUG, fmt \"\\n\", ## args)\n \n+#ifdef RTE_ETHDEV_DEBUG_RX\n+extern int hns3_logtype_rx;\n+#define PMD_RX_LOG(hw, level, fmt, args...)\t\t\t\\\n+\trte_log(RTE_LOG_ ## level, hns3_logtype_rx,\t\"%s %s(): \" fmt \"\\n\", \\\n+\t\t(hw)->data->name, __func__, ## args)\n+#else\n+#define PMD_RX_LOG(hw, level, fmt, args...) do { } while (0)\n+#endif\n+\n+#ifdef RTE_ETHDEV_DEBUG_TX\n+extern int hns3_logtype_tx;\n+#define PMD_TX_LOG(hw, level, fmt, args...)\t\t\t\\\n+\trte_log(RTE_LOG_ ## level, hns3_logtype_tx,\t\"%s %s(): \" fmt \"\\n\", \\\n+\t\t(hw)->data->name, __func__, ## args)\n+#else\n+#define PMD_TX_LOG(hw, level, fmt, args...) do { } while (0)\n+#endif\n+\n #endif /* HNS3_LOGS_H */\ndiff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c\nindex 8c3355bbde..6468da903e 100644\n--- a/drivers/net/hns3/hns3_rxtx.c\n+++ b/drivers/net/hns3/hns3_rxtx.c\n@@ -2618,6 +2618,7 @@ hns3_recv_scattered_pkts(void *rx_queue,\n \t\t */\n \t\trxd = rxdp[(bd_base_info & (1u << HNS3_RXD_VLD_B)) -\n \t\t\t   (1u << HNS3_RXD_VLD_B)];\n+\t\tRX_BD_LOG(&rxq->hns->hw, DEBUG, &rxd);\n \n \t\tnmb = hns3_rx_alloc_buffer(rxq);\n \t\tif (unlikely(nmb == NULL)) {\n@@ -4274,6 +4275,8 @@ hns3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)\n \t\t\t\ttx_next_use = 0;\n \t\t\t\ttx_bak_pkt = txq->sw_ring;\n \t\t\t}\n+\t\t\tif (m_seg != NULL)\n+\t\t\t\tTX_BD_LOG(&txq->hns->hw, DEBUG, desc);\n \n \t\t\ti++;\n \t\t} while (m_seg != NULL);\n@@ -4281,6 +4284,7 @@ hns3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)\n \t\t/* Add end flag for the last Tx Buffer Descriptor */\n \t\tdesc->tx.tp_fe_sc_vld_ra_ri |=\n \t\t\t\t rte_cpu_to_le_16(BIT(HNS3_TXD_FE_B));\n+\t\tTX_BD_LOG(&txq->hns->hw, DEBUG, desc);\n \n \t\t/* Increment bytes counter */\n \t\ttxq->basic_stats.bytes += tx_pkt->pkt_len;\ndiff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h\nindex 7685ac2ea3..b6a6513307 100644\n--- a/drivers/net/hns3/hns3_rxtx.h\n+++ b/drivers/net/hns3/hns3_rxtx.h\n@@ -553,6 +553,35 @@ struct hns3_tx_queue {\n \tbool enabled;           /* indicate if Tx queue has been enabled */\n };\n \n+#define RX_BD_LOG(hw, level, rxdp) \\\n+\tPMD_RX_LOG(hw, level, \"Rx descriptor: \" \\\n+\t\t\"l234_info=%#x pkt_len=%u size=%u rss_hash=%#x fd_id=%u vlan_tag=%u \" \\\n+\t\t\"o_dm_vlan_id_fb=%#x ot_vlan_tag=%u bd_base_info=%#x\", \\\n+\t\trte_le_to_cpu_32((rxdp)->rx.l234_info), \\\n+\t\trte_le_to_cpu_16((rxdp)->rx.pkt_len), \\\n+\t\trte_le_to_cpu_16((rxdp)->rx.size), \\\n+\t\trte_le_to_cpu_32((rxdp)->rx.rss_hash), \\\n+\t\trte_le_to_cpu_16((rxdp)->rx.fd_id), \\\n+\t\trte_le_to_cpu_16((rxdp)->rx.vlan_tag), \\\n+\t\trte_le_to_cpu_16((rxdp)->rx.o_dm_vlan_id_fb), \\\n+\t\trte_le_to_cpu_16((rxdp)->rx.ot_vlan_tag), \\\n+\t\trte_le_to_cpu_32((rxdp)->rx.bd_base_info))\n+\n+#define TX_BD_LOG(hw, level, txdp) \\\n+\tPMD_TX_LOG(hw, level, \"Tx descriptor: \" \\\n+\t\t\"vlan_tag=%u send_size=%u type_cs_vlan_tso_len=%#x outer_vlan_tag=%u \" \\\n+\t\t\"tv=%#x ol_type_vlan_len_msec=%#x paylen_fd_dop_ol4cs=%#x \" \\\n+\t\t\"tp_fe_sc_vld_ra_ri=%#x ckst_mss=%u\", \\\n+\t\trte_le_to_cpu_16((txdp)->tx.vlan_tag), \\\n+\t\trte_le_to_cpu_16((txdp)->tx.send_size), \\\n+\t\trte_le_to_cpu_32((txdp)->tx.type_cs_vlan_tso_len), \\\n+\t\trte_le_to_cpu_16((txdp)->tx.outer_vlan_tag), \\\n+\t\trte_le_to_cpu_16((txdp)->tx.tv), \\\n+\t\trte_le_to_cpu_32((txdp)->tx.ol_type_vlan_len_msec), \\\n+\t\trte_le_to_cpu_32((txdp)->tx.paylen_fd_dop_ol4cs), \\\n+\t\trte_le_to_cpu_16((txdp)->tx.tp_fe_sc_vld_ra_ri), \\\n+\t\trte_le_to_cpu_16((txdp)->tx.ckst_mss))\n+\n #define HNS3_GET_TX_QUEUE_PEND_BD_NUM(txq) \\\n \t\t((txq)->nb_tx_desc - 1 - (txq)->tx_bd_ready)\n \n",
    "prefixes": [
        "v2",
        "5/5"
    ]
}