get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 71330,
    "url": "https://patches.dpdk.org/api/patches/71330/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200612032410.20864-7-guinanx.sun@intel.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": "<20200612032410.20864-7-guinanx.sun@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200612032410.20864-7-guinanx.sun@intel.com",
    "date": "2020-06-12T03:23:55",
    "name": "[06/21] net/ixgbe/base: resolve infinite recursion on PCIe link down",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "34777d19a81e471ed6e2d27a9613a80037696d99",
    "submitter": {
        "id": 1476,
        "url": "https://patches.dpdk.org/api/people/1476/?format=api",
        "name": "Guinan Sun",
        "email": "guinanx.sun@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "https://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200612032410.20864-7-guinanx.sun@intel.com/mbox/",
    "series": [
        {
            "id": 10428,
            "url": "https://patches.dpdk.org/api/series/10428/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10428",
            "date": "2020-06-12T03:23:49",
            "name": "update ixgbe base code",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/10428/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/71330/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/71330/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 2D258A00BE;\n\tFri, 12 Jun 2020 05:46:58 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 8AFC61BE99;\n\tFri, 12 Jun 2020 05:46:18 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by dpdk.org (Postfix) with ESMTP id 531231B91B\n for <dev@dpdk.org>; Fri, 12 Jun 2020 05:46:14 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 Jun 2020 20:46:14 -0700",
            "from intel.sh.intel.com ([10.239.255.18])\n by orsmga002.jf.intel.com with ESMTP; 11 Jun 2020 20:46:12 -0700"
        ],
        "IronPort-SDR": [
            "\n RuUBOqcOS1zEme1VuVKb6OFa4KB79lY7jhNs6wyObWDBqAM5Ayo6lkbOVcMeKixNDfPcrRNiYv\n fCRRGyZox9/g==",
            "\n /70ARYdmjMuPJnXqiMWGjXhIh9AbgUk22V19kFwF1WWgBmHXLQKfXXSnpi4zLVPNma6L4DWeZm\n 8HPWcF50GX7A=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.73,501,1583222400\"; d=\"scan'208\";a=\"289759494\"",
        "From": "Guinan Sun <guinanx.sun@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Guinan Sun <guinanx.sun@intel.com>,\n Robert Konklewski <robertx.konklewski@intel.com>",
        "Date": "Fri, 12 Jun 2020 03:23:55 +0000",
        "Message-Id": "<20200612032410.20864-7-guinanx.sun@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200612032410.20864-1-guinanx.sun@intel.com>",
        "References": "<20200612032410.20864-1-guinanx.sun@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 06/21] net/ixgbe/base: resolve infinite recursion\n\ton PCIe link down",
        "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": "In some corner cases the functions ixgbe_clear_rar_generic and\nixgbe_clear_vmdq_generic may call one another leading to infinite\nrecursion.\n\nWhen ixgbe_clear_vmdq_generic is called with IXGBE_CLEAR_VMDQ_ALL\nflag, it's going to clear MPSAR registers, and proceed to call\nixgbe_clear_rar_generic, which in turn will clear the RAR registers,\nand recursively call back ixgbe_clear_vmdq_generic. Normally, the\nlatter would detect that MPSAR registers have already been cleared\nand terminate the recursion.\n\nHowever, when PCIe link is down, and before the driver has had the\nopportunity to shut itself down, all register reads return 0xFFFFFFFF,\nand all register writes fail silently. In such case, because\nixgbe_clear_vmdq_generic blindly assumes that clearing MPSAR registers\nsucceeded, it's going to always call ixgbe_clear_rar_generic, which\nin turn will always call back ixgbe_clear_vmdq_generic, creating\ninifinite recursion.\n\nThis patch re-reads MPSAR register values after they had been cleared.\nIn case of PCIe link failure, the values read will be non-zero, which\nwill terminate the recursion. On the other hand, under normal\ncircumstances the value read from MPSAR registers is going to be equal\nto the value previously written, so this patch is expected not to cause\nany regressions.\n\nTesting Hints (required if no HSD):\nBring down the adapter's parent PCIe bridge.\n\nSigned-off-by: Robert Konklewski <robertx.konklewski@intel.com>\nSigned-off-by: Guinan Sun <guinanx.sun@intel.com>\n---\n drivers/net/ixgbe/base/ixgbe_common.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c\nindex 89ae2b462..420ad977b 100644\n--- a/drivers/net/ixgbe/base/ixgbe_common.c\n+++ b/drivers/net/ixgbe/base/ixgbe_common.c\n@@ -3778,11 +3778,11 @@ s32 ixgbe_clear_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq)\n \tif (vmdq == IXGBE_CLEAR_VMDQ_ALL) {\n \t\tif (mpsar_lo) {\n \t\t\tIXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), 0);\n-\t\t\tmpsar_lo = 0;\n+\t\t\tmpsar_lo = IXGBE_READ_REG(hw, IXGBE_MPSAR_LO(rar));\n \t\t}\n \t\tif (mpsar_hi) {\n \t\t\tIXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), 0);\n-\t\t\tmpsar_hi = 0;\n+\t\t\tmpsar_hi = IXGBE_READ_REG(hw, IXGBE_MPSAR_HI(rar));\n \t\t}\n \t} else if (vmdq < 32) {\n \t\tmpsar_lo &= ~(1 << vmdq);\n",
    "prefixes": [
        "06/21"
    ]
}