get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 74569,
    "url": "https://patches.dpdk.org/api/patches/74569/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1595332869-6942-1-git-send-email-michaelba@mellanox.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": "<1595332869-6942-1-git-send-email-michaelba@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1595332869-6942-1-git-send-email-michaelba@mellanox.com",
    "date": "2020-07-21T12:01:09",
    "name": "net/mlx4: optimize stuck memory size in probe",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "8a94968598b70252f1c64402b531f12e4e0e0449",
    "submitter": {
        "id": 1582,
        "url": "https://patches.dpdk.org/api/people/1582/?format=api",
        "name": "Michael Baum",
        "email": "michaelba@mellanox.com"
    },
    "delegate": {
        "id": 3268,
        "url": "https://patches.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1595332869-6942-1-git-send-email-michaelba@mellanox.com/mbox/",
    "series": [
        {
            "id": 11206,
            "url": "https://patches.dpdk.org/api/series/11206/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=11206",
            "date": "2020-07-21T12:01:09",
            "name": "net/mlx4: optimize stuck memory size in probe",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/11206/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/74569/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/74569/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id DDB0DA0526;\n\tTue, 21 Jul 2020 14:01:23 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id BE67B1BFF9;\n\tTue, 21 Jul 2020 14:01:23 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 5DF3B1BFF9\n for <dev@dpdk.org>; Tue, 21 Jul 2020 14:01:22 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n matan@mellanox.com) with SMTP; 21 Jul 2020 15:01:12 +0300",
            "from pegasus07.mtr.labs.mlnx (pegasus07.mtr.labs.mlnx\n [10.210.16.112])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 06LC1Cb9024730;\n Tue, 21 Jul 2020 15:01:12 +0300"
        ],
        "From": "Michael Baum <michaelba@mellanox.com>",
        "To": "dev@dpdk.org",
        "Cc": "matan@mellanox.com, viacheslavo@mellanox.com, stable@dpdk.org",
        "Date": "Tue, 21 Jul 2020 12:01:09 +0000",
        "Message-Id": "<1595332869-6942-1-git-send-email-michaelba@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "Subject": "[dpdk-dev] [PATCH] net/mlx4: optimize stuck memory size in probe",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The mlx4_pci_probe function sets a pointer to the mlx4_priv structure,\nand during that function fills its fields one by one with relevant\nvalues.\n\nIt wants to put a value in the intr_handle field that has all its fields\nzero except 2. To do so, it initializes a local struct rte_intr_handle\ntype variable and updates it only 2 fields and assigns it into the\nappropriate field. However, it initializes a very large structure on the\nstack while not at all certain that this place exists and in any case it\nis very wasteful.\n\nReset all fields directly to the pointer by memset, then format the 2\nfields to the relevant values.\n\nFixes: 63c2f23c852a (\"net/mlx4: use a single interrupt handle\")\nCc: stable@dpdk.org\n\nSigned-off-by: Michael Baum <michaelba@mellanox.com>\nAcked-by: Matan Azrad <matan@mellanox.com>\n---\n drivers/net/mlx4/mlx4.c | 7 +++----\n 1 file changed, 3 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c\nindex e619a74..71061a7 100644\n--- a/drivers/net/mlx4/mlx4.c\n+++ b/drivers/net/mlx4/mlx4.c\n@@ -1029,10 +1029,9 @@ struct mlx4_conf {\n \t\teth_dev->device = &pci_dev->device;\n \t\trte_eth_copy_pci_info(eth_dev, pci_dev);\n \t\t/* Initialize local interrupt handle for current port. */\n-\t\tpriv->intr_handle = (struct rte_intr_handle){\n-\t\t\t.fd = -1,\n-\t\t\t.type = RTE_INTR_HANDLE_EXT,\n-\t\t};\n+\t\tmemset(&priv->intr_handle, 0, sizeof(struct rte_intr_handle));\n+\t\tpriv->intr_handle.fd = -1;\n+\t\tpriv->intr_handle.type = RTE_INTR_HANDLE_EXT;\n \t\t/*\n \t\t * Override ethdev interrupt handle pointer with private\n \t\t * handle instead of that of the parent PCI device used by\n",
    "prefixes": []
}