Show a patch.

GET /api/patches/74569/
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/",
    "web_url": "https://patches.dpdk.org/patch/74569/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<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/",
        "name": "Michael Baum",
        "email": "michaelba@mellanox.com"
    },
    "delegate": {
        "id": 3268,
        "url": "https://patches.dpdk.org/api/users/3268/",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@mellanox.com"
    },
    "mbox": "https://patches.dpdk.org/patch/74569/mbox/",
    "series": [
        {
            "id": 11206,
            "url": "https://patches.dpdk.org/api/series/11206/",
            "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": {},
    "headers": {
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "X-BeenThere": "dev@dpdk.org",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH] net/mlx4: optimize stuck memory size in probe",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "From": "Michael Baum <michaelba@mellanox.com>",
        "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"
        ],
        "To": "dev@dpdk.org",
        "X-Mailer": "git-send-email 1.8.3.1",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Date": "Tue, 21 Jul 2020 12:01:09 +0000",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Errors-To": "dev-bounces@dpdk.org",
        "Cc": "matan@mellanox.com, viacheslavo@mellanox.com, stable@dpdk.org",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Message-Id": "<1595332869-6942-1-git-send-email-michaelba@mellanox.com>",
        "Return-Path": "<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": []
}