get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1035063,
    "url": "http://patchwork.ozlabs.org/api/patches/1035063/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1549048453-3584-2-git-send-email-megha.dey@linux.intel.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1549048453-3584-2-git-send-email-megha.dey@linux.intel.com>",
    "list_archive_url": null,
    "date": "2019-02-01T19:14:08",
    "name": "[RFC,v4,1/6] PCI/MSI: New structures/macros for dynamic MSI-X allocation",
    "commit_ref": null,
    "pull_url": null,
    "state": "rfc",
    "archived": false,
    "hash": "19790a81c3fa4d1326e269d9038954339089fb6e",
    "submitter": {
        "id": 75876,
        "url": "http://patchwork.ozlabs.org/api/people/75876/?format=api",
        "name": "Dey, Megha",
        "email": "megha.dey@linux.intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1549048453-3584-2-git-send-email-megha.dey@linux.intel.com/mbox/",
    "series": [
        {
            "id": 89594,
            "url": "http://patchwork.ozlabs.org/api/series/89594/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=89594",
            "date": "2019-02-01T19:14:07",
            "name": "Introduce dynamic allocation/freeing of MSI-X vectors",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/89594/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1035063/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1035063/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.137; helo=fraxinus.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dmarc=none (p=none dis=none)\n\theader.from=linux.intel.com"
        ],
        "Received": [
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 43rmzn11BLz9sDX\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  2 Feb 2019 06:16:20 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 4A27686C3E;\n\tFri,  1 Feb 2019 19:16:19 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id X84D0MKYpkRt; Fri,  1 Feb 2019 19:16:17 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 597D986C18;\n\tFri,  1 Feb 2019 19:16:17 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 3209A1BF954\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri,  1 Feb 2019 18:52:35 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 0D6A3851FF\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri,  1 Feb 2019 18:52:35 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id Y9dy2kgF0cul for <intel-wired-lan@lists.osuosl.org>;\n\tFri,  1 Feb 2019 18:52:24 +0000 (UTC)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 14FBC81BDC\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri,  1 Feb 2019 18:52:23 +0000 (UTC)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t01 Feb 2019 10:50:52 -0800",
            "from megha-z97x-ud7-th.sc.intel.com ([143.183.85.162])\n\tby orsmga003.jf.intel.com with ESMTP; 01 Feb 2019 10:50:52 -0800"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.56,549,1539673200\"; d=\"scan'208\";a=\"123233683\"",
        "From": "Megha Dey <megha.dey@linux.intel.com>",
        "To": "linux-drivers-review@linux.intel.com,\n\tintel-wired-lan@lists.osuosl.org",
        "Date": "Fri,  1 Feb 2019 11:14:08 -0800",
        "Message-Id": "<1549048453-3584-2-git-send-email-megha.dey@linux.intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1549048453-3584-1-git-send-email-megha.dey@linux.intel.com>",
        "References": "<1549048453-3584-1-git-send-email-megha.dey@linux.intel.com>",
        "X-Mailman-Approved-At": "Fri, 01 Feb 2019 19:16:15 +0000",
        "Subject": "[Intel-wired-lan] [RFC v4 1/6] PCI/MSI: New structures/macros for\n\tdynamic MSI-X allocation",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "Cc": "ravi.v.shankar@intel.com, ashok.raj@intel.com, kyung.min.park@intel.com, \n\tjacob.jun.pan@intel.com, Megha Dey <megha.dey@linux.intel.com>,\n\tmegha.dey@intel.com",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "This is a preparatory patch to introduce the dynamic allocation of\nMSI-X vectors. In this patch, we add new structure members, introduce\nrelevant structures and macros which will be consumed by the API which\nwill dynamically allocate the MSI-X vectors.\n\nSigned-off-by: Megha Dey <megha.dey@linux.intel.com>\n---\n include/linux/device.h | 14 ++++++++++++++\n include/linux/msi.h    |  7 +++++++\n include/linux/pci.h    |  2 ++\n 3 files changed, 23 insertions(+)",
    "diff": "diff --git a/include/linux/device.h b/include/linux/device.h\nindex 6cb4640..3e9b138 100644\n--- a/include/linux/device.h\n+++ b/include/linux/device.h\n@@ -887,6 +887,16 @@ struct dev_links_info {\n };\n \n /**\n+ * struct dev_idr - Device group and entry ID allocator.\n+ * @grp_idr: group ID allocator\n+ * @entry_idr: entry ID allocator\n+ */\n+struct dev_idr {\n+\tstruct idr *grp_idr;\n+\tstruct idr *entry_idr;\n+};\n+\n+/**\n  * struct device - The basic device structure\n  * @parent:\tThe device's \"parent\" device, the device to which it is attached.\n  * \t\tIn most cases, a parent device is some sort of bus or host\n@@ -1051,6 +1061,10 @@ struct device {\n     defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU_ALL)\n \tbool\t\t\tdma_coherent:1;\n #endif\n+\t/* For dynamic MSI-X allocation */\n+\tstruct msi_desc\t\t*first_desc;\t/* 1st MSI-X desc of the latest allocated group */\n+\tstruct dev_idr\t\t*msix_dev_idr;\t/* entry/group allocator */\n+\tbool\t\t\tone_shot;\t/* dynamic or oneshot MSI-X allocation */\n };\n \n static inline struct device *kobj_to_dev(struct kobject *kobj)\ndiff --git a/include/linux/msi.h b/include/linux/msi.h\nindex 784fb52..2092abf 100644\n--- a/include/linux/msi.h\n+++ b/include/linux/msi.h\n@@ -118,11 +118,18 @@ struct msi_desc {\n \tlist_for_each_entry((desc), dev_to_msi_list((dev)), list)\n #define for_each_msi_entry_safe(desc, tmp, dev)\t\\\n \tlist_for_each_entry_safe((desc), (tmp), dev_to_msi_list((dev)), list)\n+/* Iterate through MSI entries from a given entry */\n+#define for_each_msi_entry_from(desc, dev)                             \\\n+\tdesc = (*dev).first_desc;                                       \\\n+\tlist_for_each_entry_from((desc), dev_to_msi_list((dev)), list)  \\\n \n #ifdef CONFIG_PCI_MSI\n #define first_pci_msi_entry(pdev)\tfirst_msi_entry(&(pdev)->dev)\n #define for_each_pci_msi_entry(desc, pdev)\t\\\n \tfor_each_msi_entry((desc), &(pdev)->dev)\n+/* Iterate through PCI-MSI entries from a given entry */\n+#define for_each_pci_msi_entry_from(desc, pdev)        \\\n+\tfor_each_msi_entry_from((desc), &(pdev)->dev)\n \n struct pci_dev *msi_desc_to_pci_dev(struct msi_desc *desc);\n void *msi_desc_to_pci_sysdata(struct msi_desc *desc);\ndiff --git a/include/linux/pci.h b/include/linux/pci.h\nindex 65f1d8c..177305f 100644\n--- a/include/linux/pci.h\n+++ b/include/linux/pci.h\n@@ -459,6 +459,8 @@ struct pci_dev {\n \tchar\t\t*driver_override; /* Driver name to force a match */\n \n \tunsigned long\tpriv_flags;\t/* Private flags for the PCI driver */\n+\tunsigned int\tnum_msix;\t/* Number of MSI-X vectors supported */\n+\tvoid __iomem\t*base;\t\t/* Base address of MSI-X table */\n };\n \n static inline struct pci_dev *pci_physfn(struct pci_dev *dev)\n",
    "prefixes": [
        "RFC",
        "v4",
        "1/6"
    ]
}