get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 47267,
    "url": "http://patches.dpdk.org/api/patches/47267/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1540337982-12678-1-git-send-email-fiona.trahe@intel.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": "<1540337982-12678-1-git-send-email-fiona.trahe@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1540337982-12678-1-git-send-email-fiona.trahe@intel.com",
    "date": "2018-10-23T23:39:42",
    "name": "common/qat: fix for invalid response from firmware",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e38b078268fbc74d24d8aca4c2e6b527975f77a5",
    "submitter": {
        "id": 423,
        "url": "http://patches.dpdk.org/api/people/423/?format=api",
        "name": "Fiona Trahe",
        "email": "fiona.trahe@intel.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1540337982-12678-1-git-send-email-fiona.trahe@intel.com/mbox/",
    "series": [
        {
            "id": 2044,
            "url": "http://patches.dpdk.org/api/series/2044/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=2044",
            "date": "2018-10-23T23:39:42",
            "name": "common/qat: fix for invalid response from firmware",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/2044/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/47267/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/47267/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 DFF886C9B;\n\tWed, 24 Oct 2018 01:39:50 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 8ABD35F28;\n\tWed, 24 Oct 2018 01:39:48 +0200 (CEST)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t23 Oct 2018 16:39:47 -0700",
            "from sivswdev01.ir.intel.com (HELO localhost.localdomain)\n\t([10.237.217.45])\n\tby fmsmga004.fm.intel.com with ESMTP; 23 Oct 2018 16:39:45 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.54,418,1534834800\"; d=\"scan'208\";a=\"100113968\"",
        "From": "Fiona Trahe <fiona.trahe@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "akhil.goyal@nxp.com, tomaszx.jozwiak@intel.com,\n\tarkadiuszx.kusztal@intel.com, tomaszx.cel@intel.com,\n\tFiona Trahe <fiona.trahe@intel.com>, stable@dpdk.org",
        "Date": "Wed, 24 Oct 2018 00:39:42 +0100",
        "Message-Id": "<1540337982-12678-1-git-send-email-fiona.trahe@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "Subject": "[dpdk-dev] [PATCH] common/qat: fix for invalid response from\n\tfirmware",
        "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": "Check that the firmware response has a bit set indicating\nit's valid before dereferencing the rest of the response contents.\n\nFixes: 0bdd36e12245 (\"crypto/qat: make dequeue function generic\")\nCc: stable@dpdk.org\n\nSigned-off-by: Fiona Trahe <fiona.trahe@intel.com>\n---\n drivers/common/qat/qat_qp.c | 8 ++++++++\n 1 file changed, 8 insertions(+)",
    "diff": "diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c\nindex 1d83aac..9c58c64 100644\n--- a/drivers/common/qat/qat_qp.c\n+++ b/drivers/common/qat/qat_qp.c\n@@ -634,15 +634,23 @@ qat_dequeue_op_burst(void *qp, void **ops, uint16_t nb_ops)\n \tuint32_t head;\n \tuint32_t resp_counter = 0;\n \tuint8_t *resp_msg;\n+\tuint8_t hdr_flags;\n \n \trx_queue = &(tmp_qp->rx_q);\n \ttx_queue = &(tmp_qp->tx_q);\n \thead = rx_queue->head;\n \tresp_msg = (uint8_t *)rx_queue->base_addr + rx_queue->head;\n+\thdr_flags = ((struct icp_qat_fw_comn_resp_hdr *)resp_msg)->hdr_flags;\n \n \twhile (*(uint32_t *)resp_msg != ADF_RING_EMPTY_SIG &&\n \t\t\tresp_counter != nb_ops) {\n \n+\t\tif (unlikely(!ICP_QAT_FW_COMN_VALID_FLAG_GET(hdr_flags))) {\n+\t\t\t/* Fatal firmware error */\n+\t\t\tQAT_LOG(ERR, \"QAT Firmware returned invalid response\");\n+\t\t\treturn 0;\n+\t\t}\n+\n \t\tif (tmp_qp->service_type == QAT_SERVICE_SYMMETRIC)\n \t\t\tqat_sym_process_response(ops, resp_msg);\n \t\telse if (tmp_qp->service_type == QAT_SERVICE_COMPRESSION)\n",
    "prefixes": []
}