get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 136519,
    "url": "http://patchwork.dpdk.org/api/patches/136519/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20240208085956.1741174-4-ndabilpuram@marvell.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": "<20240208085956.1741174-4-ndabilpuram@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240208085956.1741174-4-ndabilpuram@marvell.com",
    "date": "2024-02-08T08:59:47",
    "name": "[04/13] common/cnxk: dump selected SQ entries",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "a2476c031bc2005b289ae3a0b7652483bd24b9f9",
    "submitter": {
        "id": 1202,
        "url": "http://patchwork.dpdk.org/api/people/1202/?format=api",
        "name": "Nithin Dabilpuram",
        "email": "ndabilpuram@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "http://patchwork.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20240208085956.1741174-4-ndabilpuram@marvell.com/mbox/",
    "series": [
        {
            "id": 31048,
            "url": "http://patchwork.dpdk.org/api/series/31048/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=31048",
            "date": "2024-02-08T08:59:44",
            "name": "[01/13] common/cnxk: remove cn9k Inline IPsec FP opcode defines",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/31048/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/136519/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/136519/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 15D8B43ACC;\n\tThu,  8 Feb 2024 10:00:42 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4C4A742E29;\n\tThu,  8 Feb 2024 10:00:17 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 822BE42E04\n for <dev@dpdk.org>; Thu,  8 Feb 2024 10:00:13 +0100 (CET)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id\n 4187djlx005897 for <dev@dpdk.org>; Thu, 8 Feb 2024 01:00:12 -0800",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3w4trp877s-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Thu, 08 Feb 2024 01:00:12 -0800 (PST)",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Thu, 8 Feb 2024 01:00:10 -0800",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Thu, 8 Feb 2024 01:00:10 -0800",
            "from hyd1588t430.caveonetworks.com (unknown [10.29.52.204])\n by maili.marvell.com (Postfix) with ESMTP id D6DC23F70A4;\n Thu,  8 Feb 2024 01:00:08 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=\n from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding:content-type; s=\n pfpt0220; bh=2Q5NmobC76Lhdm08GKZgqiaEnQufah54I0G+/MaIo1I=; b=WgM\n QwxcX7WVCKXLh8HrszhAFCyRkbkV6eYuaD0mowwPzujuYGim5/69Myaf2jsx8Xfu\n lGfnCsRaGjY7kKBCCg21pqQAzjiT0OdtQdG1R7Sbnz6Y5aEzYtDKhRVnBWmaNNBI\n 8II+x5WBAEARCdh/pRBZquIsluguNjg10UhZCmcc8jfOmU/0JytBU7Dn8UdaytEa\n koN9v7h1LL5HCWOquCvk5LfnPtaJtnOVFKMxqiBCO8tHtO/elUwTFoDSKABjtSam\n 0LSXquaCaUY/hX5cv1FzQkszPBovkFCuXK0aImWM3G7r+Wqxfu8HABNmhi9mcP5D\n UN/z/3KHcgKGz3bM/PQ==",
        "From": "Nithin Dabilpuram <ndabilpuram@marvell.com>",
        "To": "Nithin Dabilpuram <ndabilpuram@marvell.com>, Kiran Kumar K\n <kirankumark@marvell.com>, Sunil Kumar Kori <skori@marvell.com>, Satha Rao\n <skoteshwar@marvell.com>",
        "CC": "<dev@dpdk.org>",
        "Subject": "[PATCH 04/13] common/cnxk: dump selected SQ entries",
        "Date": "Thu, 8 Feb 2024 14:29:47 +0530",
        "Message-ID": "<20240208085956.1741174-4-ndabilpuram@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20240208085956.1741174-1-ndabilpuram@marvell.com>",
        "References": "<20240208085956.1741174-1-ndabilpuram@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "soBywKBTRD1BvAvlfjOpoSOOrUub8Q9n",
        "X-Proofpoint-ORIG-GUID": "soBywKBTRD1BvAvlfjOpoSOOrUub8Q9n",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2024-02-08_01,2024-02-07_01,2023-05-22_02",
        "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: Satha Rao <skoteshwar@marvell.com>\n\nNew API to dump detailed SQ entries.\n\nSigned-off-by: Satha Rao <skoteshwar@marvell.com>\n---\n drivers/common/cnxk/roc_nix.h       |   2 +\n drivers/common/cnxk/roc_nix_debug.c | 172 ++++++++++++++++++++++++++++\n drivers/common/cnxk/version.map     |   1 +\n 3 files changed, 175 insertions(+)",
    "diff": "diff --git a/drivers/common/cnxk/roc_nix.h b/drivers/common/cnxk/roc_nix.h\nindex 84e6fc3df5..9d57ca0be7 100644\n--- a/drivers/common/cnxk/roc_nix.h\n+++ b/drivers/common/cnxk/roc_nix.h\n@@ -553,6 +553,8 @@ void __roc_api roc_nix_cqe_dump(FILE *file, const struct nix_cqe_hdr_s *cq);\n void __roc_api roc_nix_rq_dump(struct roc_nix_rq *rq, FILE *file);\n void __roc_api roc_nix_cq_dump(struct roc_nix_cq *cq, FILE *file);\n void __roc_api roc_nix_sq_dump(struct roc_nix_sq *sq, FILE *file);\n+int __roc_api roc_nix_sq_desc_dump(struct roc_nix *roc_nix, uint16_t q, uint16_t offset,\n+\t\t\t\t   uint16_t num, FILE *file);\n void __roc_api roc_nix_tm_dump(struct roc_nix *roc_nix, FILE *file);\n void __roc_api roc_nix_dump(struct roc_nix *roc_nix, FILE *file);\n \ndiff --git a/drivers/common/cnxk/roc_nix_debug.c b/drivers/common/cnxk/roc_nix_debug.c\nindex 8962a76097..26546f9297 100644\n--- a/drivers/common/cnxk/roc_nix_debug.c\n+++ b/drivers/common/cnxk/roc_nix_debug.c\n@@ -1362,3 +1362,175 @@ roc_nix_inl_outb_cpt_lfs_dump(struct roc_nix *roc_nix, FILE *file)\n \t\tcpt_lf_print(&lf_base[i]);\n \t}\n }\n+\n+static void\n+nix_tm_sqe_dump(uint64_t *sqe, int head_off, int end_off, int instr_sz, FILE *file, int full,\n+\t\tuint16_t *num)\n+{\n+\tint i, j, inc = (8 * (0x2 >> instr_sz)), segs;\n+\tuint64_t *ptr;\n+\n+\tif (!sqe || !(*num))\n+\t\treturn;\n+\n+\tptr = sqe + (head_off * inc);\n+\tfor (i = head_off; i < end_off; i++) {\n+\t\tif (!(*num))\n+\t\t\treturn;\n+\t\tptr = sqe + (i * inc);\n+\t\tnix_dump(file, \"Entry : %d >>>>>\\n\", i);\n+\t\tnix_dump(file, \"\\t\\tSEND_HDR[0]: 0x%016lx SEND_HDR[1]: 0x%016lx\\n\", *ptr,\n+\t\t\t *(ptr + 1));\n+\t\t*num = *num - 1;\n+\t\tif (!full)\n+\t\t\tcontinue;\n+\t\tptr += 2;\n+\t\tif (((*ptr >> 60) & 0xF) == NIX_SUBDC_EXT) {\n+\t\t\tnix_dump(file, \"\\t\\tSUBDC_EXT[0]: 0x%016lx DUBDC_EXT[1]: 0x%016lx\\n\", *ptr,\n+\t\t\t\t *(ptr + 1));\n+\t\t\tptr += 2;\n+\t\t}\n+\t\tif (((*ptr >> 60) & 0xF) == NIX_SUBDC_AGE_AND_STATS) {\n+\t\t\tnix_dump(file,\n+\t\t\t\t \"\\t\\tSUBDC_AGE_STATS[0]: 0x%016lx SUBDC_AGE_STATS[1]: 0x%016lx\\n\",\n+\t\t\t\t *ptr, *(ptr + 1));\n+\t\t\tptr += 2;\n+\t\t}\n+\t\tif (((*ptr >> 60) & 0xF) == NIX_SUBDC_JUMP) {\n+\t\t\tnix_dump(file, \"\\t\\tSUBDC_JUMP: 0x%016lx\\n\", *ptr);\n+\t\t\tptr += 1;\n+\t\t\tptr = (uint64_t *)*ptr;\n+\t\t}\n+\t\tif (((*ptr >> 60) & 0xF) == NIX_SUBDC_CRC) {\n+\t\t\tnix_dump(file, \"\\t\\tSUBDC_CRC[0]: 0x%016lx SUBDC_CRC[1]: 0x%016lx\\n\", *ptr,\n+\t\t\t\t *(ptr + 1));\n+\t\t\tptr += 2;\n+\t\t}\n+\t\t/* We are not parsing immediate send descriptor */\n+\t\tif (((*ptr >> 60) & 0xF) == NIX_SUBDC_IMM) {\n+\t\t\tnix_dump(file, \"\\t\\tSUBDC_IMM: 0x%016lx \", *ptr);\n+\t\t\tcontinue;\n+\t\t}\n+\t\twhile (1) {\n+\t\t\tif (((*ptr >> 60) & 0xF) == NIX_SUBDC_SG) {\n+\t\t\t\tnix_dump(file, \"\\t\\tSUBDC_SG: 0x%016lx   \", *ptr);\n+\t\t\t\tsegs = (*ptr >> 48) & 0x3;\n+\t\t\t\tptr += 1;\n+\t\t\t\tfor (j = 0; j < segs; j++) {\n+\t\t\t\t\tnix_dump(file, \"\\t\\t\\t  0x%016lx   \", *ptr);\n+\t\t\t\t\tptr += 1;\n+\t\t\t\t}\n+\t\t\t\tif (segs == 2)\n+\t\t\t\t\tptr += 1;\n+\t\t\t} else if (((*ptr >> 60) & 0xF) == NIX_SUBDC_SG2) {\n+\t\t\t\tnix_dump(file, \"\\t\\tSUBDC_SG2: 0x%016lx   \", *ptr);\n+\t\t\t\tptr += 1;\n+\t\t\t\tnix_dump(file, \"\\t\\t\\t  0x%016lx   \", *ptr);\n+\t\t\t\tptr += 1;\n+\t\t\t} else\n+\t\t\t\tbreak;\n+\t\t}\n+\t}\n+}\n+\n+int\n+roc_nix_sq_desc_dump(struct roc_nix *roc_nix, uint16_t q, uint16_t offset, uint16_t num, FILE *file)\n+{\n+\tint head_off, count, rc = 0, tail_off, full = 0;\n+\tstruct nix *nix = roc_nix_to_nix_priv(roc_nix);\n+\tstruct roc_nix_sq *sq = nix->sqs[q];\n+\tvoid *sqb_buf, *dat, *tail_sqb;\n+\tstruct ndc_sync_op *ndc_req;\n+\tstruct dev *dev = &nix->dev;\n+\tuint16_t sqes_per_sqb;\n+\tstruct mbox *mbox;\n+\n+\tmbox = dev->mbox;\n+\t/* Sync NDC-NIX-TX for LF */\n+\tndc_req = mbox_alloc_msg_ndc_sync_op(mbox_get(mbox));\n+\tif (ndc_req == NULL) {\n+\t\tmbox_put(mbox);\n+\t\treturn -EFAULT;\n+\t}\n+\n+\tndc_req->nix_lf_tx_sync = 1;\n+\tif (mbox_process(mbox))\n+\t\trc |= NIX_ERR_NDC_SYNC;\n+\tmbox_put(mbox);\n+\n+\tif (rc)\n+\t\tplt_err(\"NDC_SYNC failed rc %d\", rc);\n+\n+\trc = nix_q_ctx_get(dev, NIX_AQ_CTYPE_SQ, q, (void *)&dat);\n+\tif (rc)\n+\t\treturn rc;\n+\tif (roc_model_is_cn9k()) {\n+\t\tvolatile struct nix_sq_ctx_s *ctx = (struct nix_sq_ctx_s *)dat;\n+\n+\t\tif (ctx->mnq_dis || ctx->lmt_dis)\n+\t\t\tfull = 1;\n+\n+\t\tcount = ctx->sqb_count;\n+\t\tsqb_buf = (void *)ctx->head_sqb;\n+\t\ttail_sqb = (void *)ctx->tail_sqb;\n+\t\thead_off = ctx->head_offset;\n+\t\ttail_off = ctx->tail_offset;\n+\t} else {\n+\t\tvolatile struct nix_cn10k_sq_ctx_s *ctx = (struct nix_cn10k_sq_ctx_s *)dat;\n+\n+\t\tif (ctx->mnq_dis || ctx->lmt_dis)\n+\t\t\tfull = 1;\n+\n+\t\tcount = ctx->sqb_count;\n+\t\tsqb_buf = (void *)ctx->head_sqb;\n+\t\ttail_sqb = (void *)ctx->tail_sqb;\n+\t\thead_off = ctx->head_offset;\n+\t\ttail_off = ctx->tail_offset;\n+\t}\n+\tsqes_per_sqb = 1 << sq->sqes_per_sqb_log2;\n+\twhile (count) {\n+\t\tvoid *next_sqb;\n+\n+\t\tif (sqb_buf == tail_sqb) {\n+\t\t\tif ((head_off + offset) >= tail_off) /* Nothing to be dump */\n+\t\t\t\treturn 0;\n+\t\t\thead_off += tail_off;\n+\t\t\tbreak;\n+\t\t} else if ((head_off + offset) >= sqes_per_sqb) {\n+\t\t\tnext_sqb = *(void **)((uint64_t *)sqb_buf +\n+\t\t\t\t\t      (uint32_t)((sqes_per_sqb - 1) *\n+\t\t\t\t\t\t\t (0x2 >> sq->max_sqe_sz) * 8));\n+\t\t\t/* While traffic running HW may freed/reused this SQE */\n+\t\t\tif (!next_sqb)\n+\t\t\t\treturn 0;\n+\t\t\tsqb_buf = next_sqb;\n+\t\t\thead_off = 0;\n+\t\t\tcount--;\n+\t\t} else {\n+\t\t\thead_off += offset;\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\twhile (count) {\n+\t\tvoid *next_sqb;\n+\n+\t\tif (sqb_buf == tail_sqb)\n+\t\t\tnix_tm_sqe_dump(sqb_buf, head_off, tail_off, sq->max_sqe_sz, file, full,\n+\t\t\t\t\t&num);\n+\t\telse\n+\t\t\tnix_tm_sqe_dump(sqb_buf, head_off, (sqes_per_sqb - 1), sq->max_sqe_sz, file,\n+\t\t\t\t\tfull, &num);\n+\t\tif (!num)\n+\t\t\tbreak;\n+\t\tnext_sqb = *(void **)((uint64_t *)sqb_buf +\n+\t\t\t\t      (uint32_t)((sqes_per_sqb - 1) * (0x2 >> sq->max_sqe_sz) * 8));\n+\t\t/* While traffic running HW may freed/reused this SQE */\n+\t\tif (!next_sqb)\n+\t\t\treturn 0;\n+\t\tsqb_buf = next_sqb;\n+\t\thead_off = 0;\n+\t\tcount--;\n+\t}\n+\n+\treturn 0;\n+}\ndiff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map\nindex 2123ebf701..45b5148522 100644\n--- a/drivers/common/cnxk/version.map\n+++ b/drivers/common/cnxk/version.map\n@@ -336,6 +336,7 @@ INTERNAL {\n \troc_nix_rx_drop_re_set;\n \troc_nix_rx_queue_intr_disable;\n \troc_nix_rx_queue_intr_enable;\n+\troc_nix_sq_desc_dump;\n \troc_nix_sq_dump;\n \troc_nix_sq_ena_dis;\n \troc_nix_sq_fini;\n",
    "prefixes": [
        "04/13"
    ]
}