get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 129434,
    "url": "http://patchwork.dpdk.org/api/patches/129434/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230711011809.96677-1-squirrel.prog@gmail.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": "<20230711011809.96677-1-squirrel.prog@gmail.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230711011809.96677-1-squirrel.prog@gmail.com",
    "date": "2023-07-11T01:18:09",
    "name": "lib/ethdev: sanity check on callback before resource allocation",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "1b2a17ecab718c2308ed70b03d19a6f78d050774",
    "submitter": {
        "id": 3126,
        "url": "http://patchwork.dpdk.org/api/people/3126/?format=api",
        "name": "Kaiyu Zhang",
        "email": "squirrel.prog@gmail.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230711011809.96677-1-squirrel.prog@gmail.com/mbox/",
    "series": [
        {
            "id": 28894,
            "url": "http://patchwork.dpdk.org/api/series/28894/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28894",
            "date": "2023-07-11T01:18:09",
            "name": "lib/ethdev: sanity check on callback before resource allocation",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/28894/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/129434/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/129434/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 95E1E42E3D;\n\tTue, 11 Jul 2023 03:18:16 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 7209640A7D;\n\tTue, 11 Jul 2023 03:18:16 +0200 (CEST)",
            "from mail-pg1-f179.google.com (mail-pg1-f179.google.com\n [209.85.215.179])\n by mails.dpdk.org (Postfix) with ESMTP id 637EA4003C\n for <dev@dpdk.org>; Tue, 11 Jul 2023 03:18:15 +0200 (CEST)",
            "by mail-pg1-f179.google.com with SMTP id\n 41be03b00d2f7-55adfa72d3fso2632644a12.3\n for <dev@dpdk.org>; Mon, 10 Jul 2023 18:18:15 -0700 (PDT)",
            "from linux.. ([164.92.112.87]) by smtp.gmail.com with ESMTPSA id\n jh2-20020a170903328200b001b7feed285csm521335plb.36.2023.07.10.18.18.13\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 10 Jul 2023 18:18:14 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20221208; t=1689038294; x=1691630294;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=tM02329k2WewqSub4oLwPyg55k5ntaMpJjr6BB/1qvU=;\n b=HrJ7JhS4Lv9Q4QQqA3iWTj8mlvHvdPoaylUuN3elvoYOr0KxEhVi+mQtcDQNL4c3ly\n BW7cGW0hhTE7hXTcqzOKbZTkWFrRmXwZlb6uhNNx1JP8j+8ui2CZ6KEU+/QcXPvdREI3\n SeHLrmujp6sLGosR7teVaiKKgS3wp/KwZh4hGvojfq1scDk7qX62D1UsjvKQZB1ND1G2\n +Lgc+BrbaV3SZXKmMlzFuy5QpIEE6EoF5kGn03xIBm74m/jESxrhm6tdSRzzehN6Dm/B\n meKdIS9zAMpE3dFhn6Fif0RPIxBnPBzawT2ltf6XFT19fVpfEk6ETuIw6Pn/c6d0xwYr\n +kew==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20221208; t=1689038294; x=1691630294;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=tM02329k2WewqSub4oLwPyg55k5ntaMpJjr6BB/1qvU=;\n b=HwvhJ9eMl4I2kT7ta/xviFyoaXVzgr+ajmQ6Ey5W362Zi/Gq5TW151l2oD3H2SUYcU\n pfkurowI6yiXiyI6zb1xqmbYpdqunM16cVDa/3oMFaDFRvXzgBqsvR4qknysanY4yj3O\n 3/ZTBflleuLnLPmNXidhsrK9pqyXu/AqDJwEFMY/nmRhNpnLdu9bQh5ISy3yA6UJ+rti\n q1m07MS9oN/0Ino8FuG3RqtRWbicuEqB3QOaO9UB57EFyWDtty7NuGtZ+5NOrVYUUeLX\n QXb/Z8n2STUrBmJWeLO1FPk6ty9pUFzu991AmTY/R7FiBEHkJ4JqIhaF1hw4cfDrYXDG\n Q6Dg==",
        "X-Gm-Message-State": "ABy/qLbLIOS1ffSO5gqb13BNGX9M6WLCSusLIlGq1iHb7hSBL5+Mj4wf\n ynasCPcs3TGexQ1OqN+4HhWMEi8rRmQL",
        "X-Google-Smtp-Source": "\n APBJJlHYVMY47e+/tDce38Kp+zMmOcNezQcsCTtevCok4sREbj+yJrJgnZJMlXUgcFsIsuLDjdjAWg==",
        "X-Received": "by 2002:a05:6a20:8e18:b0:129:b68b:92db with SMTP id\n y24-20020a056a208e1800b00129b68b92dbmr14768758pzj.42.1689038294420;\n Mon, 10 Jul 2023 18:18:14 -0700 (PDT)",
        "From": "Kaiyu Zhang <squirrel.prog@gmail.com>",
        "To": "thomas@monjalon.net, ferruh.yigit@amd.com, andrew.rybchenko@oktetlabs.ru",
        "Cc": "dev@dpdk.org,\n\tKaiyu Zhang <squirrel.prog@gmail.com>",
        "Subject": "[PATCH] lib/ethdev: sanity check on callback before resource\n allocation",
        "Date": "Tue, 11 Jul 2023 01:18:09 +0000",
        "Message-Id": "<20230711011809.96677-1-squirrel.prog@gmail.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "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": "sanity check is performed after a rte_eth_dev object is allocated.\nThe object is not freed if the check fails, though in the current\nreality this never happens, but it's better programming paradigm\nto move the quick check up front to the start of\nrte_eth_dev_pci_generic_probe.\n\nSigned-off-by: Kaiyu Zhang <squirrel.prog@gmail.com>\n---\n lib/ethdev/ethdev_pci.h | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/ethdev/ethdev_pci.h b/lib/ethdev/ethdev_pci.h\nindex 94b8fba5d7..320e3e0093 100644\n--- a/lib/ethdev/ethdev_pci.h\n+++ b/lib/ethdev/ethdev_pci.h\n@@ -126,12 +126,13 @@ rte_eth_dev_pci_generic_probe(struct rte_pci_device *pci_dev,\n \tstruct rte_eth_dev *eth_dev;\n \tint ret;\n \n+\tif (*dev_init == NULL)\n+\t\treturn -EINVAL;\n+\n \teth_dev = rte_eth_dev_pci_allocate(pci_dev, private_data_size);\n \tif (!eth_dev)\n \t\treturn -ENOMEM;\n \n-\tif (*dev_init == NULL)\n-\t\treturn -EINVAL;\n \tret = dev_init(eth_dev);\n \tif (ret)\n \t\trte_eth_dev_release_port(eth_dev);\n",
    "prefixes": []
}