get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 137008,
    "url": "http://patches.dpdk.org/api/patches/137008/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240222100530.2266013-14-ndabilpuram@marvell.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": "<20240222100530.2266013-14-ndabilpuram@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240222100530.2266013-14-ndabilpuram@marvell.com",
    "date": "2024-02-22T10:05:30",
    "name": "[v3,14/14] net/cnxk: fix mempool debug build compile warnings",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8d1e460bd51c620177a8b207893d5bee3988f96c",
    "submitter": {
        "id": 1202,
        "url": "http://patches.dpdk.org/api/people/1202/?format=api",
        "name": "Nithin Dabilpuram",
        "email": "ndabilpuram@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "http://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240222100530.2266013-14-ndabilpuram@marvell.com/mbox/",
    "series": [
        {
            "id": 31178,
            "url": "http://patches.dpdk.org/api/series/31178/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31178",
            "date": "2024-02-22T10:05:17",
            "name": "[v3,01/14] common/cnxk: remove cn9k Inline IPsec FP opcode defines",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/31178/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/137008/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/137008/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 2396F43B73;\n\tThu, 22 Feb 2024 11:07:26 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 26DF2410E8;\n\tThu, 22 Feb 2024 11:06:16 +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 8B85241060\n for <dev@dpdk.org>; Thu, 22 Feb 2024 11:06:14 +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 41M9BLWF021847 for <dev@dpdk.org>; Thu, 22 Feb 2024 02:06:13 -0800",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3we3dw84bt-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Thu, 22 Feb 2024 02:06:13 -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, 22 Feb 2024 02:06:12 -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, 22 Feb 2024 02:06:12 -0800",
            "from hyd1588t430.caveonetworks.com (unknown [10.29.52.204])\n by maili.marvell.com (Postfix) with ESMTP id 1F83A3F7136;\n Thu, 22 Feb 2024 02:06:09 -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=jZpAhI4X3vtDfi4PmTvCdIULKT6eM5XrxTgFLA8FckE=; b=NTE\n qPBzogd67dqHWUWuiqddtzyzIHWGff3R7ciLh+roNCRC0cp7aZnnfnaXgnKcGvFU\n 8BdUMVz7nHFrlIXkRj1lycg4a1kRL+YGgvbmJgkfuHWqhoMEnG+pmDoN4lfUk2GG\n jSbBLxAzYPPuITqiDuSJomOM4d8pefImNPPmv+HPTtfYVMHWuMAUc63HeXfbiDaa\n j3Kzpc1LHKSVgQymKqX3JKau3i6JNqJOFR7CbL3lI7bakwYK13gUhoMTfmgT1XRp\n 5vofZOambe3VfQ64y9or1yaJuotmu/8UkggkYMxBw353vNzJI2ujaGB7DZWUP1pa\n mRVOY2W671KsnphmLVw==",
        "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>, Rahul Bhansali <rbhansali@marvell.com>",
        "Subject": "[PATCH v3 14/14] net/cnxk: fix mempool debug build compile warnings",
        "Date": "Thu, 22 Feb 2024 15:35:30 +0530",
        "Message-ID": "<20240222100530.2266013-14-ndabilpuram@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20240222100530.2266013-1-ndabilpuram@marvell.com>",
        "References": "<20240222100530.2266013-1-ndabilpuram@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "wjBSmXLwFP6ioZUNkYCBnJyDoLz-t-Ps",
        "X-Proofpoint-ORIG-GUID": "wjBSmXLwFP6ioZUNkYCBnJyDoLz-t-Ps",
        "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-22_08,2024-02-22_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: Rahul Bhansali <rbhansali@marvell.com>\n\nFix compile warning of \"-Werror=incompatible-pointer-types\" when\nRTE_LIBRTE_MEMPOOL_DEBUG is enabled.\nAlso, reset mbuf next and nb_segs fields in multi-seg Tx path.\n\nFixes: e87c1a590805 (\"net/cnxk: fix indirect mbuf handling in Tx path\")\n\nSigned-off-by: Rahul Bhansali <rbhansali@marvell.com>\n---\n drivers/net/cnxk/cn10k_tx.h | 10 ++++++----\n drivers/net/cnxk/cn9k_tx.h  | 35 ++++++++++++++++++++++++++++-------\n 2 files changed, 34 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h\nindex a995696e66..94bfebf246 100644\n--- a/drivers/net/cnxk/cn10k_tx.h\n+++ b/drivers/net/cnxk/cn10k_tx.h\n@@ -859,7 +859,7 @@ cn10k_nix_prefree_seg_vec(struct rte_mbuf **mbufs, struct cn10k_eth_txq *txq,\n \t\tw0 |= aura << 20;\n \n \t\tif ((w0 & BIT_ULL(19)) == 0)\n-\t\t\tRTE_MEMPOOL_CHECK_COOKIES(cookie->pool, &cookie, 1, 0);\n+\t\t\tRTE_MEMPOOL_CHECK_COOKIES(cookie->pool, (void **)&cookie, 1, 0);\n \t}\n \t*senddesc01_w0 = vsetq_lane_u64(w0, *senddesc01_w0, 0);\n \n@@ -888,7 +888,7 @@ cn10k_nix_prefree_seg_vec(struct rte_mbuf **mbufs, struct cn10k_eth_txq *txq,\n \t\tw0 |= aura << 20;\n \n \t\tif ((w0 & BIT_ULL(19)) == 0)\n-\t\t\tRTE_MEMPOOL_CHECK_COOKIES(cookie->pool, &cookie, 1, 0);\n+\t\t\tRTE_MEMPOOL_CHECK_COOKIES(cookie->pool, (void **)&cookie, 1, 0);\n \t}\n \t*senddesc01_w0 = vsetq_lane_u64(w0, *senddesc01_w0, 1);\n \n@@ -917,7 +917,7 @@ cn10k_nix_prefree_seg_vec(struct rte_mbuf **mbufs, struct cn10k_eth_txq *txq,\n \t\tw0 |= aura << 20;\n \n \t\tif ((w0 & BIT_ULL(19)) == 0)\n-\t\t\tRTE_MEMPOOL_CHECK_COOKIES(cookie->pool, &cookie, 1, 0);\n+\t\t\tRTE_MEMPOOL_CHECK_COOKIES(cookie->pool, (void **)&cookie, 1, 0);\n \t}\n \t*senddesc23_w0 = vsetq_lane_u64(w0, *senddesc23_w0, 0);\n \n@@ -946,7 +946,7 @@ cn10k_nix_prefree_seg_vec(struct rte_mbuf **mbufs, struct cn10k_eth_txq *txq,\n \t\tw0 |= aura << 20;\n \n \t\tif ((w0 & BIT_ULL(19)) == 0)\n-\t\t\tRTE_MEMPOOL_CHECK_COOKIES(cookie->pool, &cookie, 1, 0);\n+\t\t\tRTE_MEMPOOL_CHECK_COOKIES(cookie->pool, (void **)&cookie, 1, 0);\n \t}\n \t*senddesc23_w0 = vsetq_lane_u64(w0, *senddesc23_w0, 1);\n #ifndef RTE_LIBRTE_MEMPOOL_DEBUG\n@@ -1324,6 +1324,7 @@ cn10k_nix_prepare_mseg(struct cn10k_eth_txq *txq,\n \tnb_segs = m->nb_segs - 1;\n \tm_next = m->next;\n \tm->next = NULL;\n+\tm->nb_segs = 1;\n \tslist = &cmd[3 + off + 1];\n \n \tcookie = RTE_MBUF_DIRECT(m) ? m : rte_mbuf_from_indirect(m);\n@@ -1869,6 +1870,7 @@ cn10k_nix_prepare_mseg_vec_list(struct rte_mbuf *m, uint64_t *cmd,\n \tnb_segs = m->nb_segs - 1;\n \tm_next = m->next;\n \tm->next = NULL;\n+\tm->nb_segs = 1;\n \tm = m_next;\n \t/* Fill mbuf segments */\n \tdo {\ndiff --git a/drivers/net/cnxk/cn9k_tx.h b/drivers/net/cnxk/cn9k_tx.h\nindex f28cecebd0..fb5e8c5f56 100644\n--- a/drivers/net/cnxk/cn9k_tx.h\n+++ b/drivers/net/cnxk/cn9k_tx.h\n@@ -157,7 +157,7 @@ cn9k_nix_prefree_seg_vec(struct rte_mbuf **mbufs, struct cn9k_eth_txq *txq,\n \t\tw0 |= aura << 20;\n \n \t\tif ((w0 & BIT_ULL(19)) == 0)\n-\t\t\tRTE_MEMPOOL_CHECK_COOKIES(cookie->pool, &cookie, 1, 0);\n+\t\t\tRTE_MEMPOOL_CHECK_COOKIES(cookie->pool, (void **)&cookie, 1, 0);\n \t}\n \t*senddesc01_w0 = vsetq_lane_u64(w0, *senddesc01_w0, 0);\n \n@@ -186,7 +186,7 @@ cn9k_nix_prefree_seg_vec(struct rte_mbuf **mbufs, struct cn9k_eth_txq *txq,\n \t\tw0 |= aura << 20;\n \n \t\tif ((w0 & BIT_ULL(19)) == 0)\n-\t\t\tRTE_MEMPOOL_CHECK_COOKIES(cookie->pool, &cookie, 1, 0);\n+\t\t\tRTE_MEMPOOL_CHECK_COOKIES(cookie->pool, (void **)&cookie, 1, 0);\n \t}\n \t*senddesc01_w0 = vsetq_lane_u64(w0, *senddesc01_w0, 1);\n \n@@ -215,7 +215,7 @@ cn9k_nix_prefree_seg_vec(struct rte_mbuf **mbufs, struct cn9k_eth_txq *txq,\n \t\tw0 |= aura << 20;\n \n \t\tif ((w0 & BIT_ULL(19)) == 0)\n-\t\t\tRTE_MEMPOOL_CHECK_COOKIES(cookie->pool, &cookie, 1, 0);\n+\t\t\tRTE_MEMPOOL_CHECK_COOKIES(cookie->pool, (void **)&cookie, 1, 0);\n \t}\n \t*senddesc23_w0 = vsetq_lane_u64(w0, *senddesc23_w0, 0);\n \n@@ -244,7 +244,7 @@ cn9k_nix_prefree_seg_vec(struct rte_mbuf **mbufs, struct cn9k_eth_txq *txq,\n \t\tw0 |= aura << 20;\n \n \t\tif ((w0 & BIT_ULL(19)) == 0)\n-\t\t\tRTE_MEMPOOL_CHECK_COOKIES(cookie->pool, &cookie, 1, 0);\n+\t\t\tRTE_MEMPOOL_CHECK_COOKIES(cookie->pool, (void **)&cookie, 1, 0);\n \t}\n \t*senddesc23_w0 = vsetq_lane_u64(w0, *senddesc23_w0, 1);\n #ifndef RTE_LIBRTE_MEMPOOL_DEBUG\n@@ -515,7 +515,7 @@ cn9k_nix_xmit_prepare(struct cn9k_eth_txq *txq,\n #ifdef RTE_LIBRTE_MEMPOOL_DEBUG\n \t\t/* Mark mempool object as \"put\" since it is freed by NIX */\n \t\tif (!send_hdr->w0.df)\n-\t\t\tRTE_MEMPOOL_CHECK_COOKIES(m->pool, (void **)&m, 1, 0);\n+\t\t\tRTE_MEMPOOL_CHECK_COOKIES(cookie->pool, (void **)&cookie, 1, 0);\n #else\n \t\tRTE_SET_USED(cookie);\n #endif\n@@ -639,10 +639,14 @@ cn9k_nix_prepare_mseg(struct cn9k_eth_txq *txq,\n \t/* Mark mempool object as \"put\" since it is freed by NIX */\n #ifdef RTE_LIBRTE_MEMPOOL_DEBUG\n \tif (!(sg_u & (1ULL << 55)))\n-\t\tRTE_MEMPOOL_CHECK_COOKIES(m->pool, (void **)&m, 1, 0);\n+\t\tRTE_MEMPOOL_CHECK_COOKIES(cookie->pool, (void **)&cookie, 1, 0);\n \trte_io_wmb();\n #else\n \tRTE_SET_USED(cookie);\n+#endif\n+#ifdef RTE_ENABLE_ASSERT\n+\tm->next = NULL;\n+\tm->nb_segs = 1;\n #endif\n \tm = m_next;\n \tif (!m)\n@@ -653,6 +657,7 @@ cn9k_nix_prepare_mseg(struct cn9k_eth_txq *txq,\n \t\tm_next = m->next;\n \t\tsg_u = sg_u | ((uint64_t)m->data_len << (i << 4));\n \t\t*slist = rte_mbuf_data_iova(m);\n+\t\tcookie = RTE_MBUF_DIRECT(m) ? m : rte_mbuf_from_indirect(m);\n \t\t/* Set invert df if buffer is not to be freed by H/W */\n \t\tif (flags & NIX_TX_OFFLOAD_MBUF_NOFF_F) {\n \t\t\tsg_u |= (cn9k_nix_prefree_seg(m, txq, send_hdr, NULL) << (i + 55));\n@@ -662,7 +667,7 @@ cn9k_nix_prepare_mseg(struct cn9k_eth_txq *txq,\n \t\t/* Mark mempool object as \"put\" since it is freed by NIX */\n #ifdef RTE_LIBRTE_MEMPOOL_DEBUG\n \t\tif (!(sg_u & (1ULL << (i + 55))))\n-\t\t\tRTE_MEMPOOL_CHECK_COOKIES(m->pool, (void **)&m, 1, 0);\n+\t\t\tRTE_MEMPOOL_CHECK_COOKIES(cookie->pool, (void **)&cookie, 1, 0);\n \t\trte_io_wmb();\n #endif\n \t\tslist++;\n@@ -678,6 +683,9 @@ cn9k_nix_prepare_mseg(struct cn9k_eth_txq *txq,\n \t\t\tsg_u = sg->u;\n \t\t\tslist++;\n \t\t}\n+#ifdef RTE_ENABLE_ASSERT\n+\t\tm->next = NULL;\n+#endif\n \t\tm = m_next;\n \t} while (nb_segs);\n \n@@ -691,6 +699,9 @@ cn9k_nix_prepare_mseg(struct cn9k_eth_txq *txq,\n \tsegdw += (off >> 1) + 1 + !!(flags & NIX_TX_OFFLOAD_TSTAMP_F);\n \tsend_hdr->w0.sizem1 = segdw - 1;\n \n+#ifdef RTE_ENABLE_ASSERT\n+\trte_io_wmb();\n+#endif\n \treturn segdw;\n }\n \n@@ -907,6 +918,10 @@ cn9k_nix_prepare_mseg_vec_list(struct cn9k_eth_txq *txq,\n \tRTE_SET_USED(cookie);\n #endif\n \n+#ifdef RTE_ENABLE_ASSERT\n+\tm->next = NULL;\n+\tm->nb_segs = 1;\n+#endif\n \tm = m_next;\n \t/* Fill mbuf segments */\n \tdo {\n@@ -937,6 +952,9 @@ cn9k_nix_prepare_mseg_vec_list(struct cn9k_eth_txq *txq,\n \t\t\tsg_u = sg->u;\n \t\t\tslist++;\n \t\t}\n+#ifdef RTE_ENABLE_ASSERT\n+\t\tm->next = NULL;\n+#endif\n \t\tm = m_next;\n \t} while (nb_segs);\n \n@@ -952,6 +970,9 @@ cn9k_nix_prepare_mseg_vec_list(struct cn9k_eth_txq *txq,\n \t\t !!(flags & NIX_TX_OFFLOAD_TSTAMP_F);\n \tsend_hdr->w0.sizem1 = segdw - 1;\n \n+#ifdef RTE_ENABLE_ASSERT\n+\trte_io_wmb();\n+#endif\n \treturn segdw;\n }\n \n",
    "prefixes": [
        "v3",
        "14/14"
    ]
}