get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 125214,
    "url": "https://patches.dpdk.org/api/patches/125214/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230316212904.9318-3-syalavarthi@marvell.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20230316212904.9318-3-syalavarthi@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230316212904.9318-3-syalavarthi@marvell.com",
    "date": "2023-03-16T21:28:58",
    "name": "[v3,2/8] ml/cnxk: fix potential division by zero",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "c186bf59f8d487eba3784b504c960fd0e500cc8c",
    "submitter": {
        "id": 2480,
        "url": "https://patches.dpdk.org/api/people/2480/?format=api",
        "name": "Srikanth Yalavarthi",
        "email": "syalavarthi@marvell.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230316212904.9318-3-syalavarthi@marvell.com/mbox/",
    "series": [
        {
            "id": 27429,
            "url": "https://patches.dpdk.org/api/series/27429/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=27429",
            "date": "2023-03-16T21:28:56",
            "name": "Fixes to ml/cnxk driver",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/27429/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/125214/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/125214/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 56A6641EB5;\n\tThu, 16 Mar 2023 22:30:01 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D286F42F9E;\n\tThu, 16 Mar 2023 22:29:44 +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 CDEBD42DB7\n for <dev@dpdk.org>; Thu, 16 Mar 2023 22:29:38 +0100 (CET)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 32GFtBbc005959 for <dev@dpdk.org>; Thu, 16 Mar 2023 14:29:38 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3pbxq2ucrk-2\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Thu, 16 Mar 2023 14:29:37 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.42;\n Thu, 16 Mar 2023 14:29:35 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.42 via Frontend\n Transport; Thu, 16 Mar 2023 14:29:35 -0700",
            "from ml-host-33.caveonetworks.com (unknown [10.110.143.233])\n by maili.marvell.com (Postfix) with ESMTP id 68F0F3F707C;\n Thu, 16 Mar 2023 14:29:35 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-type; s=pfpt0220; bh=nFfZAVDEbWV9RGMr4gW5TJQhHU1ytYll04vb8l6RUKg=;\n b=YHNgNWX1+dNwUwWIR9swvX+6W2man5nEj+MUZSdExweyKhFqoIjaI5OaBxEGHmUCRY+Y\n A+nEFU8SSEvztFvsv4doSs7v/hG0mfFvxfpf9ymQQQTUeBdWB5U2KZblSAaQWHkanyHq\n R4gs+/nozzZ8Iccsh/kvpAY5cEZ0ONLZAm5PC0P7ZP5DfQSQP0whB7bmzEzmLnKkUKCy\n Av+c1lEoVIJUF9V/OMX0wyFm9X2dFmQtX2ASpYakKy8DQVGVwrSSVn3P/hzZhob1nk+d\n bde7SXGT+552T9E8vEvSzKr/55yYTaYkAZuEWRYOTyGPA5bLRJRde8jMThGDxLg8MOpO Uw==",
        "From": "Srikanth Yalavarthi <syalavarthi@marvell.com>",
        "To": "Srikanth Yalavarthi <syalavarthi@marvell.com>, Prince Takkar\n <ptakkar@marvell.com>",
        "CC": "<dev@dpdk.org>, <sshankarnara@marvell.com>, <aprabhu@marvell.com>,\n <pshukla@marvell.com>",
        "Subject": "[PATCH v3 2/8] ml/cnxk: fix potential division by zero",
        "Date": "Thu, 16 Mar 2023 14:28:58 -0700",
        "Message-ID": "<20230316212904.9318-3-syalavarthi@marvell.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20230316212904.9318-1-syalavarthi@marvell.com>",
        "References": "<20230315135427.11489-1-syalavarthi@marvell.com>\n <20230316212904.9318-1-syalavarthi@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "Zb4guDoiBOZYeB1KsfltgAk3sfPWY5M5",
        "X-Proofpoint-ORIG-GUID": "Zb4guDoiBOZYeB1KsfltgAk3sfPWY5M5",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22\n definitions=2023-03-16_14,2023-03-16_02,2023-02-09_01",
        "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": "Fix division or modulo by zero issue reported by coverity. Added\na check to count, before updating average value of a stat.\n\nCoverity issue: 383658\nFixes: 4ff4ab8e1a20 (\"ml/cnxk: support extended statistics\")\n\nSigned-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>\n---\n drivers/ml/cnxk/cn10k_ml_ops.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/ml/cnxk/cn10k_ml_ops.c b/drivers/ml/cnxk/cn10k_ml_ops.c\nindex 7d5eb97668..bf9409ad10 100644\n--- a/drivers/ml/cnxk/cn10k_ml_ops.c\n+++ b/drivers/ml/cnxk/cn10k_ml_ops.c\n@@ -444,7 +444,8 @@ cn10k_ml_prep_fp_job_descriptor(struct rte_ml_dev *dev, struct cn10k_ml_req *req\n \t\t\tcount += model->burst_stats[qp_id].dequeued_count -                        \\\n \t\t\t\t model->burst_stats[qp_id].str##_reset_count;                      \\\n \t\t}                                                                                  \\\n-\t\tvalue = value / count;                                                             \\\n+\t\tif (count != 0)                                                                    \\\n+\t\t\tvalue = value / count;                                                     \\\n \t} while (0)\n \n #define ML_MIN_FOREACH_QP(dev, model, qp_id, str, value, count)                                    \\\n",
    "prefixes": [
        "v3",
        "2/8"
    ]
}