get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 43038,
    "url": "http://patches.dpdk.org/api/patches/43038/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180713022825.33106-16-pablo.de.lara.guarch@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": "<20180713022825.33106-16-pablo.de.lara.guarch@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180713022825.33106-16-pablo.de.lara.guarch@intel.com",
    "date": "2018-07-13T02:28:24",
    "name": "[v7,15/16] compress/qat: prevent device usage if incorrect firmware",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "7facfea220ffe2360662223c14893314e8c8abfa",
    "submitter": {
        "id": 9,
        "url": "http://patches.dpdk.org/api/people/9/?format=api",
        "name": "De Lara Guarch, Pablo",
        "email": "pablo.de.lara.guarch@intel.com"
    },
    "delegate": {
        "id": 22,
        "url": "http://patches.dpdk.org/api/users/22/?format=api",
        "username": "pdelarag",
        "first_name": "Pablo",
        "last_name": "de Lara Guarch",
        "email": "pablo.de.lara.guarch@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180713022825.33106-16-pablo.de.lara.guarch@intel.com/mbox/",
    "series": [
        {
            "id": 561,
            "url": "http://patches.dpdk.org/api/series/561/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=561",
            "date": "2018-07-13T02:28:09",
            "name": "compress/qat: add compression PMD",
            "version": 7,
            "mbox": "http://patches.dpdk.org/series/561/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/43038/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/43038/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 CAEBF1B440;\n\tFri, 13 Jul 2018 12:34:50 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id B8D517EC7\n\tfor <dev@dpdk.org>; Fri, 13 Jul 2018 12:34:27 +0200 (CEST)",
            "from orsmga004.jf.intel.com ([10.7.209.38])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t13 Jul 2018 03:34:27 -0700",
            "from silpixa00399466.ir.intel.com (HELO\n\tsilpixa00399466.ger.corp.intel.com) ([10.237.223.220])\n\tby orsmga004.jf.intel.com with ESMTP; 13 Jul 2018 03:34:26 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,347,1526367600\"; d=\"scan'208\";a=\"215718239\"",
        "From": "Pablo de Lara <pablo.de.lara.guarch@intel.com>",
        "To": "fiona.trahe@intel.com, tomaszx.jozwiak@intel.com, john.griffin@intel.com,\n\tdeepak.k.jain@intel.com",
        "Cc": "dev@dpdk.org",
        "Date": "Fri, 13 Jul 2018 03:28:24 +0100",
        "Message-Id": "<20180713022825.33106-16-pablo.de.lara.guarch@intel.com>",
        "X-Mailer": "git-send-email 2.14.4",
        "In-Reply-To": "<20180713022825.33106-1-pablo.de.lara.guarch@intel.com>",
        "References": "<1531411499-13156-1-git-send-email-fiona.trahe@intel.com>\n\t<20180713022825.33106-1-pablo.de.lara.guarch@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v7 15/16] compress/qat: prevent device usage if\n\tincorrect firmware",
        "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": "From: Fiona Trahe <fiona.trahe@intel.com>\n\nPrevious check only causes op to fail on dequeue.\nThis extends so once first fail is detected, application can\nno longer enqueue ops to the device and will also get an\nappropriate error if trying to reconfigure or setup the device.\n\nSigned-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>\nSigned-off-by: Fiona Trahe <fiona.trahe@intel.com>\n---\n drivers/compress/qat/qat_comp_pmd.c | 57 ++++++++++++++++++++++++++++++++++++-\n 1 file changed, 56 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c\nindex 9bb98974c..0a571b3d6 100644\n--- a/drivers/compress/qat/qat_comp_pmd.c\n+++ b/drivers/compress/qat/qat_comp_pmd.c\n@@ -252,6 +252,61 @@ qat_comp_pmd_dequeue_op_burst(void *qp, struct rte_comp_op **ops,\n }\n \n \n+static uint16_t\n+qat_comp_pmd_enq_deq_dummy_op_burst(void *qp __rte_unused,\n+\t\t\t\t    struct rte_comp_op **ops __rte_unused,\n+\t\t\t\t    uint16_t nb_ops __rte_unused)\n+{\n+\tQAT_DP_LOG(ERR, \"QAT PMD detected wrong FW version !\");\n+\treturn 0;\n+}\n+\n+static struct rte_compressdev_ops compress_qat_dummy_ops = {\n+\n+\t/* Device related operations */\n+\t.dev_configure\t\t= NULL,\n+\t.dev_start\t\t= NULL,\n+\t.dev_stop\t\t= qat_comp_dev_stop,\n+\t.dev_close\t\t= qat_comp_dev_close,\n+\t.dev_infos_get\t\t= NULL,\n+\n+\t.stats_get\t\t= NULL,\n+\t.stats_reset\t\t= qat_comp_stats_reset,\n+\t.queue_pair_setup\t= NULL,\n+\t.queue_pair_release\t= qat_comp_qp_release,\n+\n+\t/* Compression related operations */\n+\t.private_xform_create\t= NULL,\n+\t.private_xform_free\t= qat_comp_private_xform_free\n+};\n+\n+static uint16_t\n+qat_comp_pmd_dequeue_frst_op_burst(void *qp, struct rte_comp_op **ops,\n+\t\t\t\t   uint16_t nb_ops)\n+{\n+\tuint16_t ret = qat_dequeue_op_burst(qp, (void **)ops, nb_ops);\n+\tstruct qat_qp *tmp_qp = (struct qat_qp *)qp;\n+\n+\tif (ret) {\n+\t\tif ((*ops)->debug_status ==\n+\t\t\t\t(uint64_t)ERR_CODE_QAT_COMP_WRONG_FW) {\n+\t\t\ttmp_qp->qat_dev->comp_dev->compressdev->enqueue_burst =\n+\t\t\t\t\tqat_comp_pmd_enq_deq_dummy_op_burst;\n+\t\t\ttmp_qp->qat_dev->comp_dev->compressdev->dequeue_burst =\n+\t\t\t\t\tqat_comp_pmd_enq_deq_dummy_op_burst;\n+\n+\t\t\ttmp_qp->qat_dev->comp_dev->compressdev->dev_ops =\n+\t\t\t\t\t&compress_qat_dummy_ops;\n+\t\t\tQAT_LOG(ERR, \"QAT PMD detected wrong FW version !\");\n+\n+\t\t} else {\n+\t\t\ttmp_qp->qat_dev->comp_dev->compressdev->dequeue_burst =\n+\t\t\t\t\tqat_comp_pmd_dequeue_op_burst;\n+\t\t}\n+\t}\n+\treturn ret;\n+}\n+\n static struct rte_compressdev_ops compress_qat_ops = {\n \n \t/* Device related operations */\n@@ -302,7 +357,7 @@ qat_comp_dev_create(struct qat_pci_device *qat_pci_dev)\n \tcompressdev->dev_ops = &compress_qat_ops;\n \n \tcompressdev->enqueue_burst = qat_comp_pmd_enqueue_op_burst;\n-\tcompressdev->dequeue_burst = qat_comp_pmd_dequeue_op_burst;\n+\tcompressdev->dequeue_burst = qat_comp_pmd_dequeue_frst_op_burst;\n \n \tcompressdev->feature_flags = RTE_COMPDEV_FF_HW_ACCELERATED;\n \n",
    "prefixes": [
        "v7",
        "15/16"
    ]
}