get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 58907,
    "url": "http://patches.dpdk.org/api/patches/58907/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/f8eaca076ba920f505da30ea7303faaabccf510b.1567799552.git.rahul.lakkireddy@chelsio.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<f8eaca076ba920f505da30ea7303faaabccf510b.1567799552.git.rahul.lakkireddy@chelsio.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/f8eaca076ba920f505da30ea7303faaabccf510b.1567799552.git.rahul.lakkireddy@chelsio.com",
    "date": "2019-09-06T21:52:27",
    "name": "[06/12] net/cxgbe: avoid polling link status before device start",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "81aa14f01a4cc01fc7ebc2beecf1bf78ea42c673",
    "submitter": {
        "id": 241,
        "url": "http://patches.dpdk.org/api/people/241/?format=api",
        "name": "Rahul Lakkireddy",
        "email": "rahul.lakkireddy@chelsio.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/f8eaca076ba920f505da30ea7303faaabccf510b.1567799552.git.rahul.lakkireddy@chelsio.com/mbox/",
    "series": [
        {
            "id": 6317,
            "url": "http://patches.dpdk.org/api/series/6317/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=6317",
            "date": "2019-09-06T21:52:21",
            "name": "net/cxgbe: bug fixes and updates for CXGBE/CXGBEVF PMD",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/6317/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/58907/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/58907/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 93A6D1F4BD;\n\tFri,  6 Sep 2019 23:59:59 +0200 (CEST)",
            "from stargate.chelsio.com (stargate.chelsio.com [12.32.117.8])\n\tby dpdk.org (Postfix) with ESMTP id D63BE1F495;\n\tFri,  6 Sep 2019 23:59:57 +0200 (CEST)",
            "from localhost (scalar.blr.asicdesigners.com [10.193.185.94])\n\tby stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id x86LxqZq004205; \n\tFri, 6 Sep 2019 14:59:53 -0700"
        ],
        "From": "Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>",
        "To": "dev@dpdk.org",
        "Cc": "nirranjan@chelsio.com, stable@dpdk.org",
        "Date": "Sat,  7 Sep 2019 03:22:27 +0530",
        "Message-Id": "<f8eaca076ba920f505da30ea7303faaabccf510b.1567799552.git.rahul.lakkireddy@chelsio.com>",
        "X-Mailer": "git-send-email 2.5.3",
        "In-Reply-To": [
            "<cover.1567799552.git.rahul.lakkireddy@chelsio.com>",
            "<cover.1567799552.git.rahul.lakkireddy@chelsio.com>"
        ],
        "References": [
            "<cover.1567799552.git.rahul.lakkireddy@chelsio.com>",
            "<cover.1567799552.git.rahul.lakkireddy@chelsio.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH 06/12] net/cxgbe: avoid polling link status\n\tbefore device start",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Link updates come in firmware event queue, which is only created\nwhen device starts. So, don't poll for link status if firmware\nevent queue is not yet created.\n\nThis fixes NULL dereference when accessing non existent firmware\nevent queue.\n\nCc: stable@dpdk.org\nFixes: 265af08e75ba (\"net/cxgbe: add link up and down ops\")\n\nSigned-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>\n---\n drivers/net/cxgbe/cxgbe_ethdev.c | 9 +++++++++\n 1 file changed, 9 insertions(+)",
    "diff": "diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c\nindex fb174f8d4..381dd273d 100644\n--- a/drivers/net/cxgbe/cxgbe_ethdev.c\n+++ b/drivers/net/cxgbe/cxgbe_ethdev.c\n@@ -204,6 +204,9 @@ int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,\n \tu8 old_link = pi->link_cfg.link_ok;\n \n \tfor (i = 0; i < CXGBE_LINK_STATUS_POLL_CNT; i++) {\n+\t\tif (!s->fw_evtq.desc)\n+\t\t\tbreak;\n+\n \t\tcxgbe_poll(&s->fw_evtq, NULL, budget, &work_done);\n \n \t\t/* Exit if link status changed or always forced up */\n@@ -237,6 +240,9 @@ int cxgbe_dev_set_link_up(struct rte_eth_dev *dev)\n \tstruct sge *s = &adapter->sge;\n \tint ret;\n \n+\tif (!s->fw_evtq.desc)\n+\t\treturn -ENOMEM;\n+\n \t/* Flush all link events */\n \tcxgbe_poll(&s->fw_evtq, NULL, budget, &work_done);\n \n@@ -263,6 +269,9 @@ int cxgbe_dev_set_link_down(struct rte_eth_dev *dev)\n \tstruct sge *s = &adapter->sge;\n \tint ret;\n \n+\tif (!s->fw_evtq.desc)\n+\t\treturn -ENOMEM;\n+\n \t/* Flush all link events */\n \tcxgbe_poll(&s->fw_evtq, NULL, budget, &work_done);\n \n",
    "prefixes": [
        "06/12"
    ]
}